Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ private ImageReader createImageReader(int width, int height) {
IMAGE_READER_IMAGES);
if (DEBUG) Log.d(TAG, "ImageReader created with RGB_565 format");
return reader;
} catch (IllegalArgumentException | RuntimeException e) {
} catch (RuntimeException e) {
Log.w(TAG, "RGB_565 format not supported, falling back to RGBA_8888", e);
}

Expand All @@ -194,7 +194,7 @@ private ImageReader createImageReader(int width, int height) {
IMAGE_READER_IMAGES);
if (DEBUG) Log.d(TAG, "ImageReader created with RGBA_8888 format");
return reader;
} catch (IllegalArgumentException | RuntimeException e) {
} catch (RuntimeException e) {
Log.e(TAG, "Failed to create ImageReader with RGBA_8888 format", e);
return null;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,6 @@ private BorderObject findBorder(ByteBuffer buffer, int width, int height, int ro

buffer.position(0).mark();

int[] rgb = new int[3]; // Reusable array for RGB values

// iterate through the X axis until we either hit 33% of the image width or a non-black pixel
for (int x = 0; x < width33percent; x++) {

Expand Down