How do you create a thumbnail image out of a JPEG in Java?

后端 未结 13 2292
日久生厌
日久生厌 2020-11-29 16:51

Can someone please help with some code for creating a thumbnail for a JPEG in Java.

I\'m new at this, so a step by step explanation would be appreciated.

13条回答
  •  攒了一身酷
    2020-11-29 17:25

    I have gone through a blog according to which you have following options -

    1. For simple RGB files use ImageScalr . ImageIO class is used for reading files and ImageScalr to create thumbnails
    2. For supporting RGB + CYMK, use ImageIO and JAI (Java Advanced Imaging) API for reading files and ImageScalr to create thumbnail.
    3. In case you don’t know what file formats, color mode you are going to deal with, safest option is to use ImageMagick.

    Here is link that gives a complete answer with code snippets.

提交回复
热议问题