>- see footer for list info -< Hi Nick, If you're not on Coldfusion 8 yet then you won't be able to use cfimage to create your thumbnails.
There are a few ways of creating images out there - you can harness Java to do it ( http://www.opensourcecf.com/imagecfc/ ), or CFX_image ( http://www.kolumbus.fi/jukka.manner/ ) and there are some other tags/methods as well. Personally I prefer imagemagick ( www.imagemagick.org ) - it's pretty comprehensive and I prefer it for the quality of the resized images. Others tend to result in either blurry or jaggedy thumbnails. So the final method for doing it would be: run cfdirectory to get a directory's files. loop over the result. for each file use fileexists to see if that files corresponding thumbnail exists. If it doesn't use imagemagick/other image function to read the original image and resize it to your thumbnail dimensions (I like to crop them into squares first if they're not already). Imagemagick command for this is: convert 'filename' -resize 50x 'outputfile' replace the filename, width and outputfile with your filenames/dimensions. I don't think its possible to set the datemodified from coldfusion (although if someone knows how please tell me). Otherwise you could read this ( http://tinyurl.com/yqmgxz ) for a method of doing it, or you could instead save a date against the filename in a database and use that as a lookup on whether the file has changed or not. Hope this helps - give us a shout if you need any more help! Rich On Jan 23, 2008 12:02 AM, Snake <[EMAIL PROTECTED]> wrote: > >- see footer for list info -< > First bookmark www.cfquickdocs.com and http://livedocs.adobe.com/ > You will need these. > > Now lookup the following tags and functions > > fileexists > Cfdirectory > Cffile > Cfimage > > These are what you need to complete your task. > > > -- > Russ Michaels > Certified ColdFusion Professional > My Blog: www.russ.michaels.me.uk > > Commerical ColdFusion & BlueDragon Hosting: www.cfmxhosting.co.uk > FREE CFML Developer hosting : www.cfdeveloper.co.uk > > > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Nick Middleweek > Sent: 22 January 2008 23:35 > To: [email protected] > Subject: [CF-Dev] [NEWBIE] How to resize JPEGs? > > >- see footer for list info -< > Hello chaps, > > I am totally new to CF, found this list via this site: www.ukcfug.org so > hope this is the most popular one on the planet!... > > I've done ASP web dev work and I'm a seasoned web man when it comes to 4D > so > I kind of know what I'm doing... but with CF I have nought got a clue... > > I want to get used the environment and have a play to get used to the > syntax, etc and how it all works. I'm using DW v8 and have created an > empty > processfiles.cfm page :) > > What I like it to do is look inside a given folder and then check to see > if > it's thumbnail version exists in another folder. If it doesn't, I'd like > to > create the thumbnails and set the modified datetime stamp to the same as > the > larger image. This way, when the page is called again, it can check to see > if it needs to update the thumbnail or leave it intact. > > > Can someone please help me with this pretty simple task... :) > > > Thanks in advance! > > Nick > _______________________________________________ > > For details on ALL mailing lists and for joining or leaving lists, go to > http://list.cfdeveloper.co.uk/mailman/listinfo > > -- > CFDeveloper Sponsors:- > >- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -< > >- Lists hosted by www.Gradwell.com -< > >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help > -< > > > > _______________________________________________ > > For details on ALL mailing lists and for joining or leaving lists, go to > http://list.cfdeveloper.co.uk/mailman/listinfo > > -- > CFDeveloper Sponsors:- > >- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -< > >- Lists hosted by www.Gradwell.com -< > >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help > -< > _______________________________________________ For details on ALL mailing lists and for joining or leaving lists, go to http://list.cfdeveloper.co.uk/mailman/listinfo -- CFDeveloper Sponsors:- >- cfdeveloper Hosting provided by www.cfmxhosting.co.uk -< >- Lists hosted by www.Gradwell.com -< >- CFdeveloper is run by Russ Michaels, feel free to volunteer your help -<
