lib/image_optim/worker/pngout.rb in image_optim-0.29.0 vs lib/image_optim/worker/pngout.rb in image_optim-0.30.0
- old
+ new
@@ -22,19 +22,19 @@
def run_order
2
end
- def optimize(src, dst)
+ def optimize(src, dst, options = {})
args = %W[
-k#{copy_chunks ? 1 : 0}
-s#{strategy}
-q
-y
#{src}
#{dst}
]
- execute(:pngout, *args) && optimized?(src, dst)
+ execute(:pngout, args, options) && optimized?(src, dst)
rescue SignalException => e
raise unless Signal.list.key(e.signo) == 'SEGV'
raise unless resolve_bin!(:pngout).version <= '20150920'
warn "pngout caused Segmentation fault for #{src}"