Sha256: 0a7eb8cb6b35e9e97096966b2b59106f161d390679bdd98583cbe50085f13592
Contents?: true
Size: 664 Bytes
Versions: 18
Compression:
Stored size: 664 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 "Removing 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}'" if $verbose `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
18 entries across 18 versions & 1 rubygems