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

Popular posts from this blog

.htaccess - htaccess convert request to clean url and add slash at the end of the url -

php - facebook and github login HWIOAuthBundle and FOSUserBundle in Symfony2.1 -

hadoop - Sqoop installation export and import from postgresql -