Ruby interface to 'jpegtran' tool.
Ruby
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
.document
.gitignore
CHANGES.txt
Gemfile
Gemfile.lock
LICENSE.txt
README.md
Rakefile
VERSION
jpegtran.gemspec
test
test.jpg

README.md

Jpegtran

Jpegtran provides Ruby interface to the jpegtran tool. Some examples follow: (for details, see module documentation)

require "jpegtran"

Jpegtran.available?    # will return true (or false)

options = { :progressive => true, :optimize => true }
Jpegtran.optimize("foo.jpg", options)

# will run 'jpegtran -progressive -optimize -outfile foo.jpg foo.jpg'

It can be also run asynchronously by non-blocking way (with eventmachine) simply by giving block to #optimize. See documentation.

Unsupported Options

The -maxmemory N option isn't supported.

Copyright

Copyright © 2011 – 2015 Martin Poljak. See LICENSE.txt for further details.