imageNegative

Inverts the pixel values of a ColdFusion image.

imageNegative(name) → returns void

Member Function Syntax

someImage.negative()

imageNegative Argument Reference

name string
Required

The image on which this operation is performed.

Examples sample code invoking the imageNegative function

CF 11+ Convert image to negative

imgObj = imageRead("https://placekitten.com/408/287");
imgObjNegative = duplicate(imgObj);
imgObjNegative.negative();
cfimage(action="writeToBrowser", source=imgObj);
cfimage(action="writeToBrowser", source=imgObjNegative);

Fork me on GitHub