Jpegged out

It doesn't carry a health warning, but it really ought to. So how did the JPEG (Joint Picture Experts Group) file format, with its huge image-editing drawbacks, attain such widespread popularity?

The truth is that the JPEG has become a standard for the simple reason that you can adjust the level of compression applied either at source - tweaking the quality settings on your digital camera - or when you save the image in your editor. This is almost unique for any graphics format and is ideal for Web site pics or e-mail attachments. The holy grail of tiny file size is offered as long as you're prepared to accept a reduction in file quality.

But while JPEGs are fine for viewing and transmitting images, they're a disaster for editing. The powerful image compression algorithms may shrink files, but they also chuck away vast tracts of information every time you edit a document and save it as a JPEG.

Pause for thought

That's worrying, because most people edit an image far more than they think. Even simple actions, such as rotating or cropping then saving, can remove information. This is rarely conveyed to the user, who happily over-edits until the result is a pixelated apology for the original.

At last, this month, a tiny beacon of hope appeared. Among the functions to reduce image "noise" in Adobe Photoshop Elements 4.0 is a specific tool to help remove JPEG artefacts, those blocky imperfections and "halo" rings that appear in pictures that have been too heavily compressed. Perhaps too late to avoid the damage, but at least an acknowledgement of the problem.

Here's my real beef with JPEGs. Even if you save an image at the highest setting (which is never consistent between applications), it still degrades every time you edit the file and re-save it. This deterioration might be imperceptible to the naked eye at first, but after a few editing sessions, degradation adds up. In most image editors, even if you only adjust a tiny part of the image (for example, to apply a red-eye filter), JPEG compression is applied to every single pixel when you save it.

Why is the format so vicious? Simply because of the way it works. When you save in this format, the image is divided into independently encoded blocks, 8x8 pixels square, called macroblocks - see Figure 1. It performs compression algorithms on these, discarding values based on visual perception. The problem is that if you adjust an image, you adjust the arrangement of those blocks, so the calculation has to be repeated. The results will be different, and more information lost.

And it isn't only huge image adjustments that shift these blocks. Something as simple as cropping can move the block boundaries, which mucks up the way they are read. Only if you're careful to crop from the top or left of the image in multiples of the block size (for example, 16 pixels from the top left of the image) will the document remain unscathed.

Degrade escape

There are some other tricks to ensure that as little detail as possible is lost. In my experience, repeated saves don't affect file quality too much if you use exactly the same JPEG compression settings each time. Equally, some operations such as 90-degree rotations won't degrade the image, with the caveat that the image's dimensions must be a multiple of the file's block size (that is, eight or 16). In most untouched images, that's the case. But note that not every image-editing application supports lossless rotation - you can see a list of those that do at http://jpegclub.org/losslessapps.html. You'll notice a few big names missing.

Join the newsletter!

Or

Sign up to gain exclusive access to email subscriptions, event invitations, competitions, giveaways, and much more.

Membership is free, and your security and privacy remain protected. View our privacy policy before signing up.

Error: Please check your email address.
Keep up with the latest tech news, reviews and previews by subscribing to the Good Gear Guide newsletter.

Tom Gorham

PC Advisor (UK)
Show Comments

Father’s Day Gift Guide

Brand Post

Bitdefender 2019

Bitdefender’s best-in-class security solutions have been awarded Product of the Year. Get cybersecurity that 500 MILLION users already have and trust!

Most Popular Reviews

Latest Articles

Resources

PCW Evaluation Team

Luke Hill

MSI GT75 TITAN

I need power and lots of it. As a Front End Web developer anything less just won’t cut it which is why the MSI GT75 is an outstanding laptop for me. It’s a sleek and futuristic looking, high quality, beast that has a touch of sci-fi flare about it.

Emily Tyson

MSI GE63 Raider

If you’re looking to invest in your next work horse laptop for work or home use, you can’t go wrong with the MSI GE63.

Laura Johnston

MSI GS65 Stealth Thin

If you can afford the price tag, it is well worth the money. It out performs any other laptop I have tried for gaming, and the transportable design and incredible display also make it ideal for work.

Andrew Teoh

Brother MFC-L9570CDW Multifunction Printer

Touch screen visibility and operation was great and easy to navigate. Each menu and sub-menu was in an understandable order and category

Louise Coady

Brother MFC-L9570CDW Multifunction Printer

The printer was convenient, produced clear and vibrant images and was very easy to use

Edwina Hargreaves

WD My Cloud Home

I would recommend this device for families and small businesses who want one safe place to store all their important digital content and a way to easily share it with friends, family, business partners, or customers.

Featured Content

Product Launch Showcase

Don’t have an account? Sign up here

Don't have an account? Sign up now

Forgot password?