How to improve the performance of g.drawImage() method for resizing images

后端 未结 12 1510
面向向阳花
面向向阳花 2020-11-27 11:16

I have an application where users are able to upload pictures in albums but naturally the uploaded images need to be resized so there are also thumbs available and the shown

12条回答
  •  暗喜
    暗喜 (楼主)
    2020-11-27 11:46

    If you want something fast, you're probably better with some native code, if you can give up on portability.

    But if you want a pure Java solution, you can try some other solutions as well, like Graphics2D.scale and Image.getScaledInstance. I've used them in the past, but can't remember which had better performance or better looking results, sorry.

    Try them out, and see which one best fits your needs.

提交回复
热议问题