@roaders/node-red-contrib-image-path-crop v1.0.8
node-red-contrib-image-path-crop
Crops an image to an irregular path:

becomes

Nodes
Load Image
Loads a given path and outputs it as a Buffer. Buffer can be an input to path-crop-image node and is useful if you want to load an image once but crop it many times.
Inputs
- path - the path to the image
Path Crop Image
Crops an image to an irregular shaped path.
Inputs
image - can be specified as a path to an image which will be loaded or can be specified as a
Bufferthat has already been loaded. To specify the output of theload-imagenode the node edit dialog should be set tomsg.payloadso that theBufferin the message payload from the previous node can be used.cropPath - An array of points that form the path to be cropped. At least 3 points must be specified. Example:
[
{
"x": 530,
"y": 460
},
{
"x": 215,
"y": 800
},
{
"x": 933,
"y": 800
}
]- outputPath - Optional. If set the modified image will be saved to this path.
Inputs for both nodes can be directly specified in the node edit dialog or they can be specified in a message property or in the flow or global context.