syoyo / tinydng

Header-only Tiny DNG/TIFF loader and writer in C++
MIT License
146 stars 30 forks source link

[Bug] failed to assign bits_per_sample when load decoded jpeg #33

Closed IzumiHoshi closed 1 year ago

IzumiHoshi commented 1 year ago

should add this line image->bits_per_sample = image->bits_per_sample_original; after https://github.com/syoyo/tinydng/blob/2bf9af18d2f7ce426e3c7b7ceeed04e7996153cb/tiny_dng_loader.h#L5548

or image->data will be resize to 0.

syoyo commented 1 year ago

@IzumiHoshi Good catch! Thanks! Fixed. Also added some size check of len.