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.
This commit is contained in:
parent
178dd7313b
commit
f7ee54762d
1 changed files with 1 additions and 1 deletions
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue