How do you now optimise an image once it is in the correct format? Many programs are available (on the web already) to compress or reduce the number of colours used within an image.
JPEG compression works by reducing the number of pixels (or effectively merging neighbouring pixels) used to make up the image. It effectively reduces the resolution of the resulting image.
GIF compression works by reducing the number of colours of an image.
Various methods are used to reduce the palette including:
With the Nearest Colour method, Paint Shop Pro replaces the original colour of a pixel with the colour in the newly generated palette that is closest to its RGB value.
With Ordered Dither method, Paint Shop Pro adjusts adjacent pixels of different colours to give the illusion of a third colour. It uses set patterns based on a known palette to change the colour. This method can result in distinct patterns of light and dark areas.
With Error Diffusion method, Paint Shop Pro uses the most similar colour in the palette, but it spreads discrepancy between the old and new colour to the surrounding pixels. After it replaces a colour, it adds the "error," or discrepancy to the next pixel, before selecting the nearest colour. This process is repeated for every pixel in the image.
Below are two examples of how optimisation can benefit your web site:
![]() |
![]() |
| JPEG Image 1 (Not optimised. Original. Size: 21k) |
JPEG Image 2 (Optimised for web. Size: 15k) Saving: 29% |
![]() |
![]() |
| GIF Image 1 (Not optimised. Original. Size: 4.3k) |
GIF Image 2 (Optimised for web. Size: 3k) Saving: 21% |