The Source for Java Technology Collaboration
User: Password:



Start New Message Delete Post a Reply

Article: 
 The Perils of Image.getScaledInstance()
Subject:  Implementation Question
Date:  2007-04-04 09:33:44
From:  campbell
Response to: Implementation Question


@dhorlick: For "huge-gantic" images, it's often good to use ImageI/O's subsampling capabilities, so for example, you can start with a 2000x2000 pixel image on disk, then use subsampling to read only half that (1000x1000 pixels) into a BufferedImage, and then use the multi-step downscaling technique to go even further, and it should look pretty nice. As with most things, it often depends on the image size and what sort of quality you're willing to live with in your application.

As I mentioned in an earlier reply, we'll try to fix the docs not only for JDK 7, but for JDK 6 as well. Then again, if the starship doesn't have access to this article, they probably won't have access to the updated docs in JDK 6 either, right? :)

 Feed java.net RSS Feeds