Image manipulation capabilities in ColdFusion 8
Not much people are using Coldfusion these days but i see lot of potential in Coldfusion 8 ... i came across the need of image manipulation and its then i found out the capabilities of new cfimage tag and image-related functions. The cfimage tag introduces lot of new ways to manipulate images in ColdFusion without having to install any third-party image manipulation tags or Java classes.
Here is an example how you can use the cfimage tag to create CAPTCHA (Completely Automated Public Turing Test to Tell Computers and Humans Apart) graphics in the browser:
<cfset captchatext="hello">
<cfimage width="140" height="40" difficulty="low" text="#captchaText#" action="captcha">
Here you see cfimage tag with the action property set to captcha, followed by the text property set to the captchaText variable: this is the text that will be displayed in the generated CAPTCHA image. The difficulty property has three settings, low, medium, and high, which affects the degree to which the text is obscured, to make it harder for a computer to distinguish characters. The last two properties, width and height, set the graphic’s display dimensions.
Here is an example how you can use the cfimage tag to create CAPTCHA (Completely Automated Public Turing Test to Tell Computers and Humans Apart) graphics in the browser:
<cfset captchatext="hello">
<cfimage width="140" height="40" difficulty="low" text="#captchaText#" action="captcha">
Here you see cfimage tag with the action property set to captcha, followed by the text property set to the captchaText variable: this is the text that will be displayed in the generated CAPTCHA image. The difficulty property has three settings, low, medium, and high, which affects the degree to which the text is obscured, to make it harder for a computer to distinguish characters. The last two properties, width and height, set the graphic’s display dimensions.

0 Comments:
Post a Comment
<< Home