Sha256: e4f2b6ac426fc742fd53e165832f03fcf033fc3d1be1b8028b00afde598389d2

Contents?: true

Size: 661 Bytes

Versions: 15

Compression:

Stored size: 661 Bytes

Contents

class PSD
  module ImageFormat
    module LayerRAW
      private

      # Since we're parsing on a per-channel basis, we need to modify the behavior
      # of the RAW encoding parser a bit. This version is aware of the current
      # channel data position, since layers that have RAW encoding often use RLE
      # encoded alpha channels.
      def parse_raw!(length = @length)
        PSD.logger.debug "Attempting to parse RAW encoded channel..."

        (@chan_pos...(@chan_pos + @ch_info[:length] - 2)).each do |i|
          @channel_data[i] = @file.read(1).bytes.to_a[0]
        end

        @chan_pos += @ch_info[:length] - 2
      end
    end
  end
end

Version data entries

15 entries across 15 versions & 1 rubygems

Version Path
psd-1.5.0 lib/psd/image_formats/layer_raw.rb
psd-1.4.5 lib/psd/image_formats/layer_raw.rb
psd-1.4.4 lib/psd/image_formats/layer_raw.rb
psd-1.4.3 lib/psd/image_formats/layer_raw.rb
psd-1.4.2 lib/psd/image_formats/layer_raw.rb
psd-1.4.1 lib/psd/image_formats/layer_raw.rb
psd-1.4.0 lib/psd/image_formats/layer_raw.rb
psd-1.3.3 lib/psd/image_formats/layer_raw.rb
psd-1.3.2 lib/psd/image_formats/layer_raw.rb
psd-1.3.0 lib/psd/image_formats/layer_raw.rb
psd-1.2.2 lib/psd/image_formats/layer_raw.rb
psd-1.2.1 lib/psd/image_formats/layer_raw.rb
psd-1.2.0 lib/psd/image_formats/layer_raw.rb
psd-1.1.1 lib/psd/image_formats/layer_raw.rb
psd-1.1.0 lib/psd/image_formats/layer_raw.rb