Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Possible Duplicate:
Batch “resize” JPEG images to a fixed file size
fast batch image resizer

I have thousands of images (90 GB) mostly documents, and employee related stuff like passport copies..etc. Most of these documents are over sized and scanned in high DPI (300 or 200). Taking random samples the average size is 500KB-1MB per file and I could resize them or compress them to less than 100KB with little work even using MSPain. Is there any software that will help me in doing this job in an easier way since it is almost impossible to open them one by one and resize them.

share|improve this question

marked as duplicate by Breakthrough, BBlake, Dave M, Simon Sheehan, Dennis Jan 28 '13 at 16:41

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

why not store them on a compressed drive? Would be a lot easier than running a batch conversion. – Keltari Jan 27 '13 at 18:01
@Keltari not an option – user165733 Jan 27 '13 at 18:02
+1 for the MSPain typo. Heh, and because this is a good question. – Qqwy Jan 27 '13 at 23:32
@Breakthrough This is the data for less than 6 months. Its a huge archive.. long story short, I need to make things smaller... – user165733 Jan 27 '13 at 23:34

Imagemagick can resize images.

convert input.jpg -resize 600x600 output.jpg

Note that this will set a maximum size for each side, but will keep the aspect ratio. So a 1200x1000 image resized with the above command will be scaled to 600x500 pixels, while a 1000x1200 image will be resized to 500x600.

You can, of course, put this in a script. On bash, to convert every *.jpg in a directory to a 600x600 jpg:

for f in ./*.jpg; do convert "$f" -resize 600x600 "${f%.jpg}-resized.jpg"; done

To do the same recursively:

find . -type f -name *.jpg -exec bash -c 'convert "$0" -resize 600x600 "${0%.jpg}-resized.jpg"' {} \;

I don't know how to do those on the Windows command-line/batch script, but I do know it's possible.

If you wish to over-write your original files, you can use ImageMagick's mogrify command:

mogrify input.jpg -resize 600x600

This has the extra advantage of being able to use shell expansion, so you can resize every *.jpg in a directory without resorting to a for loop:

mogrify ./*.jpg -resize 600x600

To use it recursively, you would have to drop it into a find command, as with convert:

find . -type f -name *.jpg -exec mogrify '{}' -resize 600x600 \;
share|improve this answer
You should also look at the related command "mogrify" (a version of "convert"), which replaces the original file with the resized one, instead of creating a new resized file. Otherwise you might need to find a way to delete the originals afterwards. – Jost Jan 27 '13 at 22:19

Xnconvert (portable) can process thousands of images

In your case you can try

  • set a lower DPI
  • resize to a lower resolution
  • choose another file format
  • choose another compressing method

enter image description here

share|improve this answer

IrfanView would do the job for you. It has a "Batch Conversion/Rename" tool that you can do a lot of things with, including resizing.

From this tutorial on resizing images with IrfanView:

  1. Launch IrfanView and hit the B key. This takes you into batch mode.
  2. Add all files or entire folders to input files
  3. Change the output format and change the quality percentage
  4. use the Advanced option to resize all files

    enter image description here

Note that IrfanView is free for non-commercial use only.

share|improve this answer

FastStone Photo Resizer - easy and simple. Freeware, good GUI and a lot of options.

share|improve this answer
does it automatically detects a reasonable size for documents or do I have to set a fixed width/height? – user165733 Jan 27 '13 at 18:04
You can resize image based on one side (eg. long) and set output format (and eg image quality in jpg). As a result you get all photos with similar size. I can't imagine any other reasonable way to shrink size of multiple photos. – gglon Jan 27 '13 at 18:41