Posted by: Morten Nobel-Jørgensen | August 15, 2009

Java Image Scaling 0.8 released


The Java Image Scaling library has been updated to 0.8. The update contains some performance improvements that give up to 30 percent faster image resampling scaling that the 0.7.2 release.

The following charts shows you a comparison between the resampling method and the multistep rescale method both included in the Java Image Scaling library.

Java Image Scaling 0.8 released

The multistep rescale method (based on Chris Campbell blog ‘The Perils of Image.getScaledInstance()‘) basically scales images using Graphics2D. The rescaling is done in multiple steps, which increases the chances of a Moiré pattern to appear on the image.

The resampling rescale method rescales in two steps: first horizontal and then vertical. Since this is done in only two orthogonal steps, Moiré pattern are less likely to appear and besides the scaled image appears less blurry than the multistep algorithm.

Thanks to the performance improvements in version 0.8 both algorithms performs almost the same.

I haven’t found a good way to measure the memory consumption of the algorithms. I do get some delta memory values from JUnit that hints that the resampling method uses 20-30% less memory than the multistep algorithm.

The Java Image Scaling is open source and released under the LGPL.

Project homepage: http://code.google.com/p/java-image-scaling/

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Categories

%d bloggers like this: