Sha256: bbe79f099e6e620d8f2d3cde5a699032e5163c5b1788109b7a1e64377cd80f00
Contents?: true
Size: 687 Bytes
Versions: 11
Compression:
Stored size: 687 Bytes
Contents
class PSD module ImageMode module Greyscale private def set_greyscale_channels @channels_info = [{ id: 0 }] @channels_info << { id: -1 } if channels == 2 end def combine_greyscale_channel if channels == 2 (0...@num_pixels).step(pixel_step) do |i| grey = @channel_data[i] alpha = @channel_data[@channel_length + i] @pixel_data.push ChunkyPNG::Color.grayscale_alpha(grey, alpha) end else (0...@num_pixels).step(pixel_step) do |i| @pixel_data.push ChunkyPNG::Color.grayscale(@channel_data[i]) end end end end end end
Version data entries
11 entries across 11 versions & 1 rubygems