mirror of
https://github.com/status-im/nimPNG.git
synced 2025-02-05 17:24:23 +00:00
make it work on Nim devel (0.19.9)
"Error: invalid else, all cases are already covered"
This commit is contained in:
parent
36f845e12a
commit
47562af241
@ -2711,8 +2711,6 @@ proc filterScanLine(output: var DataBuf, scanLine, prevLine: DataBuf, len, byteW
|
|||||||
#paethPredictor(scanLine[i - byteWidth], 0, 0) is always scanLine[i - byteWidth]
|
#paethPredictor(scanLine[i - byteWidth], 0, 0) is always scanLine[i - byteWidth]
|
||||||
for i in byteWidth..len-1:
|
for i in byteWidth..len-1:
|
||||||
output[i] = chr(scanLine[i].uint - scanLine[i - byteWidth].uint)
|
output[i] = chr(scanLine[i].uint - scanLine[i - byteWidth].uint)
|
||||||
else:
|
|
||||||
raise PNGError("unsupported filter type")
|
|
||||||
|
|
||||||
proc filterZero(output: var DataBuf, input: DataBuf, w, h, bpp: int) =
|
proc filterZero(output: var DataBuf, input: DataBuf, w, h, bpp: int) =
|
||||||
#the width of a scanline in bytes, not including the filter type
|
#the width of a scanline in bytes, not including the filter type
|
||||||
|
Loading…
x
Reference in New Issue
Block a user