Question

I'm encountering a problem when I try to send bitmap with transparent background through sockets in Android.

The bitmap in displayed with transparent effect on the server app

I get the bitmap, compress it to PNG this way:

bitmap.compress(Bitmap.CompressFormat.PNG, 60, stream);

and when receiving I decode bitmap:

streamBmp = BitmapFactory.decodeByteArray(data, 0, data.length);

and draw it:

canvas.drawBitmap(streamBmp, 0,0 , null);

The bitmap is displayed on the client but without transparency. It was replaced by white color.

How can I keep transparency when sending bitmaps in Android?

No correct solution

OTHER TIPS

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top