Skip to main content

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.


Comments

  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

Post a Comment

Popular posts from this blog

Slow Android emulator

I have a 2.67 GHz Celeron processor, 1.21 GB of RAM on a x86 Windows XP Professional machine. My understanding is that the Android emulator should start fairly quickly on such a machine, but for me it does not. I have followed all instructions in setting up the IDE, SDKs, JDKs and such and have had some success in staring the emulator quickly but is very particulary. How can I, if possible, fix this problem?