2 lines in which I basically give both images a name. The reason the watermark is a png is I want to have the ability to use alpha channels.
<cfimage source="img_2566.jpg" name="image" / >
<cfimage source=
"watermark.png" name="watermark" / >

Next paste the watermark onto the image at 0x and 0y. I cheated and created the images the same size, but you could easily read the image info get the size then calculate where you want the watermark to be.
<cfset ImagePaste(image, watermark, 0, 0) / >

The last line writes the image to the browser in the format of a jpeg.
<cfimage source="#image#" action=
"writeToBrowser" format="jpg" / >

The Final Code should look like this
<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" / >


More information can be seen here:
http://www.damonledet.com/cfwatermark/

About This Tutorial
Author: Damon Ledet
Skill Level: Intermediate 
 
 
 
Platforms Tested: CFMX8
Total Views: 13,646
Submission Date: November 22, 2007
Last Update Date: June 05, 2009
All Tutorials By This Autor: 1
Discuss This Tutorial
Advertisement

Sponsored By...
Powered By...