Class: ImageOptim::Worker::Gifsicle

Inherits:
ImageOptim::Worker show all
Defined in:
lib/image_optim/worker/gifsicle.rb

Instance Method Summary collapse

Methods inherited from ImageOptim::Worker

#<=>, bin_sym, #image_formats, inherited, #initialize, klasses, #optimized?, option, option_definitions, #run_order

Constructor Details

This class inherits a constructor from ImageOptim::Worker

Instance Method Details

#optimize(src, dst) ⇒ Object



8
9
10
11
12
# File 'lib/image_optim/worker/gifsicle.rb', line 8

def optimize(src, dst)
  args = %W[-o #{dst} -O3 --no-comments --no-names --same-delay --same-loopcount --no-warnings -- #{src}]
  args.unshift('-i') if interlace
  execute(:gifsicle, *args) && optimized?(src, dst)
end