struct PNG::Scanline
 
  - PNG::Scanline
 - Struct
 - Value
 - Object
 
Overview
A row of pixels including their filtering method
Defined in:
png/scanline.crConstructors
Instance Method Summary
- #[](*args, **options)
 - #[](*args, **options, &)
 - #[]?(*args, **options)
 - #[]?(*args, **options, &)
 - 
        #average(other : Scanline, &block : UInt8 -> Nil)
        
          
Filt(x) = Orig(x) - floor((Orig(a) + Orig(b)) / 2)
 - 
        #average(other : Nil, &block : UInt8 -> Nil)
        
          
Filt(x) = Orig(x) - floor((Orig(a) + Orig(b)) / 2)
 - 
        #average(other : Scanline | Nil, io : IO)
        
          
Filt(x) = Orig(x) - floor((Orig(a) + Orig(b)) / 2)
 - #bit_depth(*args, **options)
 - #bit_depth(*args, **options, &)
 - #bits_per_pixel(*args, **options)
 - #bits_per_pixel(*args, **options, &)
 - #bytes_per_pixel(*args, **options)
 - #bytes_per_pixel(*args, **options, &)
 - #channels(*args, **options)
 - #channels(*args, **options, &)
 - #data : Bytes
 - #data=(data : Bytes)
 - #filter : FilterMethod
 - 
        #filter(previous : Scanline | Nil, &block : UInt8 -> Nil)
        
          
Apply a filter
 - #filter=(filter : FilterMethod)
 - #header : Header
 - #header=(header : Header)
 - 
        #none(&)
        
          
 - 
        #paeth(other : Scanline, &block : UInt8 -> Nil)
        
          
Filt(x) = Orig(x) - PaethPredictor(Orig(a), Orig(b), Orig(c))
 - 
        #paeth(other : Nil, &block : UInt8 -> Nil)
        
          
Filt(x) = Orig(x) - PaethPredictor(Orig(a), Orig(b), Orig(c))
 - 
        #paeth(other : Scanline | Nil, io : IO)
        
          
Filt(x) = Orig(x) - PaethPredictor(Orig(a), Orig(b), Orig(c))
 - 
        #paeth_predict(a, b, c)
        
          
https://www.w3.org/TR/png-3/#bib-paeth
 - 
        #pixel(x : Int) : Indexable(UInt8)
        
          
Return the bytes that represent a pixel at x in this scanline
 - 
        #set_pixel(x : Int, values : Indexable(UInt8)) : Nil
        
          
Sets a pixel in this scanline based on the header
 - 
        #sub(&block : UInt8 -> Nil)
        
          
Filt(x) = Orig(x) - Orig(a) Run the sub filter strategy yielding each modified byte to the block
 - 
        #sub(io : IO)
        
          
Filt(x) = Orig(x) - Orig(a) Run the sub filter strategy yielding each modified byte to the block
 - 
        #unaverage(other : Scanline)
        
          
Removes the type 3 Average filter via:
Recon(x) = Filt(x) + floor((Recon(a) + Recon(b)) / 2) - 
        #unaverage(other : Nil)
        
          
Removes the type 3 Average filter via:
Recon(x) = Filt(x) + floor((Recon(a) + Recon(b)) / 2) - 
        #unfilter(previous : Scanline | Nil)
        
          
Remove any filtering in this scanline @see https://www.w3.org/TR/png-3/#9Filters
 - 
        #unpaeth(other : Scanline)
        
          
Remove the Paeth filter type
Recon(x) = Filt(x) + PaethPredictor(Recon(a), Recon(b), Recon(c)) - 
        #unpaeth(other : Nil)
        
          
Remove the Paeth filter type
Recon(x) = Filt(x) + PaethPredictor(Recon(a), Recon(b), Recon(c)) - 
        #unsub
        
          
Remove the sub filter Recon(x) = Filt(x) + Recon(a)
 - 
        #unup(other : Scanline | Nil)
        
          
Remove the up filter
 - 
        #up(other : Scanline, &block : UInt8 -> Nil)
        
          
Filt(x) = Orig(x) - Orig(b)
 - 
        #up(other : Nil, &block : UInt8 -> Nil)
        
          
Filt(x) = Orig(x) - Orig(b)
 - 
        #up(other : Scanline | Nil, io : IO)
        
          
Filt(x) = Orig(x) - Orig(b)
 
Constructor Detail
Instance Method Detail
Filt(x) = Orig(x) - floor((Orig(a) + Orig(b)) / 2)
Filt(x) = Orig(x) - floor((Orig(a) + Orig(b)) / 2)
Filt(x) = Orig(x) - floor((Orig(a) + Orig(b)) / 2)
Filt(x) = Orig(x) - PaethPredictor(Orig(a), Orig(b), Orig(c))
Filt(x) = Orig(x) - PaethPredictor(Orig(a), Orig(b), Orig(c))
Filt(x) = Orig(x) - PaethPredictor(Orig(a), Orig(b), Orig(c))
Return the bytes that represent a pixel at x in this scanline
Sets a pixel in this scanline based on the header
Filt(x) = Orig(x) - Orig(a) Run the sub filter strategy yielding each modified byte to the block
Filt(x) = Orig(x) - Orig(a) Run the sub filter strategy yielding each modified byte to the block
Remove any filtering in this scanline @see https://www.w3.org/TR/png-3/#9Filters
Remove the Paeth filter type
Recon(x) = Filt(x) + PaethPredictor(Recon(a), Recon(b), Recon(c))
Remove the Paeth filter type
Recon(x) = Filt(x) + PaethPredictor(Recon(a), Recon(b), Recon(c))