Class: JpegCompressor

Inherits:
Compressor show all
Defined in:
lib/compressors/jpegCompressor.rb

Constant Summary

Constants included from SqweezeUtils

SqweezeUtils::EMBED_MIME_TYPES

Instance Attribute Summary

Attributes inherited from Compressor

#byteweight_after, #byteweight_before, #input_file_extensions

Instance Method Summary collapse

Methods inherited from Compressor

#collect_filepaths, #compress, #concatenate_files, #filextension2regexpstr, #print_summary, #process, #set_command, #size_check

Methods included from SqweezeUtils

#ansi_bold, #ansi_green, #ansi_nocolour, #ansi_red, #ansi_yellow, #byteweight, #compression_percentage, #encoded_contents, #find_file_in_targetdir, #mime_type, #notify, #remap_filepath, #write_file

Constructor Details

#initializeJpegCompressor

Returns a new instance of JpegCompressor.



2
3
4
5
# File 'lib/compressors/jpegCompressor.rb', line 2

def initialize
  super(['jpeg','jpg'])
  set_command(:jpegtran,'%executable% -copy none -optimize -outfile %output% %input%')
end