I would like to know if I can generate thumbnail with proper aspect ratio for an image in Java without using any third party libraries. If not then kindly suggest a fast and efficient open source library to generate thumbnails with proper aspect ratio.
With proper aspect ratio I mean if the image is very large lets say 1900 X 1080
, then the thumbnail should not just be a resized version of the original image (hence resulting a compressed look or improper image), rather it should be properly cropped and resized resulting in a clean view.
Note: The size of the thumbnail would be constant for image of any size.
I like im4java, a wrapper for Image Magick.
im4java just generates the command line for the ImageMagick commands and passes the generated line to the selected IM-command (using the java.lang.ProcessBuilder.start()-method), this means that elaboration and the memory consumption is delegated to another preocess within the server, and I like this.
I'm using and I used it in many projects and I found it very reliable, fast and complete.