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
  • 44,623
  • 26
  • 117
  • 170
Benjamin
  • 531
  • 1
  • 8
  • 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
  • 200,320
  • 28
  • 229
  • 974
  • Thanks that explained a lot :) – Benjamin Sep 10 '11 at 14:17
  • Excellent! If no better answer appears after a time, you can accept this answer by clicking on the [empty green check mark](http://meta.stackexchange.com/questions/5234/how-does-accepting-an-answer-work/5235#5235) at the left. – trashgod Sep 10 '11 at 14:21