Java - resize image without losing quality

前端 未结 7 1662
轮回少年
轮回少年 2020-11-29 15:48

I have 10,000 photos that need to be resized so I have a Java program to do that. Unfortunately, the quality of the image is poorly lost and I don\'t have access to the unco

7条回答
  •  长情又很酷
    2020-11-29 16:33

    After days of research i would prefer javaxt.

    use Thejavaxt.io.Image class has a constructor like:

    public Image(java.awt.image.BufferedImage bufferedImage)
    

    so you can do (another example):

    javaxt.io.Image image = new javaxt.io.Image(bufferedImage);
    image.setWidth(50);
    image.setOutputQuality(1);
    

    Here's the output:

提交回复
热议问题