def scanline_at index_or_range
      base = self
      prev_filters = self.filter_types
      filter_codecs = Array.new(prev_filters.size)
      scanlines = []
      index_or_range = self.filter_types.size - 1 if index_or_range == -1
      range = index_or_range.is_a?(Range) ? index_or_range : [index_or_range]

      at = 0
      scanline_positions.push(@filtered_data.size).inject do |pos, delimit|
        if range.include? at
          s = Scanline.new(@filtered_data, pos, (delimit - pos - 1), at) do |scanline|
            if base.fabricate_scanline(scanline, prev_filters, filter_codecs)
              base.apply_filters(prev_filters, filter_codecs)
            end
            base.compress
          end
          scanlines << s
        end
        at += 1
        delimit
      end
      scanlines.size <= 1 ? scanlines.first : scanlines
    end
def scanline_at index_or_range
      base = self
      prev_filters = self.filter_types
      filter_codecs = Array.new(prev_filters.size)
      scanlines = []
      index_or_range = self.filter_types.size - 1 if index_or_range == -1
      range = index_or_range.is_a?(Range) ? index_or_range : [index_or_range]

      at = 0
      scanline_positions.push(@filtered_data.size).inject do |pos, delimit|
        if range.include? at
          s = Scanline.new(@filtered_data, pos, (delimit - pos - 1), at) do |scanline|
            if base.fabricate_scanline(scanline, prev_filters, filter_codecs)
              base.apply_filters(prev_filters, filter_codecs)
            end
            base.compress
          end
          scanlines << s
        end
        at += 1
        delimit
      end
      scanlines.size <= 1 ? scanlines.first : scanlines
    end
Access particular scanline(s) at passed +index_or_range+.

 It returns a single Scanline or an array of Scanline.