Skip to content

A wrapper around pngquant, pngnq and pngout for Mac OS X to easily convert and optimize png24 to 8-bit png. Variants can be previewed with Preview.app (interactive mode, -i).

perifer/png8

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 

Repository files navigation

png8 is a commandline tool for OS X that converts 24-bit PNG images to 8-bit PNG. Most common graphic programs can't export to 8-bit PNG with alpha transparency even though it's by far the most useful file format for the web.

Further reading on the advantages of 8-bit PNG:

http://www.sitepoint.com/png8-the-clear-winner
http://html5boilerplate.com/docs/Notes-on-using-png
http://calendar.perfplanet.com/2010/png-that-works

Features

  • Uses two different converters (pngquant and pngnq) with sane defaults and options.
  • Converts several files at once and ignores files that already are 8-bit PNG.
  • Preview different alternatives and choose the best one (interactive mode).
  • Uses pngout if available to further reduce file size.

Installation

curl https://raw.githubusercontent.com/perifer/png8/master/png8 >> /usr/local/bin/png8 && chmod u+x /usr/local/bin/png8

Download and install dependencies manually:

pngquant
pngnq
pngout

Or install with homebrew:

brew install pngquant
brew install pngnq
brew install jonof/kenutils/pngout

Examples

Convert file.png with pngquant and create a backup of the original file:

png8 file.png

Skip backup (Overwrite) and convert all PNGs in a specific directory. 8-bit PNGs in the same directory are ignored:

png8 -O images/*.png

Preview different alternatives (interactive) and save to directory "img":

png8 -i file.png -d img

List all options:

png8 --help

About

A wrapper around pngquant, pngnq and pngout for Mac OS X to easily convert and optimize png24 to 8-bit png. Variants can be previewed with Preview.app (interactive mode, -i).

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages