Skip to content

Commit

Permalink
bug fix for image size
Browse files Browse the repository at this point in the history
  • Loading branch information
commonsguy committed Feb 9, 2019
1 parent 45f73fc commit f2ffeb6
Showing 1 changed file with 2 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ public class ImageTransmogrifier implements ImageReader.OnImageAvailableListener
Display display=svc.getWindowManager().getDefaultDisplay();
Point size=new Point();

display.getSize(size);
display.getRealSize(size);

int width=size.x;
int height=size.y;
Expand Down Expand Up @@ -79,10 +79,7 @@ public void onImageAvailable(ImageReader reader) {
}

latestBitmap.copyPixelsFromBuffer(buffer);

if (image != null) {
image.close();
}
image.close();

ByteArrayOutputStream baos=new ByteArrayOutputStream();
Bitmap cropped=Bitmap.createBitmap(latestBitmap, 0, 0,
Expand Down

0 comments on commit f2ffeb6

Please sign in to comment.