What is the fastest way to convert 50 PNGs to JPGs in Ubuntu?

1

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?

Matthew

Posted 2009-12-05T20:25:55.020

Reputation: 11 686

Question was closed 2009-12-06T14:28:30.307

Duplicate: http://superuser.com/questions/71028/batch-converting-png-to-jpg-in-linux

– Stephen Jennings – 2009-12-05T20:31:50.907

Sorry about that. I made a new question that is not a duplicate: http://superuser.com/questions/79287/how-do-i-control-the-compression-rate-of-mogrify

– Matthew – 2009-12-05T20:35:44.580

Answers

2

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.

Mokubai

Posted 2009-12-05T20:25:55.020

Reputation: 64 434