Giter Site home page Giter Site logo

png2svg's Introduction

png2svg

This is a simple tool invoked from the command line which converts a png into an svg that uses jpeg compression. This can significantly reduce image sizes for use on the web.

Installation

Download and unzip the built version, then invoke from the command line or run as a node-webkit app.

Downloads

Usage

d:\png2svg\png2svg.exe -f d:/image.png -q 0.7

Options

-f, --file          Absolute path to png file to convert into an svg
-q, --quality       Image quality, 0-1 (default 0.83)
-s, --show          Keep the node-webkit window open when finished
-p, --webp          Use webp instead of jpeg for the embedded dataUrl

Notes/tips

  • You must provide an absolute file path
  • The generated svg file will be written to the same directory with the same name as the png, but with the .svg extension
  • Use -s to show info/errors (I'd prefer to have all the interaction via command line, but node-webkit doesn't have support for this)
  • Make sure your server gzips svgs!

Related / Thanks

png2svg's People

Contributors

ryan-mcmillan avatar

Watchers

James Cloos avatar Rafael Birkmann avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.