• Post Reply Bookmark Topic Watch Topic
  • New Topic

Image scaling challenge

 
Janus Tetsuo
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42970
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Jason Liao
Ranch Hand
Posts: 59
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Using JAI may get better result.

http://java.sun.com/products/java-media/jai/
https://jai.dev.java.net/
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!