We do that with imnagemagick, code below (part of a larger cfc);

<cffunction name="watermark" access="public" output="No"
returntype="any" hint="Composites and image with a supplied watermark">
  <cfargument name="left" type="numeric" required="true">
  <cfargument name="top" type="numeric" required="true">
  <cfargument name="infile" type="string" required="true">
  <cfargument name="watermark" type="string" required="true">
  <cfargument name="outfile" type="string" required="true">
  <cfargument name="quality" type="numeric" required="false"
default="100">
  <cfscript>
  args = arraynew(1);
  args[1] = "-geometry +#left#+#top#";
  args[2] = "-quality #quality#";
  args[3] = """#watermark#""";
  args[4] = """#infile#""";
  args[5] = """#outfile#""";
  textArgs = '';
  </cfscript>
  <cfloop from="1" to="#arrayLen(args)#" index="i">
   <cfset textArgs  = textArgs & " " & args[i]>
  </cfloop>
  <cfexecute name="#magickpath#composite.exe" arguments="#textArgs#"
timeout="10"></cfexecute>
</cffunction>

-----Original Message-----
From: Hugo Ahlenius [mailto:[EMAIL PROTECTED]
Sent: 14 October 2004 08:22
To: CF-Talk
Subject: RE: Add watermark to image

probably possible using something like imagemagkick (just one cfexecute
call away)

--
Hugo Ahlenius

-------------------------------------------------------------
Hugo Ahlenius                  E-Mail: [EMAIL PROTECTED]
Project Officer                Phone:            +46 8 230460
UNEP GRID-Arendal              Fax:              +46 8 230441
Stockholm Office               Mobile:         +46 733 467111
                               WWW:       http://www.grida.no
-------------------------------------------------------------

| -----Original Message-----
| From: Paul Wilson [mailto:[EMAIL PROTECTED]
| Sent: Thursday, October 14, 2004 09:22
| To: CF-Talk
| Subject: Add watermark to image
|
| Is it possible to add a watermark to an image dynamically
| using CF? I've had a quick search but couldn't find anything.
|
| Thanks
|
|
|
|
|
|
  _____
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings] [Donations and Support]

Reply via email to