imageGrayScale

Converts a ColdFusion image to grayscale.

imageGrayScale(name) → returns void

Member Function Syntax

someImage.grayScale()

Argument Reference

name string
Required

The image on which this operation is performed.

Examples
Sample code invoking the imageGrayScale 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);

Signup for cfbreak to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.

Fork me on GitHub