Mass rescaling of PNGs
I have a bunch of PNG files that I want to rescale.
Oversimplifying a little, let's say I have files named:
and so on, and I want to make:
- apple.png
- orange.png
- pear.png,
and so on, with the output files all at half the scale of the corresponding input files.
Is there a good tool for that?
I have about 200 input files, so preferably the whole process would be automated.
EDIT: I'm on a mac.
Yep as mentioned by Ignacio, the convert function from ImageMagick can do so.
If you have access to a Unix based shell, e.g. Linux or Mac terminal, something like this will do:
cd folder-with-the-png-files
for i in *.png; do convert $i -resize 50% ${i/.png/}.resized.png; done
The above command will resize all the images in the folder and save them as xxx.resized.jpg.
Note however, that you may need to install ImageMagick first...
ImageMagick's convert
can do this. Just use your shell's facilities for looping over a set of files.
If you're still on Windows XP, you can use Image Resizer.
On Windows 7, there's a similar tool.
I like using the free Irfanview for this. It has in the same batch convert dialog a batch renamer (which can use variables for advanced renaming) and batch converter. Just hit "b" key when you open Irfanview, or select from File top menu. You can also use a command line mode if wish so.
In batch dialog, if you click on Advanced Options you can there do many operations to add to your batch, like for example, batch rescale in many ways, and ideally with lanczos algorythm selected (great quality). You can add a sharpen filter, etc.