bitbank2 / JPEGDEC

An optimized JPEG decoder for Arduino
Apache License 2.0
365 stars 47 forks source link

Failed decode JPEG file saved from MacOS Preview App #54

Closed moononournation closed 1 year ago

moononournation commented 1 year ago

I have resized an image by MacOS Preview App and then save to JPEG file, it cannot decode by JPEGDEC. 240

However, if I use ImageMagick tools convert it again, it can decode:

convert -i 240.jpeg converted.jpeg

converted

bitbank2 commented 1 year ago

Check the return codes :) Your original converted image uses progressive encoding which is not supported by JPEGDEC. Only baseline Huffman is supported. There are 4 possible encodings (Progressive/Baseline, Huffman/Arithmetic).