GithubHelp home page GithubHelp logo

josephj / optimg Goto Github PK

View Code? Open in Web Editor NEW
11.0 2.0 2.0 150 KB

A PHP class for optimizing images using best practice. It also includes a CLI interface that you can use for build or commit check.

PHP 100.00%

optimg's Introduction

optimg

A PHP class for optimizing images according to Stoyan Stefanov's Image Optimization articles. It also includes a CLI interface that you can use for build or commit check. Yahoo! has a similar tool called Smush.it. This tool basicly provides the same functionality as it.

Dependencies

You need to have the following executable command-line tools installed in your operating system.

  • ImageMagick
  • jpegtran
  • pngcrush
  • gifsicle
  • pngquant
  • pngout

Installation

$ git clone git://github.com/josephj/optimg.git
$ cd optimg
$ chmod +x optimg
$ ./optimg

Usage

Usage: optimg [options] image_path

  -c, --check-only   Check if path has fully optimized.
  -r, --report-only  Show report without really optimization.
  --png8             Transform all PNG files to PNG8 format.

optimg's People

Contributors

josephj avatar

Stargazers

Uriel avatar Dumitru Uzun avatar rovyrock avatar James Wade avatar Jackson Tian avatar Jason Davis avatar  avatar Tobias Baldauf avatar  avatar Bingo Yang avatar Olivier Mourlevat avatar

Watchers

James Cloos avatar  avatar

Forkers

jasondavis icasa

optimg's Issues

Is it safe not to specify the bin path?

I noticed that on some machines the identify and other commands are located under /usr/local/bin/ rather than /usr/bin, depends on different package managers.

Normally both /usr/bin and /usr/local/bin are in /etc/paths, so Is it safe not to specify the bin path?

Windows

This is great, would be awesome to have a setting to set the paths, so it could be used on Windows as well

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.