Description

AdjustFunc applies the fn function to each pixel of the img image and returns the adjusted image.

Example:

dstImage = imaging.AdjustFunc(
	srcImage,
	func(c color.NRGBA) color.NRGBA {
		// shift the red channel by 16
		r := int(c.R) + 16
		if r > 255 {
			r = 255
		}
		return color.NRGBA{uint8(r), c.G, c.B, c.A}
	}
)

AdjustFunc is referenced in 1 repository

github.com/disintegration/imaging