Package Exports
- @geekcornernpm/jimp-plugins
- @geekcornernpm/jimp-plugins/src/index.mjs
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@geekcornernpm/jimp-plugins) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
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
yarn add @ozelot379/jimp-plugins
Use Jimp
with configured plugins
import Jimp from "@ozelot379/jimp-plugins";
Plugins:
autoCropTransparent
: Remove transparent borderborderImage
: Create new image from border imagecheckSameColor
: Check area is same colorcolorize
: Colorize a grayed image with a colorensureSize
: Ensure the image has a size (ensureMaxHeight
,ensureMaxWidth
,ensureMinHeight
,ensureMinWidth
)fillArea
: Fill area with colorisEmptyArea
: Check if area is emptyrotateSimple
: Rotate image simple - 90deg without resize (LikeJimp
v0.5.6)toRectangles
: Generate rectangles which pixels are same colorstoRectanglesSvg
: Generate rectangles svg which pixels are same colors
Types:
tga
CLI
Only tested with Linux
Install it global so you can use the binaries
sudo yarn global add @ozelot379/jimp-plugins
Commands:
img_to_svg "img input path" "svg output path"
: SeetoRectanglesSvg
above