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
posted
0
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.