jimp 0.6.6 → 0.6.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/browser/lib/jimp.js +6 -6
- package/browser/lib/jimp.min.js +2 -2
- package/package.json +8 -8
package/browser/lib/jimp.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/*
|
|
2
|
-
Jimp v0.6.
|
|
2
|
+
Jimp v0.6.7
|
|
3
3
|
https://github.com/oliver-moran/jimp
|
|
4
4
|
Ported for the Web by Phil Seaton
|
|
5
5
|
MIT License
|
|
@@ -36478,16 +36478,16 @@ function pluginCrop(event) {
|
|
|
36478
36478
|
eastPixelsToCrop = horizontal;
|
|
36479
36479
|
northPixelsToCrop = vertical;
|
|
36480
36480
|
southPixelsToCrop = vertical;
|
|
36481
|
-
} //
|
|
36481
|
+
} // make sure that crops are >= 0
|
|
36482
36482
|
|
|
36483
36483
|
|
|
36484
|
-
var widthOfRemainingPixels = w - (westPixelsToCrop + eastPixelsToCrop);
|
|
36485
|
-
var heightOfRemainingPixels = h - (southPixelsToCrop + northPixelsToCrop); // make sure that crops are > 0
|
|
36486
|
-
|
|
36487
36484
|
westPixelsToCrop = westPixelsToCrop >= 0 ? westPixelsToCrop : 0;
|
|
36488
36485
|
eastPixelsToCrop = eastPixelsToCrop >= 0 ? eastPixelsToCrop : 0;
|
|
36489
36486
|
northPixelsToCrop = northPixelsToCrop >= 0 ? northPixelsToCrop : 0;
|
|
36490
|
-
southPixelsToCrop = southPixelsToCrop >= 0 ? southPixelsToCrop : 0;
|
|
36487
|
+
southPixelsToCrop = southPixelsToCrop >= 0 ? southPixelsToCrop : 0; // safety checks
|
|
36488
|
+
|
|
36489
|
+
var widthOfRemainingPixels = w - (westPixelsToCrop + eastPixelsToCrop);
|
|
36490
|
+
var heightOfRemainingPixels = h - (southPixelsToCrop + northPixelsToCrop);
|
|
36491
36491
|
|
|
36492
36492
|
if (cropOnlyFrames) {
|
|
36493
36493
|
// crop image if all sides should be cropped
|