제가 byte의 bitmap 데이터를 인코딩해서 String으로 변환한뒤 NFC로 String 값으로 넘겨받으며 그 값을 다시 byte로 decode해와서 이 값을 setImageBitmap으로 보여주고 싶은데요.
일단 받는곳의 코딩입니다. 받아온 data값과 decode 된 값을 보려고 중간중간 Log.d로 확인할수 있게 했습니다.
ncimage = ( new String(payload, langCodeLen + 1 , payload.length - langCodeLen - 1 , textEncoding));
Log.d( "receive" , "ncimage : " + ncimage);
byte [] var_decode = getBase64decode(ncimage);
Log.d( "receive" , "ncimage : " + var_decode);
getncView.setImageBitmap(BitmapFactory.decodeByteArray(var_decode, 0 , var_decode.length));
|
이게 오류 로그입니다.
09 - 17 16 : 20 : 41.247 5349 - 5349 /org.androidtown.lbs.map D/ViewRootImpl﹕ ViewPostImeInputStage ACTION_DOWN
09 - 17 16 : 21 : 15.432 5349 - 5349 /org.androidtown.lbs.map D/receive﹕ ncimage : W0JAYzc3ZTVhNw==
09 - 17 16 : 21 : 15.432 5349 - 5349 /org.androidtown.lbs.map D/receive﹕ ncimage : [B @1585c01d
09 - 17 16 : 21 : 15.432 5349 - 5349 /org.androidtown.lbs.map E/﹕ ReadStreamToBuffer : Qmage stream read error!! required length = 12 bytes, but just read 10 bytes
09 - 17 16 : 21 : 15.432 5349 - 5349 /org.androidtown.lbs.map E/﹕ isQmage : input SkStreamRewindable length is less than Qmage minimum size : 0
09 - 17 16 : 21 : 15.432 5349 - 5349 /org.androidtown.lbs.map D/skia﹕ --- SkImageDecoder::Factory returned null
|
보내고 받고, decode 된 값까지 잘 되었다고 생각했는데 ...
byte 값이 부족하다는 에러가 뜨는것 같습니다... 앱개발 초보라서 어렵네요..ㅠㅠ
도와주시면 감사하겠습니다.ㅠㅠ