2021年3月31日星期三

Reduce jpeg file to specific size in Java [closed]

There are many packages in Java that enable you to reduce the size of a jpeg file. They typically use a quality factor to determine the amount of reduction. That doesn't work for me. These days there is such a wild swing of picture sizes that the quality factor is very picture-by-picture dependent. I know that, for my purposes, a 200K file should be fine. So, I need something that takes an image anywhere from 300K to 20MB and turns it into (roughly) a 200K file. Is there a library I can use for this?

https://stackoverflow.com/questions/66897184/reduce-jpeg-file-to-specific-size-in-java April 01, 2021 at 09:06AM

没有评论:

发表评论