Sha256: 1493dbc047a36810a9b8a5250b656c60c5480995503b408cd8b3e67f63ac88d4
Contents?: true
Size: 704 Bytes
Versions: 5
Compression:
Stored size: 704 Bytes
Contents
class PSD::Image::Mode # 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 PSD::Image::CHANNEL_INFO.each_with_index do |chan, index| next if channels == 3 && chan[:id] == -1 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 r, g, b, a end end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
psd-1.0.0 | lib/psd/image_modes/rgb.rb |
psd-0.4.2 | lib/psd/image_modes/rgb.rb |
psd-0.4.1 | lib/psd/image_modes/rgb.rb |
psd-0.4.0 | lib/psd/image_modes/rgb.rb |
psd-0.3.5 | lib/psd/image_modes/rgb.rb |