crop-universal
Advanced tools
Comparing version 1.0.0 to 1.0.1
{ | ||
"name": "crop-universal", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "Crop transparent pixel from image", | ||
@@ -35,2 +35,3 @@ "keywords": [ | ||
"homepage": "https://github.com/GMartigny/crop-universal#readme", | ||
"funding": "https://github.com/GMartigny/crop-universal?sponsor=1", | ||
"dependencies": { | ||
@@ -37,0 +38,0 @@ "detect-edges": "^1.0.1" |
# crop-universal | ||
[![Package version](https://flat.badgen.net/npm/v/crop-universal)](https://www.npmjs.com/package/crop-universal) | ||
[![Package size](https://badgen.net/bundlephobia/minzip/crop-universal)](https://bundlephobia.com/result?p=crop-universal) | ||
[![Package size](https://flat.badgen.net/bundlephobia/minzip/crop-universal)](https://bundlephobia.com/result?p=crop-universal) | ||
Crop all transparent pixel around an image's edges. | ||
⚠️ This package is environment agnostic. It requires you to provide a `Canvas` implementation. It'll be way more simple for you to use: | ||
- For browsers, use [`crop-browser`](https://github.com/GMartigny/crop-browser) | ||
- For Node.js, use [`crop-node`](https://github.com/GMartigny/crop-node) | ||
- As a CLI, use [`crop-node-cli`](https://github.com/GMartigny/crop-node-cli) | ||
⚠️ This package is environment agnostic. It requires you to provide a `Canvas` implementation. It'll be more simple for you to use: | ||
- For browsers 👉 [`crop-browser`](https://github.com/GMartigny/crop-browser) | ||
- For Node.js 👉 [`crop-node`](https://github.com/GMartigny/crop-node) | ||
- As a CLI 👉 [`crop-node-cli`](https://github.com/GMartigny/crop-node-cli) | ||
@@ -42,2 +42,3 @@ | ||
|environment |`Object` |required |Object holding a `createCanvas` and a `loadImage` implementation | | ||
This will return a `Function` that you can use to crop. | ||
@@ -49,4 +50,5 @@ | ||
| --- | --- | --- | --- | | ||
|input |`String|any` |required |Path to the image to process or any type supported by your `Canvas.prototype.drawImage` environment | | ||
|input |`String\|any` |required |Path to the image to process or any type supported by your `Canvas.prototype.drawImage` environment | | ||
|options |`Options` |`undefined` |Allow to forward [options to `detect-edges`](https://github.com/GMartigny/detect-edges#options) | | ||
This will return a canvas with the result drawn onto. | ||
@@ -53,0 +55,0 @@ |
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
5168
58