1
0
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:
Ryan Cramer
2017-06-23 06:22:10 -04:00
parent 7ad84bf1c3
commit da3c80d0ca
4 changed files with 10 additions and 2 deletions

View File

@@ -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

View File

@@ -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