richgel999 / jpeg-compressor

C++ JPEG compression/fuzzed low-RAM JPEG decompression codec with Public Domain or Apache 2.0 license
210 stars 57 forks source link

JPEG decoder failing on images exported from Adobe Light Room #20

Open mansant opened 3 years ago

mansant commented 3 years ago

Unfortunately the jpeg decoder seems to be having problems with jpeg images exported from Light Room. Attached is a sample jpg which exhibits the issue. The "jpgd" decoder cannot process it, but "stbi_load" works correctly on it. I may eventually find the time to fix it myself, but if somebody gets to it quicker than I can, that would be awesome...

pexels-fiona-art-3631430-2-LR

[Console output] C:\Users\gerai\source\repos\jpeg-compressor\bin>jpge.exe -d pexels-fiona-art-3631430-2-LR.jpg lr.tga jpge/jpgd example app Using jpgd::decompress_jpeg_image_from_file Failed loading JPEG file "pexels-fiona-art-3631430-2-LR.jpg"!

C:\Users\gerai\source\repos\jpeg-compressor\bin>jpge.exe -d -s pexels-fiona-art-3631430-2-LR.jpg lr.tga jpge/jpgd example app Using stbi_load Source JPEG file: "pexels-fiona-art-3631430-2-LR.jpg", image resolution: 3648x2736, actual comps: 3 Decompression time: 841.441ms Wrote decompressed image to TGA file "lr.tga" Success.