Skip to content

Commit

Permalink
Merge pull request #369 from 100312dog/esp_jpeg/swap_color_bytes
Browse files Browse the repository at this point in the history
[fix] add swap_color_bytes for rgb888. (IEC-160)
  • Loading branch information
igrr authored Oct 3, 2024
2 parents 1b47c98 + f7d38ee commit ddfc93b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion esp_jpeg/idf_component.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
version: "1.0.5~2"
version: "1.0.5~3"
description: "JPEG Decoder: TJpgDec"
url: https://github.com/espressif/idf-extra-components/tree/master/esp_jpeg/
dependencies:
Expand Down
2 changes: 1 addition & 1 deletion esp_jpeg/jpeg_decoder.c
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ static jpeg_decode_out_t jpeg_decode_out_cb(JDEC *dec, void *bitmap, JRECT *rect
(JD_FORMAT == 1 && cfg->out_format == JPEG_IMAGE_FORMAT_RGB565) ) {
/* Output image format is same as set in TJPGD */
for (int b = 0; b < ESP_JPEG_COLOR_BYTES; b++) {
if (JD_FORMAT == 1 && cfg->flags.swap_color_bytes) {
if (cfg->flags.swap_color_bytes) {
dst[(y * line * out_color_bytes) + x * out_color_bytes + b] = in[out_color_bytes - b - 1];
} else {
dst[(y * line * out_color_bytes) + x * out_color_bytes + b] = in[b];
Expand Down

0 comments on commit ddfc93b

Please sign in to comment.