ColdFusion 8's image functions + jQuery= a UI for adding text and color blocks into an image file
Join the DZone community and get the full member experience.Join For Free
one of the new features in coldfusion 8 is the ability to manipulate images using coldfusion tags and functions. in addition to being to do generic image manipulations (like rotating, resizing, and cropping), you can also add text to an image using the imagedrawtext function, like in this example:
<!---assign the image file to the carimage variable--->
<cfimage name = "carimage" action="read" source="ferrari.gif"/>
<!---add the text "fast car!" to the image and place it 10 pixels from the left and 15 from the top--->
<cfset imagedrawtext(carimage, "fast car!, 10, 15)>
<!---display the new image--->
<cfimage source="#carimage#" action="writetobrowser">
a week ago, an idea popped into my head: "what if you could create a ui tool that would let a user decide what text should appear on the image and where it should appear?"
the fact that it only took me a week to do this (no more than 25 hours) is a testament to both the power and simplicity of coldfusion and jquery.
you can try out the proof-of-concept at: http://www.swartzfager.org/captionator .
Opinions expressed by DZone contributors are their own.
Top 10 Engineering KPIs Technical Leaders Should Know
SRE vs. DevOps
How To Use Pandas and Matplotlib To Perform EDA In Python