Created
March 19, 2013 12:53
-
-
Save jbuda/5195861 to your computer and use it in GitHub Desktop.
CF resize and save image
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<cfdirectory action="list" directory="#expandPath('/imgs')#" name="imgs" filter="*.jpg" /> | |
<cfoutput query="imgs"> | |
<cfimage source="#directory#/#name#" name="img" /> | |
<cfset ImageGrayscale(img) /> | |
<cfset imageScaleTofit(img,200,'') /> | |
<cfimage source="#img#" action="write" destination="#expandPath('/finalimages/')##listFirst(name,'_')#.jpg" overwrite="no" /> | |
<cfflush> | |
#name# done <br/> | |
</cfoutput> | |
<br/> | |
all done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment