Bodmer / TJpg_Decoder

Jpeg decoder library based on Tiny JPEG Decompressor
Other
228 stars 43 forks source link

fix grayscale output #68

Closed pcnimdock closed 11 months ago

pcnimdock commented 1 year ago

This fix enables the acquisition of Y for JD_FORMAT = 2 (output in grayscale). The usage for this format is as follows:

In tjpgd.h JD_FORMAT = 2

In main.c tft_output_callback(int16_t x, int16_t y, uint16_t w, uint16_t h, uint16_t bitmap) { uint8_t pixels_array = (uint8_t *) bitmap; .... }

Bodmer commented 1 year ago

I see there is a patch here from the author of the decoder: http://elm-chan.org/fsw/tjpgd/patches.html

I will update in accordance with that patch as it looks to be equivalent.

Bodmer commented 11 months ago

Patch added from here: http://elm-chan.org/fsw/tjpgd/patches.html