npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

bitmap2vector-cli

v0.0.5

Published

Command line interface for bitmap2vector: raster image tracer and vectorizer, bitmap to SVG converter

Downloads

15

Readme

bitmap2vector-cli

Contents

Summary

  • Command line interface for bitmap2vector Command Line interface
  • Convert bitmap images like PNG, JPEG, GIF, BMP, TIFF to SVG vector graphics using the image tracer implementation imagetracerjs
  • Supports all bitmap2vector options, file globs, output folders, and more.

Install

npm install bitmap2vector-cli -g

Usage

bitmap2vector --input "that.jpg" --blurdelta 40 > that.jpg.svg
bitmap2vector --input "foo/imgs/**/*.png" --output bar/imgs-svg

Options

  • --input: string | Buffer: Path or glob file pattern to .png files, relative to current dir.
  • --output?: string: Folder for output files. If it doesn't exists it will be created. If none, output files will be written in current folder.
  • --help?: boolean: Print usage information, then exit.
  • --debug?: boolean: Prints debug messages.
  • --format?: 'svg': output file format. Currently only svg is supported
  • --ltres?: number: Error threshold for straight lines. Default value: 1.
  • --qtres?: number: Error threshold for quadratic splines. Default value: 1.
  • --pathomit?: number: Edge 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: Number of colors to use on palette if pal object is not defined. Default value: 16.
  • --mincolorratio?: number: Color quantization will randomize a color if fewer pixels than (total pixels *mincolorratio) has it. Default value: 0.
  • --colorquantcycles?: number: Color quantization will be repeated this many times. Default value: 3.
  • --layering?: 0 | 1: 0: sequential ; 1: parallel
  • --strokewidth?: 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 3 places, 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: Set this to 1..5 for selective Gaussian blur preprocessing. Default value: 0.
  • --blurdelta?: number: RGBA delta treshold for selective Gaussian blur preprocessing. Default value: 20.

TODO

  • [x] document src/options.ts
  • [x] options in readme
  • [x] tests

Related Projects