ImageStroke
Makes stroke for a image with transparent background.
Getting Started
Installing
yarn add image-stroke
How To Use
There are three built-in methods to make stroke. Choose one of them in different situations.
- Rotate. Rotates the image with 360 degree.
- Contour. Detects contours of the image by Marching Squares and stroke them.
- Distance. Finds distance from edge per pixel by Distance transform, then fill every pixel not in stroke.
// Choose one of these methodsconst imageStroke =// Just use itimageStrokeconst image = ;image {// Get resultconst resultCanvas = imageStroke}