Class: ImageOptim::Worker::Jhead
- Inherits:
-
ImageOptim::Worker
- Object
- ImageOptim::Worker
- ImageOptim::Worker::Jhead
- Defined in:
- lib/image_optim/worker/jhead.rb
Instance Method Summary collapse
Methods inherited from ImageOptim::Worker
bin_sym, inherited, #initialize, klasses, #optimized?, option, option_definitions
Methods included from OptionHelpers
#assert_options_empty!, #get_option!, limit_with_range
Constructor Details
This class inherits a constructor from ImageOptim::Worker
Instance Method Details
#image_formats ⇒ Object
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 |