I'm installing it now. To test, I'll work on replacing each instance where I
use cfimage to manipulate a photo with cfexecute/cfimagemagick code.
Or if anybody wants to jump in, here is code I use to create a thumbnail.
The goal is to write a file that is the original filename prefixed with xs_
so test123.jpg would get uploaded, then used to create a new image called
xs_test123.jpg. (thats why there is an if/then asking if the xs_file
exists).
My guess is that all that needs to be changed is the 2nd instance of cfimage
where it actually writes the file. I'd assume using CFIMAGE to pull basic
info would be faster because it's part of OpenBD and doesn;t need to do a
cfexecute?
<CFIMAGE action="info"
srcfile="#cffile.serverdirectory#/#local_photo_file#">
<CFIF ((cfimage.width GT 100) OR (cfimage.height GT 90)) and NOT
FileExists("#cffile.serverdirectory#/xs_#local_photo_file#")>
<CFIF cfimage.width GT "#cfimage.height#">
<CFSET Size = "90">
<CFSET Percentage = Evaluate(Size / cfimage.width)>
<CFSET Percentage = Round(Percentage * 100)>
<CFELSE>
<CFSET Size = "100">
<CFSET Percentage = Evaluate(Size / cfimage.height)>
<CFSET Percentage = Round(Percentage * 100)>
</CFIF>
<CFIMAGE
srcfile="#cffile.serverdirectory#/#local_photo_file#"
destfile="#cffile.serverdirectory#/xs_#local_photo_file#"
action="edit"
width="#Percentage#%"
height="#Percentage#%"
uridirectory="NO"
>
</CFIF>
--
Open BlueDragon Public Mailing List
http://www.openbluedragon.org/ http://twitter.com/OpenBlueDragon
mailing list - http://groups.google.com/group/openbd?hl=en
!! save a network - please trim replies before posting !!