This commit is contained in:
Ryan Oldenburg 2022-06-15 16:00:26 -05:00
parent 1493634920
commit 03c6ee1411

View file

@ -120,7 +120,7 @@ proc unfilter(
for x in 0 ..< rowBytes:
var value = uncompressed.readUint8(uncompressedStartIdx + x)
if x - bpp >= 0:
value += result.readUint8(unfilteredStartIx + x - bpp)
value += result[unfilteredStartIx + x - bpp]
result[unfilteredStartIx + x] = value
of 2: # Up
let
@ -129,7 +129,7 @@ proc unfilter(
for x in 0 ..< rowBytes:
var value = uncompressed.readUint8(uncompressedStartIdx + x)
if y - 1 >= 0:
value += result.readUint8(unfilteredStartIx + x - rowBytes)
value += result[unfilteredStartIx + x - rowBytes]
result[unfilteredStartIx + x] = value
of 3: # Average
let