aspose file tools
The moose likes Swing / AWT / SWT and the fly likes Image scaling challenge Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login
JavaRanch » Java Forums » Java » Swing / AWT / SWT
Reply Bookmark "Image scaling challenge" Watch "Image scaling challenge" New topic
Author

Image scaling challenge

Janus Tetsuo
Greenhorn

Joined: Feb 26, 2004
Posts: 11
I have an app that needs to read a jpeg and output a scaled version with the highest quality possible. The client is very particular that it should be a very high quality scale. We are using the output from photoshops scaling operation as a benchmark. The best I have done so far is to invoke getScaledInstance on a BufferedImage. Can anyone do better than the links below? One is the original, one is the output from photoshop and one is the output from java. Scaling is done with a width of 94. You can see the java is close, but there are still unwanted artifacts (look close and switch between the two and you will see). Any code on a better solution would be greatly appreciated!
http://9mmedia.com/original.jpg
http://9mmedia.com/javaScaled.jpg
http://9mmedia.com/photoshopScaled.jpg
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35220
    
    7
Not sure if it would be better in these particular circumstances, but this ImageJ plugin implements a fancy cubic spline-based resize algorithm, which does a much better job than linear interpolation.


Android appsImageJ pluginsJava web charts
Jason Liao
Ranch Hand

Joined: Jun 17, 2005
Posts: 59
Using JAI may get better result.

http://java.sun.com/products/java-media/jai/
https://jai.dev.java.net/
 
I agree. Here's the link: http://zeroturnaround.com/jrebel/download
 
subject: Image scaling challenge
 
Similar Threads
looking for javascript help documents.
Resizing Image: Java vs PHP
SCJP2
do i need special hardware/software
Image Degradation