imagejs
Advanced tools
Comparing version 0.0.7 to 0.0.8
@@ -294,2 +294,5 @@ /** | ||
that._fill(padColor, {left: that.width - Math.ceil(wMargin), top: 0, width: Math.ceil(wMargin), height: that.height}); | ||
Resize[options.algorithm](this, temp, options); | ||
that._blt(temp, {left: Math.floor(wMargin), top: Math.floor(hMargin)}); | ||
} else if (h2 < that.height) { | ||
@@ -301,7 +304,9 @@ // pad top & bottom | ||
that._fill(padColor, {left: 0, top: that.height - Math.ceil(hMargin), width: that.width, height: Math.ceil(hMargin)}); | ||
Resize[options.algorithm](this, temp, options); | ||
that._blt(temp, {left: Math.floor(wMargin), top: Math.floor(hMargin)}); | ||
} else { | ||
// stretch straight into that | ||
Resize[options.algorithm](this, that, options); | ||
} | ||
Resize[options.algorithm](this, temp, options); | ||
that._blt(temp, {left: Math.floor(wMargin), top: Math.floor(hMargin)}); | ||
break; | ||
@@ -308,0 +313,0 @@ case "crop": // crop original to fit in dst with aspect ratio preserved |
{ | ||
"name": "imagejs", | ||
"version": "0.0.7", | ||
"version": "0.0.8", | ||
"description": "Image Processor", | ||
@@ -5,0 +5,0 @@ "private": false, |
@@ -25,2 +25,3 @@ # ImageJS | ||
<li>readFile this bug</li> | ||
<li>resize same aspect ratio fix</li> | ||
</ul> | ||
@@ -27,0 +28,0 @@ </li> |
40655
752
210