Inverts the pixel values of a ColdFusion image.
imageNegative(name)
returns void
someImage.negative()
Name | Type | Required | Default | Description |
---|---|---|---|---|
name | string | Yes | The image on which this operation is performed. |
CF11+ 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);