Dear all,
Has anybody figured out how to scale large (2000x2000) 2D images in Java (using AWT, Java2D or JAI) to the same quality as that produced by, say, Paint Shop Pro or PhotoShop?
The Internet is awash with people who have discovered that…
image.getScaledInstance
…produces significantly better results (on a par with Paint Shop or PhotoShop) than, say…
graphics.setRenderingHint( RenderingHints.KEY_INTERPOLATION, RenderingHints.VALUE_INTERPOLATION_BILINEAR );
…but the former seems like a really old implementation, is very slow and (worst of all) doesn’t co-exist very well with things like…
graphics.translate( iX, iY );
graphics.scale( dX, dY );
So, the ‘getScaledInstance’ anamoly aside, how do you get good, smooth scaled large images out of Java?
If you have a large, cartoony image (like a line drawing, but with colours) how do you resize it down to as good a job as Paint Shop Pro does?