lib/image_optim/worker/jpegtran.rb in image_optim-0.29.0 vs lib/image_optim/worker/jpegtran.rb in image_optim-0.30.0
- old
+ new
@@ -21,27 +21,27 @@
def used_bins
jpegrescan ? [:jpegtran, :jpegrescan] : [:jpegtran]
end
- def optimize(src, dst)
+ def optimize(src, dst, options = {})
if jpegrescan
args = %W[
#{src}
#{dst}
]
args.unshift '-s' unless copy_chunks
resolve_bin!(:jpegtran)
- execute(:jpegrescan, *args) && optimized?(src, dst)
+ execute(:jpegrescan, args, options) && optimized?(src, dst)
else
args = %W[
-optimize
-outfile #{dst}
#{src}
]
args.unshift '-copy', (copy_chunks ? 'all' : 'none')
args.unshift '-progressive' if progressive
- execute(:jpegtran, *args) && optimized?(src, dst)
+ execute(:jpegtran, args, options) && optimized?(src, dst)
end
end
end
end
end