WebDevelopersNotes logo

home-icon Home / Graphics / How do I optimise JPGs?

How do I optimise JPGs?

How do I optimise JPGs?

The methods and techniques used in optimizing JPG images are very different from Gif optimization because the compression algorithms of the two image formats work differently.

In short, JPG compression involves a loss of details, i.e. some color pixels are replaced by other colors. This loss is recoverable, which means that once an image is saved as a JPG, you cannot retrieve the original information. So the main issue in optimizing JPGs is in decreasing their file size as well we preserving the quality of the image.

Sponsored Links

JPG compression algorithm also does a better job of optimizing the complex parts of an image. This aspect was presently briefly in When to use JPGs and in this article we will take a look at a software that I have found very useful in optimizing JPGs.

To know more about how the file size of Gif images can be decreased, I suggest you go through the article on Optimizing Gifs [This is a four page thorough tutorial on Gif optimization]. This article also points out why images for the web need to be highly optimized.

JPEG Optimizer

JPEG OptimizerJPEG Optimizer is a wonderful program available at www.xat.com. I recommend it to any serious web designer (developer) interested in slimming down the file sizes of JPG images. With other image programs such as PhotoShop, FireWorks, Paint Shop Pro etc. you specify compression over the entire image. However, with JPEG Optimizer you can apply different levels of compressions to different areas. This is excellent if your image has some areas of high detail that you want to preserve. Also, the program allows a real time check on file size. I love this feature!
Finally, you can select image areas using rectangular selections, line selections or free hand selection. The program is very simple to use and you’ll be creating those really small (sizes!) JPEGs in no time at all.

Let us now look at an example.

JPG image saved on PhotoshopImage saved on PhotoShop with quality 4
14599 bytes

Using JPEG OptimizerAfter using JPEG Optimizer on the above image
6041 bytes
A reduction of 8558 bytes! Almost 59% reduction.

JPGs and Greyscale

Greyscale images contain 256 shades of grey (white and black included).
It is advisable to store a black and white image as greyscale. There is always a saving of some bytes. Actually, when you scan B/W photos, you should always convert them to greyscale images.

16.7 million color jpg image16.7 million color image
9136 bytes

Greyscale jpg imageGreyscale image
8905 bytes

All standard programs allow you to change the image mode of an image to greyscale. The option will be present in the Color, Image or equivalent menu.

Sponsored Links

Your comments
Star icon IMPORTANT Have a question / problem? Click here to ask an expert.

If it's on the Internet, it must be true.

Sponsored Links

Tips

How do I view a deleted web page?
Is there a way to view a deleted web page - one that is no longer available? Yes there is and the solution is quite simple. [more...]

Fact

The email message in which Marc Andreessen announced the release of NCSA X Mosaic browser hasn't been lost in time. It still exists! Though there were other web browser before it, Mosaic is generally credited to have made the "WWW explosion". [more...]

We use cookies to give you the best possible website experience. By using WebDevelopersNotes.com, you agree to our Privacy Policy