JPEG is far simpler. It divides the image into 8x8 pixel blocks, and processes each using a Discrete Cosine Transform. The results are quantised and then encoded. The quality is fixed by the encoder.
JPEG2000 uses a 2D wavelet function, the output of which is four "images", each a quarter the size of the original. One of those is actually an image, while the others are high-frequency components that can be added to it to re-construct the full-resolution image. The wavelet process may be repeated multiple times. The result is a tiny image, and a series of high frequency components that may be combined with it. Each resulting component is quantised and encoded.
JPEG is fine for high quality and modest compression, which is why it is still very widely used.
JPEG2000 offers several advantages:
- To achieve very high compression, it is possible to throw away or heavily quantise the high frequency components. This gives a poor quality - but usable - image where JPEG would fail completely.
- Images can be re-constructed progressively at ever improving quality. This can be either in terms of increasing resolution or bit depth as required.
- It supports the JPIP protocol for progressively transmitting images to a client. The client may retrieve low-resolution thumbnails and then just the parts of the image they want at better resolutions.