Class: ImageSqueeze::OptiPNGProcessor

Inherits:
Processor
  • Object
show all
Defined in:
lib/image_squeeze/processors/optipng_processor.rb

Instance Attribute Summary

Attributes inherited from Processor

#filename

Class Method Summary collapse

Methods inherited from Processor

handles?, output_extension

Class Method Details

.input_typeObject



3
4
5
# File 'lib/image_squeeze/processors/optipng_processor.rb', line 3

def self.input_type
  PNG
end

.squeeze(filename, output_filename) ⇒ Object



7
8
9
# File 'lib/image_squeeze/processors/optipng_processor.rb', line 7

def self.squeeze(filename, output_filename)
  system("optipng -i1 -o7 #{filename} -out=#{output_filename} > /dev/null")
end