
Security News
TypeScript is Porting Its Compiler to Go for 10x Faster Builds
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
bitmap2vector
Advanced tools
https://github.com/jankovicsandras/imagetracerjs with TypeScript API and support for PNG, JPEG, GIF, BMP, TIFF both in browser and Node.js
npm install bitmap2vector
import { bitmap2vector } from 'bitmap2vector';
// from file input stream
const out = await bitmap2vector({
input: readFileSync('test/assets/panda.png')
})
writeFileSync('output.svg', out.content)
// from URL or path
const out = await bitmap2vector({
input: '../assets/bluebells.jpg'
})
aDiv.innerHTML = out.content
input: string | Buffer
: Path or glob file pattern to .png files, relative to current dir.
in current folder.help?: boolean
: Print usage information, then exit.debug?: boolean
: Prints debug messages.format?: 'svg'
: output file format. Currently only svg is supportedltres?: number
: Error threshold for straight lines. Default value: 1.qtres?: number
: Error threshold for quadratic splines. Default value: 1.pathomit?: number
: \tEdge node paths shorter than this will be discarded for noise reduction. Default value: 8.rightangleenhance?: boolean
: Enhance right angle corners. Default value: 1.colorsampling?: 0 | 1 | 2
: 0: disabled, generating a palette; 1: randomsampling; 2: deterministic sampling. Default value: 2.numberofcolors?: number
: \tNumber of colors to use on palette if pal object is not defined. Default value: 16.mincolorratio?: number
: \tColor quantization will randomize a color if fewer pixels than (total pixels *mincolorratio) has it.
\tDefault value: 0.colorquantcycles?: number
: Color quantization will be repeated this many times. Default value: 3.layering?: 0 | 1
: 0: sequential ; 1: parallelstrokewidth?: number
: SVG stroke-width. Default value: 1.linefilter?: boolean
: Enable or disable line filter for noise reduction. Default value: false.scale?: number
: Every coordinate will be multiplied with this, to scale the SVG. Default value: 1.roundcoords?: number
: rounding coordinates to a given decimal place. 1 means rounded to 1 decimal place like 7.3 ; 3 means
rounded to 3places, like 7.356. Default value: 1.viewbox?: boolean
: Enable or disable SVG viewbox. Default value: false.desc?: boolean
: Enable or disable SVG descriptions. Default value: false.blurradius?: number
: \tSet this to 1..5 for selective Gaussian blur preprocessing. Default value: 0.blurdelta?: number
: \tRGBA delta treshold for selective Gaussian blur preprocessing. Default value: 20.TODO
FAQs
https://github.com/jankovicsandras/imagetracerjs with TypeScript API and support for PNG, JPEG, GIF, BMP, TIFF both in browser and Node.js
The npm package bitmap2vector receives a total of 789 weekly downloads. As such, bitmap2vector popularity was classified as not popular.
We found that bitmap2vector demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
TypeScript is porting its compiler to Go, delivering 10x faster builds, lower memory usage, and improved editor performance for a smoother developer experience.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.