Giter Club home page Giter Club logo

pngcrush-installer's Introduction

pngcrush-installer

An NPM-based installer for pngcrush.

#Usage

When installed on a project, pngcrush-installer places the appropriate binary in the relative bin path to the project.

Example:

./node_modules/pngcrush-installer/bin/pngcrush

Should call the pngcrush binary.

This can be accessed if requiring the module within your project by calling

require( 'pngcrush-installer' ).getBinPath()

pngcrush-installer's People

Contributors

htuoma avatar jefflembeck avatar meyer avatar tjoyal avatar wu-wu avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar

pngcrush-installer's Issues

Usage?

Making an npm global install of pngcrush-installer doesn't expose pngcrush as a binary for me.

A local install where I afterwards run node_modules/.bin/pngcrush gives me the following error:

$ ./node_modules/.bin/pngcrush 

/home/munter/falcon/client/node_modules/pngcrush-installer/bin/pngcrush.js:13
    throw err;
          ^
Error: Command failed: 
 | pngcrush 1.7.66
 |    Copyright (C) 1998-2002, 2006-2013 Glenn Randers-Pehrson
 |    Portions copyright (C) 2005       Greg Roelofs
 | This is a free, open-source program.  Permission is irrevocably
 | granted to everyone to use this version of pngcrush without
 | payment of any fee.
 | Executable name is pngcrush
 | It was built with libpng version 1.5.17, and is
 | running with  libpng version 1.5.17 - June 27, 2013

 |    Copyright (C) 1998-2004, 2006-2013 Glenn Randers-Pehrson,
 |    Copyright (C) 1996, 1997 Andreas Dilger,
 |    Copyright (C) 1995, Guy Eric Schalnat, Group 42 Inc.,
 | and zlib version 1.2.8, Copyright (C) 1995-2013,
 |    Jean-loup Gailly and Mark Adler.
 | It was compiled with gcc version 4.6.3.


If you have modified this source, you may insert additional notices
immediately after this sentence.
Copyright (C) 1998-2002, 2006-2013 Glenn Randers-Pehrson
Portions copyright (C) 2005       Greg Roelofs

DISCLAIMER: The pngcrush computer program is supplied "AS IS".
The Author disclaims all warranties, expressed or implied, including,
without limitation, the warranties of merchantability and of fitness
for  any purpose.  The Author assumes no liability for direct, indirect,
incidental, special, exemplary, or consequential damages, which may
result from the use of the computer program, even if advised of the
possibility of such damage.  There is no warranty against interference
with your enjoyment of the computer program or against infringement.
There is no warranty that my efforts or the computer program will
fulfill any of your particular purposes or needs.  This computer
program is provided with all faults, and the entire risk of satisfactory
quality, performance, accuracy, and effort is with the user.

LICENSE: Permission is hereby irrevocably granted to everyone to use,
copy, modify, and distribute this computer program, or portions hereof,
purpose, without payment of any fee, subject to the following
restrictions:

1. The origin of this binary or source code must not be misrepresented.

2. Altered versions must be plainly marked as such and must not be
misrepresented as being the original binary or source.

3. The Copyright notice, disclaimer, and license may not be removed
or altered from any source, binary, or altered source distribution.


usage: pngcrush [options] infile.png outfile.png
       pngcrush -e ext [other options] file.png ...
       pngcrush -d dir/ [other options] file.png ...
       pngcrush -n -v file.png ...
options:
      -already already_crushed_size [e.g., 8192]
         -bail (bail out of trial when size exceeds best size found
    -bit_depth depth (bit_depth to use in output file)
      -blacken (zero samples underlying fully-transparent pixels)
        -brute (use brute-force: try 138 different methods [11-148])
            -c color_type of output file [0, 2, 4, or 6]
            -d directory_name/ (where output files will go)
 -double_gamma (used for fixing gamma in PhotoShop 5.0/5.02 files)
            -e extension  (used for creating output filename)
            -f user_filter [0-5] for specified method
          -fix (fix otherwise fatal conditions such as bad CRCs)
        -force (write a new output file even if larger than input)
            -g gamma (float, e.g., 0.45455)
      -huffman (use only zlib strategy 2, Huffman-only)
         -iccp length "Profile Name" iccp_file
         -itxt b[efore_IDAT]|a[fter_IDAT] "keyword"
         -keep chunk_name
            -l zlib_compression_level [0-9] for specified method
         -loco ("loco crush" truecolor PNGs)
            -m method [1 through 150]
          -max maximum_IDAT_size [default 8192]
          -mng (write a new MNG, do not crush embedded PNGs)
            -n (no save; doesn't do compression or write output PNG)
          -new (Use new default settings (-force and -reduce))
 -newtimestamp (Reset file modification time [default])
       -nobail (do not bail out early from trial -- see "-bail")
  -nofilecheck (do not check for infile.png == outfile.png)
     -nolimits (turns off limits on width, height, cache, malloc)
     -noreduce (turns off "-reduce" operations)
          -old (Use old default settings (no -force and no -reduce))
 -oldtimestamp (Do not reset file modification time)
           -ow (Overwrite)
   -plte_len n (obsolete; positive "n" enables palette reduction)
            -q (quiet)
       -reduce (do lossless color-type or bit-depth reduction)
          -rem chunkname (or "alla" or "allb")
-replace_gamma gamma (float, e.g. 0.45455) even if it is present.
          -res resolution in dpi
          -rle (use only zlib strategy 3, RLE-only)
         -save (keep all copy-unsafe PNG chunks)
         -srgb [0, 1, 2, or 3]
         -ster [0 or 1]
         -text b[efore_IDAT]|a[fter_IDAT] "keyword" "text"
   -trns_array n trns[0] trns[1] .. trns[n-1]
         -trns index red green blue gray
            -v (display more detailed information)
      -version (display the pngcrush version)
            -w compression_window_size [32, 16, 8, 4, 2, 1, 512]
            -z zlib_strategy [0, 1, 2, or 3] for specified method
         -zmem zlib_compression_mem_level [1-9, default 9]
        -zitxt b|a "keyword" "lcode" "tkey" "text"
         -ztxt b[efore_IDAT]|a[fter_IDAT] "keyword" "text"
            -h (help and legal notices)
            -p (pause)

    at ChildProcess.exithandler (child_process.js:548:15)
    at ChildProcess.EventEmitter.emit (events.js:99:17)
    at maybeClose (child_process.js:646:16)
    at Socket.ChildProcess.spawn.stdin (child_process.js:823:11)
    at Socket.EventEmitter.emit (events.js:96:17)
    at Socket._destroy.destroyed (net.js:358:10)
    at process.startup.processNextTick.process._tickCallback (node.js:245:9)

Could you add example usage to the README?

404 on install "old-versions"

The owner of the sourceforge files seems to like namespacing old versions into "old-versions"

http://sourceforge.net/projects/pmt/files/pngcrush/

As we were relying on an older verison of his project via an old version of grunticon everything stopped to work.

Could I suggest you fallback the install from the "old-versions" folder if you can't find it from the recent versions?

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.