diff options
Diffstat (limited to 'src/img/png.nim')
-rw-r--r-- | src/img/png.nim | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/src/img/png.nim b/src/img/png.nim index bd7e6206..d41360a3 100644 --- a/src/img/png.nim +++ b/src/img/png.nim @@ -266,11 +266,9 @@ func paethPredictor(a, b, c: uint16): uint16 = return if pa <= pb and pa <= pc: a elif pb <= pc: b else: c proc unfilter(reader: var PNGReader; irow: openArray[uint8]; bpp: int) = - # none, sub, up -> replace uprow directly - # average, paeth -> copy to temp array, then replace uprow case irow[0] of 0u8: # none - copyMem(addr reader.uprow[0], unsafeAddr irow[1], irow.len) + copyMem(addr reader.uprow[0], unsafeAddr irow[1], irow.len - 1) of 1u8: # sub for i in 1 ..< irow.len: let j = i - 1 # skip filter byte |