Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

Possible Duplicate:
Batch converting PNG to JPG in linux

I have about 50 PNGs that are about 10Mb each (fully compressed). I want to convert them to JPGs with maximum quality, so that they fall just under Facebook's 5Mb limit. I can manually convert each one in the GIMP, but this seems like a bit of a pain. Is there an easy way to convert them all at once?

Edit: mogrify -format jpg *.png seems to be pretty much what I'm looking for. However, it compresses to around 1.5mb. When I select maximum quality in GIMP, it saves them at around 4mb. Is there a way to control the compression rate with mogrify?

share|improve this question

marked as duplicate by Matthew, Phoshi, Diago Dec 6 '09 at 14:28

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.

    
Duplicate: superuser.com/questions/71028/… –  Stephen Jennings Dec 5 '09 at 20:31
    
Sorry about that. I made a new question that is not a duplicate: superuser.com/questions/79287/… –  Matthew Dec 5 '09 at 20:35

1 Answer 1

up vote 2 down vote accepted

Try mogrify -format jpg -quality 90 *.png and the pictures should come out a lot smaller.

The "quality" number is a 0 - 100 integer value where 0 is worst and 100 is best, chances are mogrify defaults to 100 hence the large file sizes. 90 is a good point to start at as it compresses quite well and you'll be able to see almost no difference to the original image. Below around 75 you'll probably start to see artifacts and poor quality, depending on your eyesight and personal aesthetic.

share|improve this answer

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