gen2brain / cbconvert

CBconvert is a Comic Book converter
GNU General Public License v3.0
176 stars 11 forks source link

Converted file larger than original #28

Open JustALooker666 opened 1 month ago

JustALooker666 commented 1 month ago

Hello

Not sure if this is an issue or not, but when downsizing JPEG images (eg. from 1882x2512px [747kb] to 1534x2048 [1.88Mb]), I get files almost 3x larger than the original one. I only tried "Linear" 100% quality but getting the same results with other filters.

gen2brain commented 1 month ago

Hello,

That 100 quality is the issue. There is also not much point in trying to increase the quality of the lossy format, if you had PNG or TIFF that would be ok. Also, some formats will enable lossless when the quality is 100, but not JPEG, it will just create huge files. Try to lower the quality to default 75, or 85. The selected filter affects the rescaling quality and will affect the speed of the conversion.

I plan to add https://github.com/gen2brain/jpegli instead of the default image/jpeg encoder, which should help with smaller file sizes.

JustALooker666 commented 1 month ago

I see and thanks for the tip. Just tried with Linear/75 and the quality seems the same as 100 and the output filezise is 4-5x smaller.

gen2brain commented 1 month ago

Yeah, most applications will have a default quality of 75, some 85, so your original files are not 100 for sure.