Class: PngCommand

Inherits:
Object
  • Object
show all
Includes:
BaseCommand
Defined in:
lib/favicon_maker/png_command.rb

Instance Method Summary collapse

Methods included from BaseCommand

#on_windows?, #options_to_args, #run_convert, #to_s

Constructor Details

#initialize(template_file_path, output_file_path, size, options) ⇒ PngCommand

Returns a new instance of PngCommand.



5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/favicon_maker/png_command.rb', line 5

def initialize(template_file_path, output_file_path, size, options)

  convert_settings = [
    [ :define,      "png:include-chunk=none,trns,gama"  ],
    [ :format,      "png"                               ],
    [ :resize,      size                                ],
    [ :gravity,     "center"                            ],
    [ :background,  "none"                              ],
    [ :extent,      size                                ],
  ]

  run_convert(template_file_path, output_file_path, convert_settings, options, :png)

end