Resizing images based upon overall resolution
Posted: 2009-02-26T19:08:04-07:00
Hi there!
Currently, I am running the following code to prepare images for use on Wikipedia (I run a bot, this script is called automatically).
Specifically, my issue is that people have now requested that instead of limiting the dimensions to 450px in any direction, I limit the overall amount of pixels (for example, limiting to 0.1 megapixels). I can't seem to find any documentation on this - is this function available using mogrify?
Thanks,
- Chris
Currently, I am running the following code to prepare images for use on Wikipedia (I run a bot, this script is called automatically).
Code: Select all
C:
del c:\DOCUME~1\Chris\Desktop\PNG\*.png /Q /F
del c:\DOCUME~1\Chris\NB\Done\*.png /Q /F
cd c:\Documents and Settings\Chris\NB\To do
mogrify -resize 450x450 *.*
xcopy c:\DOCUME~1\Chris\NB\TODO~1\* c:\DOCUME~1\Chris\NB\Done /I
del c:\DOCUME~1\Chris\NB\TODO~1\*.* /Q /F
xcopy c:\DOCUME~1\Chris\NB\Done\*.png c:\DOCUME~1\Chris\Desktop\PNG /I
cd c:\DOCUME~1\Chris\Desktop\PNG
optipng -o7 *.png
advpng -z4 *.png
sleep 10
xcopy c:\DOCUME~1\Chris\Desktop\PNG\*.png c:\DOCUME~1\Chris\NB\Done /I /R /Y
del c:\DOCUME~1\Chris\Desktop\PNG\*.png /Q /F
pause
Thanks,
- Chris