Madhavan Malolan
Madhavan Malolan

Reputation: 750

Loading a TextureRegion from a Bitmap object in andengine

I am trying to load a TextureRegion from a bitmap object that i have

To load the image from file i use :

sprite_texture = (TextureRegion) BitmapTextureAtlasTextureRegionFactory.createFromAsset(Constants.LevelAtlas,Constants.context, "sprite.png", x, y);

But now i want to load the image from a URL. I have opened the URL and created a Bitmap object, i want to know how i could use the Bitmap object to create a sprite texture.

Any help greatly appreciated!

Upvotes: 0

Views: 594

Answers (1)

Paweł Marecki
Paweł Marecki

Reputation: 630

Look at this source: https://github.com/edbartley/AndEngine---Texture-Source-From-Bitmap/blob/master/source.java

I hope this code helps you.

Upvotes: 2

Related Questions