The Artima Developer Community
Sponsored Link

Legacy Java Answers Forum
December 2000

Advertisement

Advertisement

This page contains an archived post to the Java Answers Forum made prior to February 25, 2002. If you wish to participate in discussions, please visit the new Artima Forums.

Message:

Fastest way to blit subparts of a bufferedImage to another

Posted by Robert Madsen on December 12, 2000 at 7:36 AM

Hi there expert!
I am looking for the best way to blit tiles and spritedata from one bufferedImage into the backBuffer for my screen.
Not all tiles/sprites are uniform in size.
I have tried using drawImage on the backbuffer, but the version, that enables me to specify a sub-portion of source- and dest-image is very slow (Even though the to portions are indentical sizes) I suspect, that it always creates a temporary buffer, just IF any scaling was needed (wich it isn't!)

What should I use to get the fastest blits between bufferedImages?
Should I use writeableRaster.setRect?
Will that give problems when I want transparent (Not Alpha) parts in the tiles/sprites?

Any help is appreciated.

Best regards
Robert Madsen, Denmark



Replies:

Sponsored Links



Google
  Web Artima.com   
Copyright © 1996-2009 Artima, Inc. All Rights Reserved. - Privacy Policy - Terms of Use - Advertise with Us