Sha256: 1b33e3b1a5e41fa1f4badf5773e68286cfaf23bb6b60cf19ee4948e10e568f7f
Contents?: true
Size: 616 Bytes
Versions: 4
Compression:
Stored size: 616 Bytes
Contents
require 'psd/layer_info' class PSD class ChannelBlendingRestrictions < LayerInfo def self.should_parse?(key) key == 'brst' end MODES = { 'RGBColor' => ['R', 'G', 'B'], 'CMYKColor' => ['C', 'M', 'Y', 'K'] } attr_reader :restricted_channels, :restricted_channels_by_letter def parse @restricted_channels = [] @restricted_channels_by_letter = [] (@length / 4).times do channel = @file.read_int @restricted_channels << channel @restricted_channels_by_letter << MODES[@layer.header.mode_name][channel] end end end end
Version data entries
4 entries across 4 versions & 1 rubygems