diff options
author | Max Kostikov <max@kostikov.co> | 2020-07-19 14:58:19 +0200 |
---|---|---|
committer | Max Kostikov <max@kostikov.co> | 2020-07-19 14:58:19 +0200 |
commit | 5ea7196e78d08550b3ec93d3b708f915b3b0057f (patch) | |
tree | 07e5f865b6c83898d7ac508302a227509e8207fd /vendor/blueimp/jquery-file-upload/js/jquery.fileupload-image.js | |
parent | d0c7c99d5e1eb27281431231640c7e8c019b90e1 (diff) | |
parent | fcc47e69e424635fa54b2684329623d4f7694436 (diff) | |
download | volse-hubzilla-5ea7196e78d08550b3ec93d3b708f915b3b0057f.tar.gz volse-hubzilla-5ea7196e78d08550b3ec93d3b708f915b3b0057f.tar.bz2 volse-hubzilla-5ea7196e78d08550b3ec93d3b708f915b3b0057f.zip |
Merge branch 'dev' into 'dev'
Dev sync
See merge request kostikov/core!1
Diffstat (limited to 'vendor/blueimp/jquery-file-upload/js/jquery.fileupload-image.js')
-rw-r--r-- | vendor/blueimp/jquery-file-upload/js/jquery.fileupload-image.js | 35 |
1 files changed, 13 insertions, 22 deletions
diff --git a/vendor/blueimp/jquery-file-upload/js/jquery.fileupload-image.js b/vendor/blueimp/jquery-file-upload/js/jquery.fileupload-image.js index 859846103..c2056b954 100644 --- a/vendor/blueimp/jquery-file-upload/js/jquery.fileupload-image.js +++ b/vendor/blueimp/jquery-file-upload/js/jquery.fileupload-image.js @@ -52,7 +52,6 @@ disableImageHead: '@', disableMetaDataParsers: '@', disableExif: '@', - disableExifThumbnail: '@', disableExifOffsets: '@', includeExifTags: '@', excludeExifTags: '@', @@ -216,31 +215,23 @@ }, thumbnail, thumbnailBlob; - if (data.exif) { - if (options.orientation === true) { + if (data.exif && options.thumbnail) { + thumbnail = data.exif.get('Thumbnail'); + thumbnailBlob = thumbnail && thumbnail.get('Blob'); + if (thumbnailBlob) { options.orientation = data.exif.get('Orientation'); + loadImage(thumbnailBlob, resolve, options); + return dfd.promise(); } - if (options.thumbnail) { - thumbnail = data.exif.get('Thumbnail'); - thumbnailBlob = thumbnail && thumbnail.get('Blob'); - if (thumbnailBlob) { - loadImage(thumbnailBlob, resolve, options); - return dfd.promise(); - } - } - // Prevent orienting browser oriented images: - if (loadImage.orientation) { - data.orientation = data.orientation || options.orientation; - } + } + if (data.orientation) { // Prevent orienting the same image twice: - if (data.orientation) { - delete options.orientation; - } else { - data.orientation = options.orientation; - } + delete options.orientation; + } else { + data.orientation = options.orientation || loadImage.orientation; } if (img) { - resolve(loadImage.scale(img, options)); + resolve(loadImage.scale(img, options, data)); return dfd.promise(); } return data; @@ -320,7 +311,7 @@ file = data.files[data.index], // eslint-disable-next-line new-cap dfd = $.Deferred(); - if (data.orientation && data.exifOffsets) { + if (data.orientation === true && data.exifOffsets) { // Reset Exif Orientation data: loadImage.writeExifData(data.imageHead, data, 'Orientation', 1); } |