Repository navigation
inlaytrace 0.4.0
·
129 commits
to main
since this release
Minor Changes
- A command line:
npx inlaytrace logo.png -o logo.svg --preset logo. PNGs are read with Node's own zlib, so the package still has no dependencies; JPEG, WebP, GIF and TIFF use sharp when it's installed beside it.--helplists the flags, which follow the trace options. - New
grayscaleoption for the colour presets (notpixel): trace in greys only,colorsof them, each pixel taken as the grey of its own OKLab lightness. - Presets in the package, and a simpler call:
trace(image, { preset: 'logo' }).imageis anything shaped like ImageData ({ data, width, height }). The seven presets the app uses (logo,illustration,outline,lineart,centerline,poster,pixel) each pick their own palette and carry their own defaults, and any option overrides them.palettetraces in your own colours,layersreplacesstacked,inverttraces light ink, andpresetslists every default. Centerline paths are now{ d, fill, stroke }like Outline art's lines (fillthe colour,strokethe width).trace(rgba, width, height, options),traceCenterlineandcenterlineToSvgstill work but are deprecated, and go in 1.0. - The package entry no longer exports
mergeLabels,otsu,staircaseorcolorAt. They were internals, exported for the app's tests and never documented. Everything left is in the API reference and stays through 1.0.