Skip to content
Merged
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 @@ -113,6 +113,9 @@ static BitmapSampled decodeSampledBitmap(Context context, Uri uri, int reqWidth,
// First decode with inJustDecodeBounds=true to check dimensions
BitmapFactory.Options options = decodeImageForOption(resolver, uri);

if(options.outWidth == -1 && options.outHeight == -1)
throw new RuntimeException("File is not a picture");

// Calculate inSampleSize
options.inSampleSize =
Math.max(
Expand Down