lib/image_optim/worker/optipng.rb in image_optim-0.29.0 vs lib/image_optim/worker/optipng.rb in image_optim-0.30.0

- old
+ new

@@ -28,11 +28,11 @@ def run_order -4 end - def optimize(src, dst) + def optimize(src, dst, options = {}) src.copy(dst) args = %W[ -o #{level} -quiet -- @@ -40,10 +40,10 @@ ] args.unshift "-i#{interlace ? 1 : 0}" unless interlace.nil? if strip && resolve_bin!(:optipng).version >= '0.7' args.unshift '-strip', 'all' end - execute(:optipng, *args) && optimized?(src, dst) + execute(:optipng, args, options) && optimized?(src, dst) end def optimized?(src, dst) interlace ? dst.size? : super end