fhanau / Efficient-Compression-Tool

Fast and effective C++ file optimizer
Apache License 2.0
596 stars 41 forks source link

JPG: Missing Huffman code table entry #102

Closed krishty closed 2 years ago

krishty commented 2 years ago

With the latest version 0.9.2 on Windows, most JPGs fail to optimize due to the error Missing Huffman code table entry.

Version 0.9.1 compiled on May 31 2022 has no problems optimizing them. Sample file attached:

ECT_x64.exe -progressive missing-huffman-code.jpg

missing-huffman-code

fhanau commented 2 years ago

I can reproduce the issue using wine, but I have no idea why it happens. There are no such issues on mac and have been no changes to JPEG since 0.9.1 except for fixing a warning and small build system changes. I will see if I can create a fresh binary that also has this issue, perhaps I can pin down the issue.

fhanau commented 2 years ago

Thanks for the report! Turns out the issue was solely with the binary as I failed to clean the mozjpeg directory before cross-compiling, the code itself is fine. I have provided an updated binary on the release page, it does not have any issues with the provided file.

bakugo commented 2 years ago

@fhanau Please don't re-upload new binaries under the same release, it breaks installation via scoop since it doesn't expect the release assets to change after they're released, and is generally considered bad practice anyway. Just release a new version.

fhanau commented 2 years ago

Ok, I'll keep that in mind for the future. With this fix, it was a problem with just the binary and not the code itself, but for the hotfix for 0.9.3 it certainly makes sense too.