How to put JPEGs on a diet?

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
yogiyang
Posts: 5
Joined: 2013-08-13T05:21:01-07:00
Authentication code: 6789

How to put JPEGs on a diet?

Post by yogiyang »

Hello,

I have a collection of around 10k photos snapped in various Mega Pixels starting at 4 mp to 16 mp.

I also have a few 300 dpi images that are created using professional image editors like Photoshop.

The file are mostly in .jpg format. But their sizes are quite large. Say for example some files are as big as 45 MB and above.

I want put all these JPEGs on a diet without any visible quality loss and resolution loss.

I tried to use IM for this but could not get much size reduction.

How can I get IM to reduce the file size without changing an image's size (dimensions), resolution (dpi) and color mode (RGB).

TIA

Yogi Yang
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: How to put JPEGs on a diet?

Post by snibgo »

Changing resolution (dpi) will make no difference to the size in bytes.

If you don't want to reduce the number of pixels, try this:

Code: Select all

convert in.jpg -quality 2 out.jpg
This will be small, but horrible quality. Pick a number closer to 100 for better quality but larger.
snibgo's IM pages: im.snibgo.com
yogiyang
Posts: 5
Joined: 2013-08-13T05:21:01-07:00
Authentication code: 6789

Re: How to put JPEGs on a diet?

Post by yogiyang »

Thanks Snibgo.

I have already tried that out. The output looks really very bad when compared to original.

What I want to achieve is without visible quality loss also.

TIA

Yogi Yang
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: How to put JPEGs on a diet?

Post by snibgo »

You can start at "-quality 2" and increase the number until you can't see any visible quality loss. Or start at 100 and work down until quality loss becomes visible.
snibgo's IM pages: im.snibgo.com
Post Reply