On Tuesday 05 December 2006 10:42, Coldfusion wrote:
 > I am curious as how you can add a watermark to an image without
 > having to create a new image.

I'm sure you could, but why would you want to?  Watermarking an image 
with every request would not scale very well.

You could "cache" watermark images... ie..

---- watermark.cfm ---
<cfparam name="img" type="string">
<cfset wm_img = "wm_#img#">
<cfif fileExists("#getTempDirectory()#/#wm_img#")>
        <!--- create watermarked image using image.cfc --->
        <!--- or alagad or whatever --->
</cfif>
<cfcontent file="#getTempDirectory()#/#wm_img#"
        type="image/jpeg" reset="yes"
        deletefile="no">
---- end watermark.cfm ---

You'd just have to be careful about making sure you delete the old 
watermark when you update the original image.

but I'm not sure why you wouldn't just create a separate watermark image 
up front.

Rick

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Create robust enterprise, web RIAs.
Upgrade & integrate Adobe Coldfusion MX7 with Flex 2
http://ad.doubleclick.net/clk;56760587;14748456;a?http://www.adobe.com/products/coldfusion/flex2/?sdid=LVNU

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:262857
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to