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

database - VFP Grid + SQL server 2008 - grid not showing correctly -

jquery - Set jPicker field to empty value -

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