Module: Flappy::Parser::Pngcrush

Defined in:
lib/flappy/util/parser/pngcrush.rb

Class Method Summary collapse

Class Method Details

.crush_icon(uncrushed_icon_path, crushed_icon_path) ⇒ Object



17
18
19
# File 'lib/flappy/util/parser/pngcrush.rb', line 17

def crush_icon uncrushed_icon_path, crushed_icon_path
  system("#{png_bin} -iphone #{uncrushed_icon_path} #{crushed_icon_path} &> /dev/null")
end

.png_binObject



9
10
11
# File 'lib/flappy/util/parser/pngcrush.rb', line 9

def png_bin
  @png_bin ||= File.expand_path('../bin/pngcrush', __FILE__)
end

.uncrush_icon(crushed_icon_path, uncrushed_icon_path) ⇒ Object



13
14
15
# File 'lib/flappy/util/parser/pngcrush.rb', line 13

def uncrush_icon crushed_icon_path, uncrushed_icon_path
  system("#{png_bin} -revert-iphone-optimizations #{crushed_icon_path} #{uncrushed_icon_path} &> /dev/null")
end