A friend of mine asked if it was possible.
the following script takes two inputs
1.master image file.
test.jpg <-or whatever your master image is.
2.a text file with the sizes listed in pairs:
<height in pixels> <width in pixel>
Make sure that there is an empty line a the end of the file , only 1. more will give unwanted results..like I said error handling
will be done when I get to it.
usage: put the script and master image in a folder and run the script from the command.
Enter the master image file name:
What is the filename with the sizes?:
Changing test.jpg based on sizes.txt
[the script will output the transforms]
notes:absolute no error handling yet. will do once I get around to it.
works on Mac os X and should work on other linux systems.
#this will resize images
echo “Enter the master image file name:”
echo “What is the filename with the sizes?:”
echo “Changing $masterfile based on $sizefile”
while read line
echo “$line ”
cp $masterfile $destfile
sips -z $line $destfile
done < “$sizefile”
Shell script with sample size file:
Simple GUI based version:
–double click icon. (duhhh)
1.select master image
2.select text file with sizes.
3.select destination folder.
iOS icon generating size file :
usage:use with tools above.