Skip to content

Commit

Permalink
Reduced memory usage by recycling the bitmap
Browse files Browse the repository at this point in the history
  • Loading branch information
RobertoMorelos committed Nov 6, 2017
1 parent b13f80b commit 494b731
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ static byte[] cropToJpeg(byte[] jpeg, AspectRatio targetRatio, int jpegCompressi
image.recycle();
ByteArrayOutputStream out = new ByteArrayOutputStream();
crop.compress(Bitmap.CompressFormat.JPEG, jpegCompression, out);
crop.recycle();
return out.toByteArray();
}

Expand Down

0 comments on commit 494b731

Please sign in to comment.