Sunday, January 15, 2012

How can I import java.awt.BufferedImage in an Android project?


I see answers to questions suggesting the use of BufferedImages for performing increases that I am very interested in.



How can I avoid garbage collection delays in Java games? (Best Practices)



But I cannot find out a way to import it because it is not part of the SDK of course. How has everyone else who have used it achieved this?



I am basically looking for a way to store graphics I am writing on canvas without having to build them totally from stratch each time. For example storing a drawText() as a BufferedImage and drawing that each frame.

1 comment:

  1. Any answers suggesting the use of BufferedImage in an Android environment are wrong; as you note, it's not part of the Android environment. However, you can gain the same efficiency effects by using a Bitmap.

    ReplyDelete