Sha256: 4d12e16753d88b878862c0fccee3d7ff427ac8a844acf9e521a3425bf6a82c6c
Contents?: true
Size: 769 Bytes
Versions: 9
Compression:
Stored size: 769 Bytes
Contents
class PSD module ImageMode # Combines the channel data from the image into RGB pixel values module RGB private def combine_rgb_channel PSD.logger.debug "Beginning RGB processing" (0...@num_pixels).step(pixel_step) do |i| r = g = b = 0 a = 255 @channels_info.each_with_index do |chan, index| next if chan[:id] == -2 val = @channel_data[i + (@channel_length * index)] case chan[:id] when -1 then a = val when 0 then r = val when 1 then g = val when 2 then b = val end end @pixel_data.push ChunkyPNG::Color.rgba(r, g, b, a) end end end end end
Version data entries
9 entries across 9 versions & 2 rubygems