Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/offroaders123/jimp-plugins
https://github.com/offroaders123/jimp-plugins
Last synced: 20 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/offroaders123/jimp-plugins
- Owner: Offroaders123
- Created: 2024-03-13T06:53:47.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-03-14T23:09:46.000Z (9 months ago)
- Last Synced: 2024-03-15T08:31:30.953Z (9 months ago)
- Language: JavaScript
- Size: 22.5 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# @ozelot379/jimp-plugins
Some plugins for https://github.com/oliver-moran/jimp
## Requirements
This is an "ES module"
So it requires a current web browser or NodeJS v14
If you need older support, please try to use something like `webpack` or `babel`
## Usage
### Code
Add as a dependency to your `package.json`
```bash
yarn add @ozelot379/jimp-plugins
```Use `Jimp` with configured plugins
```javascript
import Jimp from "@ozelot379/jimp-plugins";
```Plugins:
- `autoCropTransparent`: Remove transparent border
- `borderImage`: Create new image from border image
- `checkSameColor`: Check area is same color
- `colorize`: Colorize a grayed image with a color
- `ensureSize`: Ensure the image has a size (`ensureMaxHeight`, `ensureMaxWidth`, `ensureMinHeight`, `ensureMinWidth`)
- `fillArea`: Fill area with color
- `isEmptyArea`: Check if area is empty
- `rotateSimple`: Rotate image simple - 90deg without resize (Like `Jimp` v0.5.6)
- `toRectangles`: Generate rectangles which pixels are same colors
- `toRectanglesSvg`: Generate rectangles svg which pixels are same colorsTypes:
- `tga`
### CLI
Only tested with Linux
Install it global so you can use the binaries
```bash
sudo yarn global add @ozelot379/jimp-plugins
```Commands:
- `img_to_svg "img input path" "svg output path"`: See `toRectanglesSvg` above