java - call to Bitmap.compress does not return - and NO exception -


on android following image.

it never gets past bitmappicture.compress line - seems sit there , hang.

the line above byte count returns 40000.

i never see compress done, or other output after 'compress'.

try {      final int compression_quality = 100;     string encodedimage;     bytearrayoutputstream bytearraybitmapstream = new bytearrayoutputstream();     log.e("error","compress" + bitmappicture.getbytecount());      bitmappicture.compress(bitmap.compressformat.png,                     compression_quality, bytearraybitmapstream);     log.e("error","compress done");     byte[] b = bytearraybitmapstream.tobytearray();     log.e("error","bytear");     encodedimage = base64.encodetostring(b, base64.default);      log.e("error","jsondata encodedimage returned");     return encodedimage;  } catch (exception e) {      errorlogger.adderror(e.getmessage(), 199);     log.e("error","jsondata error"+e.getmessage());     return null; } 

try calling

bitmappicture.setconfig(bitmap.config.argb_8888); 

before compression. otherwise, can provide little more? can see declare/load bitmap?


Comments

Popular posts from this blog

javascript - RequestAnimationFrame not working when exiting fullscreen switching space on Safari -

Python ctypes access violation with const pointer arguments -