komakai / libjpeg-turbo

Main libjpeg-turbo repository
Other
2 stars 1 forks source link

Corrupt JPEG data: bad Huffman code #5

Closed davicezhu closed 2 years ago

davicezhu commented 2 years ago

when i run tjbench.exe .\progressive.jpg -bmp, got err msg below:

JPEG 4:4:4 --> BGR (Top-down) <<<<< Image size: 40 x 40 ERROR in line 176 while executing tjDecompress2(): Corrupt JPEG data: bad Huffman code

progressive.jpg is a normal progressive jpeg made by ps . it also not work with other progressive jpegs, but work if change to undef LOWMEM_PROGRESSIVE_DECODE. i debuged project and got warning in jpeg_huff_decode . if (l > 16) { WARNMS(state->cinfo, JWRN_HUFF_BAD_CODE); return 0; / fake a zero as the safest result / }

i run the project with vs2019 , win10 and CMake 3.22.2

progressive

komakai commented 2 years ago

@davicezhu I have rebased onto the latest upstream libjpeg-turbo and tested the image - worked OK for me. Please note the new default branch is now main. I have left the old default branch master as is.

davicezhu commented 2 years ago

thanks for your reply. it caused by platform setting with x64 . when i changed to win32 , it worked ok .