@jimp/plugin-contain
Advanced tools
Comparing version 0.5.0 to 0.5.1
{ | ||
"name": "@jimp/plugin-contain", | ||
"version": "0.5.0", | ||
"version": "0.5.1", | ||
"description": "contain an image.", | ||
@@ -32,7 +32,7 @@ "main": "dist/index.js", | ||
"devDependencies": { | ||
"@jimp/custom": "^0.5.0", | ||
"@jimp/plugin-blit": "^0.5.0", | ||
"@jimp/plugin-resize": "^0.5.0", | ||
"@jimp/custom": "^0.5.1", | ||
"@jimp/plugin-blit": "^0.5.1", | ||
"@jimp/plugin-resize": "^0.5.1", | ||
"@jimp/plugin-scale": "^0.5.0", | ||
"@jimp/test-utils": "^0.5.0" | ||
"@jimp/test-utils": "^0.5.1" | ||
}, | ||
@@ -42,3 +42,3 @@ "publishConfig": { | ||
}, | ||
"gitHead": "fbbe0b7da5a9dcf8da35e2dfb2e8265ca850435c" | ||
"gitHead": "b23ab92550336eed5d4ac422564c7c63ea280c73" | ||
} |
@@ -29,1 +29,32 @@ <div align="center"> | ||
``` | ||
### Align modes | ||
The following constants can be passed to `image.contain`: | ||
```js | ||
Jimp.HORIZONTAL_ALIGN_LEFT; | ||
Jimp.HORIZONTAL_ALIGN_CENTER; | ||
Jimp.HORIZONTAL_ALIGN_RIGHT; | ||
Jimp.VERTICAL_ALIGN_TOP; | ||
Jimp.VERTICAL_ALIGN_MIDDLE; | ||
Jimp.VERTICAL_ALIGN_BOTTOM; | ||
``` | ||
For example: | ||
```js | ||
image.contain(250, 250, Jimp.HORIZONTAL_ALIGN_LEFT | Jimp.VERTICAL_ALIGN_TOP); | ||
image.contain( | ||
250, | ||
250, | ||
Jimp.HORIZONTAL_ALIGN_RIGHT | Jimp.VERTICAL_ALIGN_BOTTOM | ||
); | ||
``` | ||
Default align mode for `image.contain` is: | ||
```js | ||
Jimp.HORIZONTAL_ALIGN_CENTER | Jimp.VERTICAL_ALIGN_MIDDLE; | ||
``` |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
27117
60