Class: ImageOptim::Worker::Jhead
Instance Method Summary
collapse
#<=>, bin_sym, inherited, #initialize, klasses, #optimized?, option, option_definitions
Instance Method Details
7
8
9
|
# File 'lib/image_optim/worker/jhead.rb', line 7
def image_formats
[:jpeg]
end
|
#optimize(src, dst) ⇒ Object
15
16
17
18
19
20
21
22
23
24
|
# File 'lib/image_optim/worker/jhead.rb', line 15
def optimize(src, dst)
if (2..8).include?(EXIFR::JPEG.new(src.to_s).orientation.to_i)
src.copy(dst)
args = %W[-autorot #{dst}]
resolve_bin!(:jpegtran)
execute(:jhead, *args) && dst.size?
else
false
end
end
|
#run_order ⇒ Object
11
12
13
|
# File 'lib/image_optim/worker/jhead.rb', line 11
def run_order
-10
end
|