Switches antialiasing on or off in rendered graphics.
imageSetAntialiasing(image [, antialias])
→ returns void
someImage.setAntialiasing(antialias)
on
on
true
off
false
This example shows how to turn off antialiasing for a ColdFusion image.
<!--- Create a ColdFusion image from an existing JPEG file. --->
<cfset myImage = imageNew("../cfdocs/images/artgallery/elecia02.jpg")>
<!--- Turn off antialiasing. --->
<cfset imageSetAntialiasing(myImage,"off")>
<!--- Display the modified image in a browser. --->
<cfimage source="#myImage#" action="writeToBrowser">
CF 11+ Switch the antialiasing off
imgObj = imageRead("https://cfdocs.org/apple-touch-icon.png");
imgObj.setAntialiasing('off');
cfimage(action="writeToBrowser", source=imgObj);
Signup for cfbreak
to stay updated on the latest news from the ColdFusion / CFML community. One email, every friday.