Sha256: 2057634375443b59cba9c5587a42aa26d4dfc8f3effc9bfad1297269a0a57b87

Contents?: true

Size: 424 Bytes

Versions: 16

Compression:

Stored size: 424 Bytes

Contents

require 'image_optim/worker'

class ImageOptim
  class Worker
    class Gifsicle < Worker
      option(:interlace, false, 'Turn interlacing on'){ |v| !!v }

      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
    end
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
image_optim-0.13.3 lib/image_optim/worker/gifsicle.rb
image_optim-0.13.2 lib/image_optim/worker/gifsicle.rb
image_optim-0.13.1 lib/image_optim/worker/gifsicle.rb
image_optim-0.13.0 lib/image_optim/worker/gifsicle.rb
image_optim-0.12.1 lib/image_optim/worker/gifsicle.rb
image_optim-0.12.0 lib/image_optim/worker/gifsicle.rb
image_optim-0.11.2 lib/image_optim/worker/gifsicle.rb
image_optim-0.11.1 lib/image_optim/worker/gifsicle.rb
image_optim-0.11.0 lib/image_optim/worker/gifsicle.rb
image_optim-0.10.2 lib/image_optim/worker/gifsicle.rb
image_optim-0.10.1 lib/image_optim/worker/gifsicle.rb
image_optim-0.10.0 lib/image_optim/worker/gifsicle.rb
image_optim-0.9.1 lib/image_optim/worker/gifsicle.rb
image_optim-0.9.0 lib/image_optim/worker/gifsicle.rb
image_optim-0.8.1 lib/image_optim/worker/gifsicle.rb
image_optim-0.8.0 lib/image_optim/worker/gifsicle.rb