From f7ee54762d2ed2f42ebcc9535b1a958751ead31f Mon Sep 17 00:00:00 2001 From: Barrett Harber Date: Wed, 27 Nov 2013 18:03:09 -0500 Subject: [PATCH] Image Dimensions Fix If the image has a valid width and height, use it. Otherwise, the off-screen rendering creates an image that is the maximum size of the browser window. This can be seen on with large images that are greater than the size of the browser window. --- pixastic.core.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pixastic.core.js b/pixastic.core.js index f616e07..ea05413 100755 --- a/pixastic.core.js +++ b/pixastic.core.js @@ -217,7 +217,7 @@ var Pixastic = (function() { var w = img.offsetWidth; var h = img.offsetHeight; - if (imageIsCanvas) { + if (imageIsCanvas || (img.width && img.height)) { w = img.width; h = img.height; }