Skip to content
Open
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
6 changes: 5 additions & 1 deletion src/android/CameraLauncher.java
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,11 @@ private void processResultFromCamera(int destType, Intent intent) throws IOExcep
}
else {
input = cordova.getActivity().getContentResolver().openInputStream(imageUri);
mimeType = FileHelper.getMimeType(imageUri.toString(), cordova);
// MediaStore.ACTION_IMAGE_CAPTURE always writes JPEG data into imageUri, regardless of
// its file extension (which reflects the requested encodingType, not the actual format).
// Relying on FileHelper.getMimeType(imageUri) here would misreport PNG-named captures as
// image/png, causing getScaledAndRotatedBitmap() to skip reading the EXIF orientation.
mimeType = JPEG_MIME_TYPE;
}

if (input == null) {
Expand Down
Loading