Project

jpegtran

0.01
No commit activity in last 3 years
No release in over 3 years
Ruby interface to 'jpegtran' tool.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

>= 1.0.0
>= 1.5.2

Runtime

 Project Readme

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.