Module: ZIMG::PNG::Scanline::Mixins::Interlaced

Defined in:
lib/zimg/png/scanline_mixins.rb

Overview

scanline decoding

Instance Method Summary collapse

Instance Method Details

#prev_scanline_byte(x) ⇒ Object



10
11
12
13
14
# File 'lib/zimg/png/scanline_mixins.rb', line 10

def prev_scanline_byte(x)
  # When the image is interlaced, each pass of the interlace pattern is
  # treated as an independent image for filtering purposes
  image.adam7.pass_start?(@idx) ? 0 : image.scanlines[@idx - 1].decoded_bytes.getbyte(x)
end