We support and host an EMR for several medical practices; these practices scan images into this software stored as flat files (TIFF mostly). Due to poor user training (people scanning text pages as full color images...), and other factors, we are facing a storage issue due to the size and number of images scanned.

Without going into too much detail, I have been tasked with finding a method of reducing existing file sizes without sacrificing too much resolution.

I have done this before using Irfanview's batch file operations - I converted about a million images from JPEG to TIFF Black & White - the process was fast (comparatively speaking), but still took several days.

I am looking at a total of 11,000,000 files totaling about 2 Terabytes of space, but it is growing rapidly.

I couldn't find any posts about re-sizing/compressing this many files - What is the best utility / script to handle a task like this?


closed as off-topic by and31415, a CVn, Kevin Panko, random Aug 20 '14 at 2:54

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions seeking product, service, or learning material recommendations are off-topic because they become outdated quickly and attract opinion-based answers. Instead, describe your situation and the specific problem you're trying to solve. Share your research. Here are a few suggestions on how to properly ask this type of question." – and31415, a CVn, Kevin Panko, random
If this question can be reworded to fit the rules in the help center, please edit the question.

  • If the plain text pages were identified and OCR software was used to convert them to .doc or word documents you could save a bunch of space. – cybernard Aug 15 '14 at 19:59
  • What OS windows,linux,mac? – cybernard Aug 15 '14 at 20:02
  • Question 4TB and 6TB hard drives are easy to come by why not get a couple of them. You could put 5 or more 6tb hard drives in a raid array and way more storage than you do now. I picked up a 4tb hard drive for $170 and that was without trying to comparison shop. – cybernard Aug 15 '14 at 20:14

I'm a fan of GraphicsMagick (aka ImageMagick)

Here's an example of resizing images, putting the new ones in a separate directory:

cd public_html/images/thumbs
mogrify -resize 16x12 -quality 100 -path ../new-thumbs *.jpg

Here's how to convert images into a different format -- but it'll zap the originals:

mogrify -format tiff *.jpg
  • Best answer for this specific situation (mass conversion) - I modified a powershell script that uses Imagemagick to convert, recursively. It includes a file size check and color depth check, as well as logging. – Aron Aug 21 '14 at 20:08

Not the answer you're looking for? Browse other questions tagged or ask your own question.