Skip to content

Commit 14b599e

Browse files
committed
Simplify original dimensions normalization.
1 parent 0f65d7d commit 14b599e

1 file changed

Lines changed: 3 additions & 6 deletions

File tree

js/load-image-orientation.js

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -126,12 +126,9 @@ Exif orientation values to correctly display the letter F:
126126
options,
127127
function (img, data) {
128128
if (data) {
129-
var exifOrientation = data.exif && data.exif.get('Orientation')
130-
if (
131-
loadImage.orientation &&
132-
exifOrientation > 4 &&
133-
exifOrientation < 9
134-
) {
129+
var autoOrientation =
130+
loadImage.orientation && data.exif && data.exif.get('Orientation')
131+
if (autoOrientation > 4 && autoOrientation < 9) {
135132
// Automatic image orientation switched image dimensions
136133
var originalWidth = data.originalWidth
137134
var originalHeight = data.originalHeight

0 commit comments

Comments
 (0)