diff --git a/src/pixi/textures/BaseTexture.js b/src/pixi/textures/BaseTexture.js index 3ab40bf..a41b86f 100644 --- a/src/pixi/textures/BaseTexture.js +++ b/src/pixi/textures/BaseTexture.js @@ -98,8 +98,8 @@ if((this.source.complete || this.source.getContext) && this.source.width && this.source.height) { this.hasLoaded = true; - this.width = this.source.width; - this.height = this.source.height; + this.width = this.source.naturalWidth || this.source.width; + this.height = this.source.naturalHeight || this.source.height; PIXI.texturesToUpdate.push(this); } @@ -110,8 +110,8 @@ this.source.onload = function() { scope.hasLoaded = true; - scope.width = scope.source.width; - scope.height = scope.source.height; + scope.width = scope.source.naturalWidth || scope.source.width; + scope.height = scope.source.naturalHeight || scope.source.height; for (var i = 0; i < scope._glTextures.length; i++) {