Sha256: ba27501bbb5b51b4a25739a060e41b0521b910d696672f74c865c110a96b996c
Contents?: true
Size: 720 Bytes
Versions: 12
Compression:
Stored size: 720 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) Helper.log.info "Going to remove the alpha channel from generated png files" flatten(path) end def flatten(path) Dir.glob([path, '/**/*.png'].join('/')).each do |file| Helper.log.info "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 Helper.log.info "Finished removing the alpha channel." end end end
Version data entries
12 entries across 12 versions & 1 rubygems