From 4c100a255470d8ebdd3d90b012a1d6581912af2c Mon Sep 17 00:00:00 2001 From: Ryan Oldenburg Date: Wed, 15 Jun 2022 14:27:25 -0500 Subject: [PATCH] f --- src/pixie/fileformats/png.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/pixie/fileformats/png.nim b/src/pixie/fileformats/png.nim index d6986de..1850318 100644 --- a/src/pixie/fileformats/png.nim +++ b/src/pixie/fileformats/png.nim @@ -138,11 +138,11 @@ proc unfilter( for x in 0 ..< rowBytes: var value = uncompressed.readUint8(uncompressedStartIdx + x) - left, up: int + left, up: uint32 if x - bpp >= 0: - left = result[unfilteredStartIx + x - bpp].int + left = result[unfilteredStartIx + x - bpp] if y - 1 >= 0: - up = result[unfilteredStartIx + x - rowBytes].int + up = result[unfilteredStartIx + x - rowBytes] value += ((left + up) div 2).uint8 result[unfilteredStartIx + x] = value of 4: # Paeth