Skip to content

rogercampos/png_quantizator

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
lib
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

PngQuantizator

Build Status

PngQuantizator is a little wrapper around pngquant . Gives you a nice API to interact with the binary and meaningful exceptions in the ruby world if pngquant throws an error.

Installation

Add this line to your application's Gemfile:

gem 'png_quantizator'

And then execute:

$ bundle

Or install it yourself as:

$ gem install png_quantizator

Usage

file = PngQuantizator::Image.new("/path/to/image.png")

# Quantize to a new file
file.quantize_to("/path/to/destination.png")

# Quantize in place
file.quantize!

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

About

Small wrapper around pngquant

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages