func Brightness(percentage float32) Filter {
	if percentage == 0 {
		return &copyimageFilter{}
	}

	shift := minf32(maxf32(percentage, -100), 100) / 100

	return &colorchanFilter{
		fn: func(x float32) float32 {
			return x + shift
		},
		lut: false,
	}
}
// Brightness creates a filter that changes the brightness of an image.
// The percentage parameter must be in range (-100, 100). The percentage = 0 gives the original image.
// The percentage = -100 gives solid black image. The percentage = 100 gives solid white image.
Brightness creates a filter that changes the brightness of an image.
The percentage parameter must be in range (-100, 100). The percentage = 0 gives the original image.
The percentage = -100 gives solid black image. The percentage = 100 gives solid white image.
// Brightness creates a filter that changes the brightness of an image . // The percentage parameter must be in range ( - 100 100 ) . The percentage = 0 gives the original image . // The percentage = - 100 gives solid black image . The percentage = 100 gives solid white image .
func Brightness(percentage float32) Filter {
	if percentage == 0 {
		return &copyimageFilter{}
	}
	shift := minf32(maxf32(percentage, -100), 100) / 100
	return &colorchanFilter{
		fn: func(x float32) float32 {
			return x + shift
		},
		lut: false,
	}
}
func Brightness ( percentage float32 ) Filter { if percentage == 0 { return & copyimageFilter { } } shift := minf32 ( maxf32 ( percentage , - 100 ) , 100 ) / 100 return & colorchanFilter { fn : func ( x float32 ) float32 { return x + shift } , lut : false , } }
Brightness creates a filter that changes the brightness of an image.
Brightness creates a filter that changes the brightness of an image .