Many time for the existing images or new images you have to create a thumbnails. This can be achieved by using the Thumbnailator API. Please refer to the following code to create a thumbnail from the source image. You can specify the thumbnail size and also the background color. Documentation for the Thumbnailator can be found here. You can download the jar file from here.
Code to create thumbnail
Output of the above program is :
|
|
|
|
No comments:
Post a Comment