JDK-6500894 : Provide java.awt.RenderingHints.VALUE_INTERPOLATION_LANCZOS (MITCHELL, SINC)
  • Type: Enhancement
  • Component: client-libs
  • Sub-Component: 2d
  • Affected Version: 6
  • Priority: P5
  • Status: Open
  • Resolution: Unresolved
  • OS: windows_xp
  • CPU: x86
  • Submitted: 2006-12-05
  • Updated: 2018-09-05
Description
A DESCRIPTION OF THE REQUEST :
The lanczos interpolation algorithm seems on many (subjective) tests to give very good results on both up but in particular downscaling - the results are both "smooth" (no jaggies) but "crisp" at the same time, w/o much artifacts (some ringing, but better than BICUBIC).

E.g.:
http://www.cambridgeincolour.com/tutorials/image-resize-for-web.htm
http://www.xs4all.nl/~bvdwolf/main/foto/down_sample/down_sample.htm
http://www.lassekolb.info/gim35_downsampling.htm

Google it.

IrfanView is a freeware program that have a bunch of these interpolation algorithms implemented, thus giving good comparison.

It wouldn't hurt if there was a large selection, thus include Sinc and Mitchell while you're at it!

JUSTIFICATION :
Java only provides default two interpolation modes (hints), BILINEAR and BICUBIC. It would be great if one could get a couple of extra ones, more directly aiming for quality and not speed.

(Btw, BICUBIC's javadocs says that it uses 9 samples. All other explainations I've come by states 16. I thought that this "wasn't up for discussion" (its an algorithm that works so and such), so who's wrong?)


CUSTOMER SUBMITTED WORKAROUND :
Make a resizer oneself.