Ruby interface to 'jpegtran' tool.
Ruby
Latest commit 070f8e9 Aug 15, 2015 Martin Poljak 'hash-utils' dependency removed, minor bugfix
Permalink
Failed to load latest commit information.
lib 'hash-utils' dependency removed, minor bugfix Aug 15, 2015
.document initial commit May 27, 2011
.gitignore aptana files to gitignore Sep 8, 2011
CHANGES.txt 'hash-utils' dependency removed, minor bugfix Aug 15, 2015
Gemfile 'hash-utils' dependency removed, minor bugfix Aug 15, 2015
Gemfile.lock
LICENSE.txt rakefile and gemspec update Aug 15, 2015
README.md rakefile and gemspec update Aug 15, 2015
Rakefile rakefile and gemspec update Aug 15, 2015
VERSION
jpegtran.gemspec 'hash-utils' dependency removed, minor bugfix Aug 15, 2015
test initial commit May 27, 2011
test.jpg initial commit May 27, 2011

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.