# TJpgDec - Tiny JPEG Decompressor

TJpgDec is a generic JPEG image decompressor module that highly optimized for small embedded systems. It works with very low memory consumption, so that it can be incorporated into tiny microcontrollers, such as AVR, 8051, PIC, Z80, Cortex-M0 and etc.

#### Features

- Platform independent. Written in plain C (C99).
- Easy to use master mode operation.
- Fully re-entrant architecture.
- Configurable optimization level for both 8/16-bit and 32-bit MCU.
- Very small memory footprint:
  - 3.5K bytes of RAM for work area independent of image dimensions.
  - 3.5-8.5K bytes of ROM for text and constants.
- Output format:
  - Pixel format: RGB888, RGB565 or Grayscale pre-configurable.
  - Scaling ratio: 1/1, 1/2, 1/4 or 1/8 selectable on decompression.

### Application Interface

There are two API functions to analyze and decompress the JPEG image.

- jd_prepare - Prepare decompression of the JPEG image
- jd_decomp - Execute decompression of the JPEG image

### I/O functions

To input the JPEG data and output the decompressed image, TJpgDec requires two user defined I/O functions. These are called back from the TJpgDec module in the decompression process.

- Input Funciotn - Read JPEG data from the input stream
- Output Function - Output the decompressed image to the destination object

### Resources

The TJpgDec module is a free software opened for education, research and development. You can use, modify and/or redistribute it for personal projects or commercial products without any restriction under your responsibility.

- Getting Started: TJpgDec Application Note
- Download: Archives
- TJpgDec highly optimized for ESP32 MCUs by lovyan03 ↗

Return