"Within 30 seconds they were all "noticed" by the event gateway, watermarked, and copied over. Like magic. :)"
See how cool magic is? Heh Thanks Ray; good stuff. I'll definitely be playing around with this (and trying to talk the guys hosting my site into letting me set it up on the server) I've got the first part done already. Last night I wrote a template that loops over a directory called /process/. If it finds any images in there it will loop over them and: 1) load the image into an image object 2) write it to /unwatermarked/ as smaller file size 3) load the watermark.png into an image object 3) imagepaste the watermark to the image object and save it to /watermarked/ 4) move the actual file to /original/ Then the header images are retrieved from /watermarked/ as in the example from before. So I have a watermarked image, the same image minus the watermark and I have the original if I ever want to run them back through for a new watermark or something. -----Original Message----- From: Raymond Camden [mailto:[email protected]] Sent: Friday, June 04, 2010 8:09 AM To: cf-talk Subject: Re: imageRead plus imagepaste plus imageGetBlob issue http://www.coldfusionjedi.com/index.cfm/2010/6/4/Automating-watermarking-of- images-with-ColdFusion On Fri, Jun 4, 2010 at 6:40 AM, Raymond Camden <[email protected]> wrote: > Code is written - just ran into some other stuff yesterday which > prevented me from blogging it. Will be the first thing I do once I get > to work today. :) > > On Thu, Jun 3, 2010 at 5:02 PM, Bobby Hartsfield <[email protected]> wrote: >> >> I wouldn't mind taking a look at what you put together for an event gateway >> if the offer still stands. >> >> >> -----Original Message----- >> From: Raymond Camden [mailto:[email protected]] >> Sent: Thursday, June 03, 2010 12:01 PM >> To: cf-talk >> Subject: Re: imageRead plus imagepaste plus imageGetBlob issue >> >> >> FYI, I've got some sample code to show how you can use a scheduled >> task to do this, or an event gateway. >> >> >> On Thu, Jun 3, 2010 at 10:48 AM, DURETTE, STEVEN J (ATTASIAIT) >> <[email protected]> wrote: >>> >>> Why don't you use a hybrid... ?Drop the files in a directory, then when >>> it's that files turn, check to see if a file of the same name is in a >>> subdirectory called watermarked (or something like that). If it is just >>> serve up the watermarked file. ?If not have the process create the >>> watermarked file and put it in the watermarked directory. >>> >>> This allows you the flexibility of dropping files in there without >>> worrying about it and it will speed up the process because the older >>> files will be static watermarked, and you still have the originals if >>> you ever need un-watermarked files. >>> >>> Steve >>> >>> >>> -----Original Message----- >>> From: Bobby Hartsfield [mailto:[email protected]] >>> Sent: Thursday, June 03, 2010 9:50 AM >>> To: cf-talk >>> Subject: Re: imageRead plus imagepaste plus imageGetBlob issue >>> >>> >>> I gave up. Nothing that resolved the issue was a valid long term >>> solution. I've watermarked the images manually and removed all of the >>> code to handle it on the fly. >>> >>> I'll still use it in a tool that watermarks the images as I upload them >>> I guess. >>> >>> So now it is very simple... >>> >>> <cfdirectory name="variables.mastImages" action="list" >>> directory="#expandPath('/images/mastimages/')#" filter="*.jpg" /> >>> >>> <cfset variables.mastImg = randRange(1,variables.mastImages.recordcount) >>> /> >>> >>> <cfheader name="Content-Disposition" value="inline; >>> #variables.mastImages['name'][variables.mastImg]#"> >>> >>> <cfcontent >>> type="image/jpg" reset="true" file="#expandpath('/images/mastimages/' >>> & variables.mastImages['name'][variables.mastImg])#" /> >>> >>> Thanks for all the input. >>> >>> >>> >>> >>> >>> >>> >>> >> >> >> >> ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-talk/message.cfm/messageid:334303 Subscription: http://www.houseoffusion.com/groups/cf-talk/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-talk/unsubscribe.cfm

