把Bitmap转换成二进制
1.
public byte[] getBitmapByte(Bitmap bitmap) {
 ByteArrayOutputStream out = new ByteArrayOutputStream();
 bitmap.compress(Bitmap.CompressFormat.JPEG, 100, out);
 try {
 out.flush();
 out.close();
 }
 catch (IOException e) {
 e.printStackTrace();
 }
 return out.toByteArray();
 }
2.调用getBitmapByte();
byte[] content = getBitmapByte(bm);
 
                     
                    
                 
                    
                 
                
            
         
         浙公网安备 33010602011771号
浙公网安备 33010602011771号