Figure 12.3: The JPEG compression algorithm
For more details on the JPEG algorithm, see the compression faq.