Sha256: aff9c514395651a2ef72825cf3ba8a32faff59d0f111bd817cf01295a49a4712
Contents?: true
Size: 643 Bytes
Versions: 477
Compression:
Stored size: 643 Bytes
Contents
module Snapshot # This class takes care of removing the alpha channel of the generated screenshots class ScreenshotFlatten # @param (String) The path in which the screenshots are located in def run(path) UI.message "Removing the alpha channel from generated png files" flatten(path) end def flatten(path) Dir.glob([path, '/**/*.png'].join('/')).each do |file| UI.verbose("Removing alpha channel from '#{file}'") `sips -s format bmp '#{file}' &> /dev/null` # &> /dev/null because there is warning because of the extension `sips -s format png '#{file}'` end end end end
Version data entries
477 entries across 477 versions & 2 rubygems