Hi guys,
I’m converting JPGs into PNGs.
I’m using your basic code for conversion and I’m not applying any optimizations or setting any resolution properties and all the outputs have a very high file size.
Why does it happen? I tested different inputs from different devices and sources and every time the conversion lib is generating a very big output. I know that the default DPI is 96 and some of the photos have a much higher DPI, but still they are converted to a heavy weight file. This is very weird.
I’m running latest version 21.10.1 on Windows 10 Pro. Java 11 OpenJDK.
Here are some examples (I added the actual file size as it appears by Windows’s file system:
- INPUT input1.jpg (908.1 KB) FileSize = 1,227KB.
OUTPUT output1.jpg (1.3 MB) FileSize = 8,651KB. - INPUT input2.jpg (1.8 MB) FileSize = 1,800KB.
OUTPUT output2.jpg (1.6 MB) FileSize = 9,406KB. - INPUT input3.JPG (928.6 KB) FileSize = 2,945KB.
OUTPUT output3.jpg (1.0 MB) FileSize = 7,696KB.
You can see for yourself that the output file has a much larger file size.
One of AWS’s services that I’m using to processes the outputs (PNGs) is limited to image files of 10MB but almost all outputs are much bigger.
Can you please help me? What is the reason for this?
Thank you very much