Bodmer / TJpg_Decoder

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

Issues: getSdJpgSize(...) not return true result #6

Closed thaivankhanh closed 4 years ago

thaivankhanh commented 4 years ago

Hi, Bodmer

I'm using getSdJpgSize(&w, &h, filename) to get width and height of an jpeg image in my SD but it always return zero. I have checked TJpg_Decoder.cpp and found this at line 524: _in function JRESULT TJpg_Decoder::getSdJpgSize(uint16_t w, uint16_t h, File inFile)_

524: jpg_source = TJPG_FS_FILE;

I think it should be: jpg_source = TJPG_SD_FILE;

I've changed that and it work fine;

Thanks for your great library!

Bodmer commented 4 years ago

Fixed, thanks for pointing this out.