1

Please answer these questions:

  1. Is it true that if a BufferedImage is of type INT_ARGB it will be rendered at the same speed as a Toolkit generated Image object?
  2. Are BufferedImages and Images "equal" for games? (speed & memory efficiency wise)
  3. Is it correct that BufferedImages will not play an animated *.gif because the image data is buffered?
  4. Will the animated image data stored in an Image object be lost if the Image is drawn to a BufferedImage which is then rendered to the screen through a Graphics object?
Guido
  • 46,642
  • 28
  • 120
  • 174
Benjamin
  • 541
  • 1
  • 9
  • 17
  • What do your tests and profiling tell you? – trashgod Sep 10 '11 at 13:42
  • To be honest, I haven't done any one those things. I was kind of hoping that someone would have an answer. – Benjamin Sep 10 '11 at 13:51
  • Well I have tried drawing images that were animating just fine, until they were drawn on a BufferedImage. So I guess I kind of know the answer to question number 3 & 4. I just didn't want to draw a hasty conclusion, and so I thought someone could answer my questions or at least confirm my "theories" in a snap :) – Benjamin Sep 10 '11 at 13:56

1 Answers1

1

While BufferedImage is not intrinsically animated, they are frequently used to pre-load or pre-render complex images in order to speed up animation. This KineticModel is an example. This AnimationTest shows one way to examine rendering time.

Community
  • 1
  • 1
trashgod
  • 203,806
  • 29
  • 246
  • 1,045