Skip to main content

Posts

How to generate random captcha text in ColdFusion

CFimage - generate random captcha text cfimageCaptchaRandomText.cfm <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>cfimage: how to generate random captcha text in coldfusion</title> </head> <body> <h2 style="color:OrangeRed; font-style:italic">cfimage tag example: how to generate random captcha text</h2> <hr width="600" align="left" color="OrangeRed" /> <br /> <cfset MyRandomNumber=RandRange(1000,10000)> <cfset MyRandomText1="CF#MyRandomNumber#"> <cfset MyRandomNumber=RandRange(1000,10000)> <cfset MyRandomText2="CF#MyRandomNumber#"> <cfset MyRandomNumber=RandRange(1000,10000)> <cfset MyRandomText3="CF#MyRandomNumber#"> <table border="1" cellpadding="5" c...

How to compress jpeg image programmatically in ColdFusion

CFImage - compress jpeg image programmatically cfimageCompress.cfm <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>cfimage action write: how to compress jpeg image programmatically in coldfusion</title> </head> <body> <h2 style="color:Crimson; font-style:italic">cfimage tag example: how to compress jpeg image</h2> <hr width="575" align="left" color="OrangeRed" /> <br /> <cfimage source="Images/Orchid1.jpg" action="write" destination="Images/Orchid1New.jpg" quality=".4" overwrite="yes" /> <table border="1" cellpadding="5" cellspacing="0" bordercolor="PapayaWhip"> <tr bgcolor="Orange" style="color:Snow; font-size:large...

How to write an image to the browser in ColdFusion

cfimage - write an image to the browser cfimageActionWriteToBrowser.cfm <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>cfimage action writetobrowser: how to write an image to the browser in coldfusion</title> </head> <body> <h2 style="color:Crimson; font-style:italic">cfimage tag example: how to write an image to the browser</h2> <hr width="600" align="left" color="OrangeRed" /> <br /> <cfimage source="Images/Bee2.jpg" action="border" color="Green" name="ImageBee" thickness="3" /> <table border="1" cellpadding="5" cellspacing="0" bordercolor="SeaGreen"> <tr bgcolor="DarkSeaGreen" style="color:Snow; font-size:large" ...

How to rotate image programmatically in coldfusion

cfimage - rotate an image programmatically cfimageActionRotate.cfm <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>cfimage action rotate: how to rotate image programmatically in coldfusion</title> </head> <body> <h2 style="color:Crimson; font-style:italic">cfimage tag example: how to use rotate attribute</h2> <hr width="500" align="left" color="OrangeRed" /> <br /> <cfimage source="Images/Butterfly.jpg" action="rotate" angle="60" name="ButterflyRotate"> <table border="1" cellpadding="5" cellspacing="0" bordercolor="DarkSeaGreen"> <tr bgcolor="SeaGreen" style="color:Snow; font-size:large" align="center"> ...

ColdFusion - How to resize image height width programmatically

cfimage - change image height width programmatically cfimageActionResize.cfm <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>cfimage action resize: how to change image height width programmatically</title> </head> <body> <h2 style="color:SeaGreen; font-style:italic">cfimage tag example: how to resize image</h2> <hr width="525" align="left" color="DarkSeaGreen" /> <br /> <cfimage source="Images/Dog3.jpg" action="resize" name="ResizedImage" height="150" width="200"> <table border="1" cellpadding="5" cellspacing="0" bordercolor="DarkSeaGreen"> <tr bgcolor="SeaGreen" style="color:Snow; font-size:large" align="center...

How to get image information programmatically in ColdFusion

Introduction In ColdFusion, obtaining image details like dimensions, color depth, and file format is often a vital part of web applications, especially when managing user-uploaded images or dynamically created graphics. This tutorial demonstrates how to extract image information programmatically in ColdFusion using the <cfimage> tag. The goal is to learn how to leverage this tag to fetch and display essential image details in an organized, user-friendly format. This article will guide you through the ColdFusion code example and explain how each part contributes to gathering and presenting the image data effectively. Understanding the <cfimage> Tag and Action Attribute The <cfimage> tag in ColdFusion is a powerful tool for managing images in a variety of ways. By using the action attribute set to "info," you can direct ColdFusion to gather specific metadata about an image, such as its width, height, file size, and format. In this example, the <cfimage...

How to convert image file format jpg to gif programmatically in ColdFusion

cfimage - convert image file format jpg to gif programmatically cfimageActionConvert.cfm <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <title>cfimage action convert: how to convert image file format jpg to gif pngprogrammatically</title> </head> <body> <h2 style="color:Crimson; font-style:italic">cfimage tag example: how to convert image file format</h2> <hr width="575" align="left" color="OrangeRed" /> <br /> <cfimage source="Images/CuteFlower1.jpg" action="convert" destination="Images/CuteFlower1.gif" overwrite="yes" quality=".5"> <table border="1" cellpadding="5" cellspacing="0" bordercolor="IndianRed"> <tr bgcolor="Crimson" sty...