android - "return of graph.facebook api image as byte[]" VS "Bitmap compressed as byte[]" -
when image graph.facebook api, can easyly converted bitmap structure:
bitmap bitmap = bitmapfactory.decodebytearray(src , 0, src .length);
but after picture gallery , compress send server db byte[], there problem while decoding same function.
bitmap bitmap = getimagefromgallery(); bytebuffer buffer = bytebuffer.allocate(bitmap.getbytecount()); bitmap.copypixelstobuffer(buffer); byte[] result = buffer.array();
and facebook's image sizes more smaller mines, though dimensions same.
why happening? how can compress images bitmap byte[] facebook's format?
Comments
Post a Comment