Adding a watermark to original images on the fly

Found this great piece of code that will allow you to prevent users or atleast stop them a little… from downloading your images. Using the cfimage tag!

Simply use cfimage to call you’re first two images, then using ImagePaste() to mash them together, and write to the browser calling ‘#image#’.

See how you go.

<cfimage source=”img_2566.jpg” name=”image”>
<cfimage source=”watermark.png” name=”watermark”>
<cfset ImagePaste(image, watermark, 0, 0)>
<cfimage source=”#image#” action=”writeToBrowser” format=”jpg”>

  • Share/Bookmark

Tags: ,

Leave a Reply