Sha256: d87a8580f0baa6250f47c206fae99ce84a69992affa18c7aecfb5d31f7a6531d
Contents?: true
Size: 720 Bytes
Versions: 6
Compression:
Stored size: 720 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| 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
6 entries across 6 versions & 1 rubygems