mirror of
https://github.com/processwire/processwire.git
synced 2025-08-11 09:14:58 +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...');
|
This.consoleLog('detecting JPEG image orientation...');
|
||||||
|
|
||||||
if((typeof EXIF.getData === "function") && (typeof EXIF.getTag === "function")) {
|
if((typeof EXIF.getData === "function") && (typeof EXIF.getTag === "function")) {
|
||||||
|
This.consoleLog('EXIF.getData starting');
|
||||||
EXIF.getData(img, function() {
|
EXIF.getData(img, function() {
|
||||||
|
This.consoleLog('EXIF.getData done, orientation:');
|
||||||
var orientation = EXIF.getTag(this, "Orientation");
|
var orientation = EXIF.getTag(this, "Orientation");
|
||||||
This.consoleLog('image orientation from EXIF tag: ' + orientation);
|
This.consoleLog('image orientation from EXIF tag: ' + orientation);
|
||||||
This.scaleImage(img, orientation, completionCallback);
|
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) {
|
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)
|
if ((self.Image && img instanceof self.Image)
|
||||||
|| (self.HTMLImageElement && img instanceof self.HTMLImageElement)
|
|| (self.HTMLImageElement && img instanceof self.HTMLImageElement)
|
||||||
&& !img.complete)
|
&& !img.complete)
|
||||||
return false;
|
return false;
|
||||||
|
*/
|
||||||
|
|
||||||
if (!imageHasData(img)) {
|
if (!imageHasData(img)) {
|
||||||
getImageData(img, callback);
|
getImageData(img, callback);
|
||||||
|
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user