Simple clear advice in plain English

Hands on: Compress images without losing quality

Minimise the destructive potential of saving your images as JPEGs

What about first-generation copies? There are plenty of situations where you only have a JPEG to work with and you need to edit it and resave as a JPEG. Providing the original hasn’t had a high degree of JPEG compression applied and you save the edited version using a high-quality, low-compression JPEG setting, you’d be hard pressed to see any difference.

To test the resilience of images to multiple iterations of the JPEG compression algorithm I subjected a test file to multiple saves with different compression settings and compared the results. My test file was an uncompressed eight-bit TIFF file produced from a camera Raw original.

I opened the TIFF in Photoshop and resaved it, using Save As and selecting JPEG as the file type. For the first test I used a quality setting of 10, which gave a 260KB file from the 1.1MB original, a compression factor of around four times. I saved the file 10 times, then compared it to the TIFF original.

The archetypal JPEG compression artefacts are blocking and haloing. Blocking describes unwanted colour differences in groups of neighbouring pixels and is usually most obvious in areas of flat colour. Haloing is manifested as a ring of light or dark coloured pixels surrounding contrasting detail and is the main reason for avoiding JPEG compression on images containing text.

Not only was I unable to spot any differences between the original TIFF and the tenth-generation JPEG copy, when I continued saving until I’d reached a one-hundredth generation copy it was still impossible to see any difference.

Increasing the degree of compression by lowering the quality setting to five produced a file size of 148KB. There was still no discernible difference between the tenth-generation JPEG file and the original, but by the one-hundredth iteration there was some evidence of blocking.

Finally, I reduced the quality setting to one, producing a 116KB file which, by the tenth iteration was looking ropey, but didn’t get much worse by the one-hundredth.

What these simple tests show is just how good JPEG compression is at reducing file sizes without noticeable loss in quality. At the higher end of the quality scale you can save a JPEG many times over with no apparent loss in quality. Even at medium compression settings you don’t need to worry too much about quality loss.

Reader Comments

   

Add your comment

All fields must be completed. Your email address will not be displayed or used to send marketing messages.

All messages will be checked by moderators before appearing on the site.

See our Privacy Policy for more information.

Related articles

Resize images illustration

Resize or convert multiple images to a different format automatically

Irfanview uses an automation feature called batch processing to change multiple images to a different size, format and name far faster than it would take manually

Serif Photoplus X5

Serif Photoplus X5: photo-editing software

Serif’s image editor adds organiser and project templates

Make your own animations illustration

Create a stop-motion cartoon

Stop-motion animation can unleash your inner Nick Park. We show you how to bring static objects to life by making your own Wallace and Gromit-style video

Question & Answer

Q.Why are some of the keys on my keyboard doing strange...

> Read the answer

Q.Is my phone’s Bluetooth any use?

> Read the answer

Q.Can I switch boot drives so that I can work on older...

> Read the answer

Best deals on the web

img

Samsung RV520-A07

£359.98- Buy it now

img

Acer Aspire 5750G (LX.RXP02.019)

£399.99- Buy it now

img

Apple MacBook Pro (MD313B/A)

£904.37- Buy it now

Latest issue & subscription deals

Poll

Are you concerned about viruses that target mobile phones?

Jargon Buster

Computing terms explained in plain English

Virtual drive

A set of files seen by Windows as a separate hard disk.

Great shopping deals from Computeractive