imageGrayScale

Converts a ColdFusion image to grayscale.

imageGrayScale(name) → returns void

Member Function Syntax

someImage.grayScale()

Argument Reference for the imageGrayScale function

name

Required: Yes
The image on which this operation is performed.

Examples sample code invoking the imageGrayScale function


Using grayScale member function

CF 11+ Lucee 4.5+ Convert image to grayScale

imgObj = imageRead("http://cfdocs.org/apple-touch-icon.png");
imgObj.grayScale();
cfimage(action="writeToBrowser", source=imgObj);

Fork me on GitHub