Giter Site home page Giter Site logo

vector-playing-cards's Introduction

Vector Playing Cards

This is a simple collection of SVG images defining a deck of playing cards (based on vector-playing-cards) and a script (svg2png.py) which will convert a folder of svg files into arbitrarily sized png files.

Usage:

svg2png.py [-h] -i INPUTDIR -o OUTPUTDIR [-q] [-x] [-n] -w WIDTH

Generate fixed width PNGs from SVGs    
optional arguments:
  -h, --help            show this help message and exit
  -i INPUTDIR           Input directory of SVGs
  -o OUTPUTDIR          Output directory of PNGs
  -v, --verbose         Verbose output
  -x, --nocrush         Don't optimize resulting PNGs
  -n, --dry-run         Show commands without running them
  -w WIDTH              PNG output width

Example use:

  • Simple: Convert SVGs to 300px wide uncompressed PNGs:

    python svg2png.py -v -x -i cards-svg -o cards-png-300px -w 300

  • Normal: Create SVGs to 320px wide optimized PNGs suppressing all status output

    python svg2png.py -i cards-svg -o cards-png-320px -w 320

Prerequisites:

To generate custom PNG images, you'll want the following tools:

  • MacOSX:

    • Homebrew: ruby -e "$(curl -fsSL https://raw.github.com/Homebrew/homebrew/go/install)"
    • svg2png: brew install svg2png
    • optipng: brew install optipng
    • advdef: brew install advancecomp
    • montage: brew install imagemagick
  • Python 2.7 (generate-png.py uses argparse which is Python 2.7 only)

Notes:

Non optimized PNGs are approximately a third larger.

##License

These images, scripts and subsequent transformational output (e.g. custom sized PNGs) are released into the public domain or optionally licensed under the WTFPL in juristictions where the public domain is not a recognized legal concept. Either way, do as you see fit: relicense, embed in commercial, non-commercial or open-source software, etc.

The original source images were released by Byron Knoll into the public domain on Google Code as vector-playing-cards . Perhaps send him

Bitdeli Badge

vector-playing-cards's People

Contributors

bitdeli-chef avatar notpeter avatar

Watchers

 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.