mirror of
https://github.com/processwire/processwire.git
synced 2025-08-09 16:26:59 +02:00
Fix issue processwire/processwire-issues#275 - part 2, fix for exif.js
This commit is contained in:
@@ -112,7 +112,9 @@ PWImageResizer.prototype.resize = function(file, completionCallback) {
|
||||
This.consoleLog('detecting JPEG image orientation...');
|
||||
|
||||
if((typeof EXIF.getData === "function") && (typeof EXIF.getTag === "function")) {
|
||||
This.consoleLog('EXIF.getData starting');
|
||||
EXIF.getData(img, function() {
|
||||
This.consoleLog('EXIF.getData done, orientation:');
|
||||
var orientation = EXIF.getTag(this, "Orientation");
|
||||
This.consoleLog('image orientation from EXIF tag: ' + orientation);
|
||||
This.scaleImage(img, orientation, completionCallback);
|
||||
|
File diff suppressed because one or more lines are too long
@@ -984,10 +984,16 @@
|
||||
}
|
||||
|
||||
EXIF.getData = function(img, callback) {
|
||||
if (((self.Image && img instanceof self.Image)
|
||||
|| (self.HTMLImageElement && img instanceof self.HTMLImageElement))
|
||||
&& !img.complete)
|
||||
return false;
|
||||
/*
|
||||
if ((self.Image && img instanceof self.Image)
|
||||
|| (self.HTMLImageElement && img instanceof self.HTMLImageElement)
|
||||
&& !img.complete)
|
||||
return false;
|
||||
*/
|
||||
|
||||
if (!imageHasData(img)) {
|
||||
getImageData(img, callback);
|
||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user