Sha256: d4e60f7c39a56169fef9d956e7f56a5971f61f56823c10daaa2ae66168a2956d
Contents?: true
Size: 551 Bytes
Versions: 4
Compression:
Stored size: 551 Bytes
Contents
class PSD module ImageMode module Greyscale private def combine_greyscale_channel if channels == 2 (0...@num_pixels).step(pixel_step) do |i| alpha = @channel_data[i] grey = @channel_data[@channel_length + i] @pixel_data.push ChunkyPNG::Color.greyscale_alpha(grey, alpha) end else (0...@num_pixels).step(pixel_step) do |i| @pixel_data.push ChunkyPNG::Color.greyscale(@channel_data[i]) end end end end end end
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
psd-1.3.0 | lib/psd/image_modes/greyscale.rb |
psd-1.2.2 | lib/psd/image_modes/greyscale.rb |
psd-1.2.1 | lib/psd/image_modes/greyscale.rb |
psd-1.2.0 | lib/psd/image_modes/greyscale.rb |