문제

내 Android Application의 소켓에서 읽은 이미지를 표시해야합니다. Android 응용 프로그램은 기본적으로 Java Server에서 이미지를받는 클라이언트입니다./ strong> function.i an and android. 누군가가 도와주세요

도움이 되었습니까?

해결책

먼저 Byte [] 배열로 먼저 읽은 다음 BitmapFactory를 사용하여 Bitmap에서 비트 맵을 구성합니다.그것은 다음과 같이 보일 수 있습니다 :

byte[] buffer = new byte[imgSize];

//read all data to the buffer

BitmapFactory.decodeByteArray(buffer, 0, buffer.length);
.

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