문제

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?

올바른 솔루션이 없습니다

다른 팁

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top