Bodmer / TJpg_Decoder

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

Option for More Data? #4

Closed Davarco closed 4 years ago

Davarco commented 4 years ago

Based on what I can tell from the lib, the decoder converts each RGB pixel to a uint16_t. This means that we can extract 5 bits of R data, 6 bits of G data, and 5 bits of B data. Is it possible to instead get the full 8 bits for all 3 colors, so RGB888 format?

Bodmer commented 4 years ago

Yes, just change the tjpgd.h parameter here to 0. You will need to change the buffer to 8 bit pointer type here and also in the sketch callback.

You will then get 3 bytes per pixel.