Sha256: b2445daab553966ada6d6c906e8d5af37d926d4805817ed5a3cfa465bb8396b4
Contents?: true
Size: 593 Bytes
Versions: 12
Compression:
Stored size: 593 Bytes
Contents
require 'image_optim' class ImageOptim class Jpegtran < Worker # Copy all chunks or none (defaults to false) attr_reader :copy # Create progressive JPEG file (defaults to true) attr_reader :progressive private def parse_options(options) get_option!(options, :copy, false){ |v| !!v } get_option!(options, :progressive, true){ |v| !!v } end def command_args(src, dst) args = %W[-optimize -outfile #{dst} #{src}] args.unshift '-copy', copy ? 'all' : 'none' args.unshift '-progressive' if progressive args end end end
Version data entries
12 entries across 12 versions & 1 rubygems