Monday 15 June 2015

Android image data loss -



Android image data loss -

what want blob getting errors did in kind of different way. capture image photographic camera , save in database. first convert byte array , encode output base64

bytearrayoutputstream stream = new bytearrayoutputstream(); map.compress(bitmap.compressformat.jpeg, 100, stream); byte[] bitmapdata = stream.tobytearray(); encodedimage = base64.encodetostring(bitmapdata, base64.default);

on other activity take selected columns text (encoded image) , decode again.

byte[] imagebytes = base64.decode(encodedimage, base64.default); bmp = bitmapfactory.decodebytearray(imagebytes, 0, imagebytes.length);

this before , after of image.

android image image-processing base64

No comments:

Post a Comment