当前位置: 代码迷 >> PB >> getBit地图Byte
  详细解决方案

getBit地图Byte

热度:88   发布时间:2016-04-29 08:09:03.0
getBitmapByte
	public byte[] getBitmapByte(Drawable drawalbe) {		BitmapDrawable db = (BitmapDrawable) drawalbe;		Bitmap bitmap = db.getBitmap();		ByteArrayOutputStream out = new ByteArrayOutputStream();		bitmap.compress(Bitmap.CompressFormat.PNG, 100, out);		try {			out.flush();			out.close();		} catch (IOException e) {			e.printStackTrace();		}		return out.toByteArray();	}
  相关解决方案