lib/image_optim/worker/jpegtran.rb in image_optim-0.17.1 vs lib/image_optim/worker/jpegtran.rb in image_optim-0.18.0

- old
+ new

@@ -21,16 +21,23 @@ jpegrescan ? [:jpegtran, :jpegrescan] : [:jpegtran] end def optimize(src, dst) if jpegrescan - args = %W[#{src} #{dst}] + args = %W[ + #{src} + #{dst} + ] args.unshift '-s' unless copy_chunks resolve_bin!(:jpegtran) execute(:jpegrescan, *args) && optimized?(src, dst) else - args = %W[-optimize -outfile #{dst} #{src}] - args.unshift '-copy', copy_chunks ? 'all' : 'none' + args = %W[ + -optimize + -outfile #{dst} + #{src} + ] + args.unshift '-copy', (copy_chunks ? 'all' : 'none') args.unshift '-progressive' if progressive execute(:jpegtran, *args) && optimized?(src, dst) end end end