Hey Will, you choose very popular OT subject :D Personally when in need of rescaling I use swingx library (LGPL) for the job
org.jdesktop.swingx.graphics.GraphicsUtilities.createThumbnail(BufferedImage image, int newWidth, int newHeight) or if I don't care too much about quality then org.jdesktop.swingx.graphics.GraphicsUtilities.createThumbnailFast(BufferedImage image, int newWidth, int newHeight) Admittedly the methods above work only for downscaling images, but if you look at the implementation you can use same algorithm for upscaling as well. http://swinglabs.java.sun.com/hudson/job/SwingX%20Weekly% 20Build/javadoc/org/jdesktop/swingx/graphics/GraphicsUtilities.html Except for few special cases (scaling drawings and scaling scanned text) it works pretty well for me. Cheers, Jan On Tue, 2009-03-10 at 10:21 +0100, Will Scheidegger wrote: > Dear Magnolians > > > This is quite off-topic, but I'm sure many of you have been faced by > the same problem: Image scaling in Java. > > > I tried many different methods, googled for hours if not days, but > either I'm getting low quality results or the thumbs have other "side > effects" like a black border on one or two sides... > > > Does anyone have the definite solution to a problem which really > should not be rocket science? I hate it when things are oh so easy in > Typo3 :-/ > > > Thanks! > -will > > > -- > > fastforward websolutions > > Kramgasse 16, CH-3011 Bern > > Tel. +41 31 348 54 44, Fax +41 31 348 54 55 > > www.fastforward.ch > > -- > > > > > > > ______________________________________________________________________ > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <[email protected]> > ---------------------------------------------------------------- ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
