Reduced memory usage by recycling the bitmap (#93)

pull/94/head^2
Roberto Morelos 7 years ago committed by Mattia Iavarone
parent f3317ad4ee
commit 04cf364b49
  1. 1
      cameraview/src/main/utils/com/otaliastudios/cameraview/CropHelper.java

@ -27,6 +27,7 @@ class CropHelper {
image.recycle();
ByteArrayOutputStream out = new ByteArrayOutputStream();
crop.compress(Bitmap.CompressFormat.JPEG, jpegCompression, out);
crop.recycle();
return out.toByteArray();
}

Loading…
Cancel
Save