collicalex / JPEGOptimizer

Reduce jpeg size without lossing visual quality!
https://collicalex.github.io/JPEGOptimizer/
39 stars 6 forks source link

Missing huffman code table entry #4

Open ErShakirAnsari opened 4 years ago

ErShakirAnsari commented 4 years ago

I'm facing below exception when executed this command:

java -Xmx1024m -jar JPEGOptimizer.jar

exception

glosterva commented 4 years ago

I'm having the same issue with 2048m

t-ja commented 4 years ago

I had the same problem. Seems to appear with some kinds of source files. Added a fix in my pull-request: if (iwParam instanceof JPEGImageWriteParam) { JPEGImageWriteParam jpegImageWriteParam = (JPEGImageWriteParam) iwParam; jpegImageWriteParam.setOptimizeHuffmanTables(true); } The EXIF-data are not affected by that change, as far as I could verify.