Sha256: a4402fb653634aaad13c63951659fa5d50c6ce024d6436e211ed6d06b80d6d0f

Contents?: true

Size: 643 Bytes

Versions: 23

Compression:

Stored size: 643 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!
        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

23 entries across 23 versions & 2 rubygems

Version Path
psd-3.9.0 lib/psd/image_formats/layer_raw.rb
psd-3.8.0 lib/psd/image_formats/layer_raw.rb
psd-3.7.0 lib/psd/image_formats/layer_raw.rb
psd-3.6.0 lib/psd/image_formats/layer_raw.rb
bench9000-0.1 vendor/psd.rb/lib/psd/image_formats/layer_raw.rb
psd-3.5.0 lib/psd/image_formats/layer_raw.rb
psd-3.4.0 lib/psd/image_formats/layer_raw.rb
psd-3.3.3 lib/psd/image_formats/layer_raw.rb
psd-3.3.2 lib/psd/image_formats/layer_raw.rb
psd-3.3.1 lib/psd/image_formats/layer_raw.rb
psd-3.2.4 lib/psd/image_formats/layer_raw.rb
psd-3.2.3 lib/psd/image_formats/layer_raw.rb
psd-3.2.2 lib/psd/image_formats/layer_raw.rb
psd-3.2.1 lib/psd/image_formats/layer_raw.rb
psd-3.2.0 lib/psd/image_formats/layer_raw.rb
psd-3.1.5 lib/psd/image_formats/layer_raw.rb
psd-3.1.4 lib/psd/image_formats/layer_raw.rb
psd-3.1.3 lib/psd/image_formats/layer_raw.rb
psd-3.1.2 lib/psd/image_formats/layer_raw.rb
psd-2.1.2 lib/psd/image_formats/layer_raw.rb