JPEG Baseline Encoder

This baseline uses an encoding scheme based on the Discrete Cosine Transform (DCT).
Updated 1 May 2013

View License

The JPEG compression scheme is divided into the following stages:
1. Transform the image into an optimal color space.
2. Adjust Aspect Ratio 16:9
3. Digitization Scheme 4:2:0.
4. Apply a Discrete Cosine Transform (DCT) to blocks of pixels, thus removing redundant image data.
5. Quantize each block of DCT coefficients using weighting functions optimized for the human eye.
6. Encode the resulting coefficients (image data) using a Huffman variable word-length algorithm to remove redundancies in the coefficients.
7. Byte Stuffing.
8. Header JFIF
9. JPG Data Store

Cite As

Jorgenhoc (2024). JPEG Baseline Encoder (, MATLAB Central File Exchange. Retrieved .

MATLAB Release Compatibility
Created with R2012a
Compatible with any release
Platform Compatibility
Windows macOS Linux

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!


Version Published Release Notes

Including comments of the JFIF header.