The Source for Java Technology Collaboration
User: Password:



Start New Message Delete Post a Reply

Article: 
 Java Tech: Image Embossing
Subject:  set/getRGB
Date:  2005-12-10 23:02:31
From:  trembovetski


Just a note, regardless of the algorythm you're using, set/getRGB is a very inefficient way to work with pixels. A better would be to get the DataBuffer's array (bufferedImage.getRaster().getDataBuffer()) and operate directly on the pixels.

The disadvantage of this approach is that Java2D won't be able to cache this image in video memory because you have direct access to the pixels and we can't guarantee that the cache will be up to date.

Thanks,
Dmitri
Java2D Team

 Feed java.net RSS Feeds