I have released a new version of my image scaling library for Java. The new version contains two minor bugfixes:
- Fix minor rounding error ( Issue 16 )
- Change DimensionConstrain constructor from private to protected ( Issue 19 )
The binaries and source is available on the projects website: http://code.google.com/p/java-image-scaling/
Besides the library is also available from the maven repositories:
<dependency> <groupId>com.mortennobel</groupId> <artifactId>java-image-scaling</artifactId> <version>0.8.5</version> </dependency>
Hi,
Please let me know if I need to crop a image how can I do that using Image Scaling API. I had tried to use the ResampleOp() constructor and passed the parameter as ResampleOp(71,71) but it is making the image flat, so I want to crop the image.
Regards
Sameer
By: Sameer Panda on September 21, 2010
at 09:34
Hi Sameer
The library does currently not support cropping the image – but you can use the method BufferedImage.getSubimage(x,y,w,h) to crop an image (after you have scaled the image).
I encourage you to take a look at the class com.mortennobel.imagescaling.DimensionConstrain – this should give you an idea of how the rescale dimension is computed.
– Morten
By: Morten Nobel-Jørgensen on October 4, 2010
at 20:08
Hi,
i m wondering does ResampleOp support anti-aliasing?
Or can i easily extend ResampleOp to say, add an JitterFilter, which will jitter samples my bufferedImage.
thanks in advance
By: yoshi on January 21, 2011
at 06:48
[…] looking for a good image resizing solution in java, and I believe Morten Nobel-Jørgensen’s java image scaling library fits that description. Specifically, I chose to use his MultiStepRescaleOp class, which does not […]
By: Resize images in Java, preserving image quality | A Web Coding Blog on March 2, 2011
at 22:46
Hi Morten – your image resizing is very good indeed! Good quality results and of minimum size. Just one issue; sometimes vertical images are rotated by 90 degrees. Any advice ?
By: Julian Triggs on March 5, 2017
at 17:55