Re-sizing an image without losing quality

前端 未结 9 1431
温柔的废话
温柔的废话 2020-11-29 01:45

I made this code to resize images with two factors. It works, but the quality of image is very bad after it is resized! Can you help me?

This is the code

<         


        
9条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-29 02:11

    None of the answers will help you to get real quality you desire. Include thumbailator.jar in your project (download it form here):

    https://code.google.com/p/thumbnailator/

    https://code.google.com/p/thumbnailator/wiki/Downloads?tm=2

    Then upload the image first (as file, without Thumbnailator - it's use is to create thumbs, but you can create large images with it of course), and resize it to every dimensions you want (with Thumbnailator 800x600 for example). Quality will be very good. I was searching for this long time, this .jar helped me to achieve what i want.

提交回复
热议问题