5.byte数组转换Bitmap对象:
- /** * @param bytes byte数组
- * @return bitmap对象 */
- public static Bitmap byteArrayToBitmap(byte[] bytes) { return null == bytes ? null : BitmapFactory.decodeByteArray(bytes, 0, bytes.length);
- }
6.图片去色,返回灰度图片(老式图片):
- /** * @param bitmap 传入的bitmap
- * @return 去色后的图片Bitmap对象 */
- public static Bitmap toGrayscale(Bitmap bitmap) { int width,height;










