Skip to content

Commit 5af4963

Browse files
author
linxu
committed
blog: update esp_new_jpeg features and describe differences from esp_jpeg
1 parent fe3d57c commit 5af4963

File tree

1 file changed

+36
-1
lines changed
  • content/blog/2025/09/esp-new-jpeg-introduction

1 file changed

+36
-1
lines changed

content/blog/2025/09/esp-new-jpeg-introduction/index.md

Lines changed: 36 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
---
22
title: "Introducing ESP_NEW_JPEG: An Efficient JPEG Encoder and Decoder"
33
date: 2025-09-17
4+
lastmod: 2025-11-06
45
showAuthor: false
56
authors:
67
- lin-xu
@@ -44,7 +45,7 @@ ESP_NEW_JPEG supports baseline profile JPEG encoding and decoding. Features such
4445
Basic features supported by the encoder:
4546

4647
- Support encoding for any width and height
47-
- Support pixel formats: RGB888, RGBA, YCbYCr, YCbY2YCrY2, and GRAY
48+
- Support pixel formats: RGB888, RGBA, RGB565(big endian), RGB565(little endian), YCbYCr, YCbY2YCrY2, CbYCrY and GRAY
4849
- When using the YCbY2YCrY2 format, only YUV420 and Gray subsampling are supported
4950
- Support YUV444, YUV422, YUV420, and Gray subsampling
5051
- Support quality settings in the range of 1-100
@@ -264,6 +265,40 @@ void user_logic()
264265
}
265266
```
266267

268+
## ESP_NEW_JPEG vs ESP_JPEG Comparison
269+
270+
Two JPEG libraries are available for different use cases: [ESP_NEW_JPEG](https://components.espressif.com/components/espressif/esp_new_jpeg) and [ESP_JPEG](https://components.espressif.com/components/espressif/esp_jpeg). Understanding the differences between these libraries can help you choose the most suitable one for your project.
271+
272+
ESP_NEW_JPEG is a feature-complete and performance-optimized JPEG codec library that supports both encoding and decoding, along with advanced image processing capabilities. ESP_JPEG is a lightweight decoder library based on the Tiny JPEG Decompressor (TJpgDec), focusing on minimal memory consumption and simplicity.
273+
274+
The following table provides a detailed comparison of the two libraries:
275+
276+
| Feature | ESP_NEW_JPEG | ESP_JPEG |
277+
|------------------|--------------------------------------------------------|-------------------------------------------------------------------------|
278+
| Encoding | ✅ Supports multiple formats | ❌ Not supported |
279+
| Decoding | ✅ Advanced features (scale, clipper, rotate) | ✅ Basic decoding with fixed scaling |
280+
| Pixel Formats | RGB888, RGBA, RGB565, YCbYCr, YCbY2YCrY2, CbYCrY, GRAY | RGB888, RGB565 |
281+
| Image Processing | ✅ Scale, clipper, rotate (0°, 90°, 180°, 270°) | ✅ Fixed scaling ratios (1/1, 1/2, 1/4, 1/8) |
282+
| Block Mode | ✅ Both encoder and decoder | ❌ Not supported |
283+
| ROM Support¹ | ❌ Not available | ✅ Available on ESP32, ESP32-S3, ESP32-C3, ESP32-C6, ESP32-C5, ESP32-C61 |
284+
| API Complexity | Handle-based, more features | Simple API |
285+
| Performance | Higher throughput | Lower memory footprint |
286+
287+
> ¹ "[ROM Support](https://components.espressif.com/components/espressif/esp_jpeg/versions/1.3.1/readme#tjpgdec-in-rom)" indicates whether the JPEG library is built into the chip’s ROM. A ROM-based implementation helps reduce Flash usage.
288+
289+
When to choose ESP_NEW_JPEG:
290+
291+
- You need JPEG encoding functionality
292+
- You need higher performance
293+
- Your application requires advanced image processing features (rotation, custom scaling, clipper)
294+
- You want to support multiple pixel formats
295+
296+
When to choose ESP_JPEG:
297+
298+
- You only need JPEG decoding functionality
299+
- Memory usage is a critical constraint
300+
- You're using chips with ROM support and want to save flash space
301+
267302
## Conclusion
268303

269304
ESP_NEW_JPEG is a lightweight JPEG encoding and decoding library deeply optimized for the ESP32 series chips, offering efficient image compression and decompression capabilities. The library supports various features, including rotation, clipping, scaling, and block mode, enabling flexible handling of image data processing requirements in different application scenarios. We look forward to your experience with ESP_NEW_JPEG in practical applications and welcome your valuable feedback to help us continuously optimize and enhance the library's performance and features.

0 commit comments

Comments
 (0)