diff --git a/nimPNG.nim b/nimPNG.nim index 3e94bf5..9a6d38b 100644 --- a/nimPNG.nim +++ b/nimPNG.nim @@ -254,10 +254,10 @@ proc makeChunkType*(val: string): PNGChunkType = proc `$`*(tag: PNGChunkType): string = result = newString(4) let t = int(tag) - result[0] = chr(toU32(t shr 24) and 0xFF) - result[1] = chr(toU32(t shr 16) and 0xFF) - result[2] = chr(toU32(t shr 8) and 0xFF) - result[3] = chr(toU32(t) and 0xFF) + result[0] = chr(uint32(t shr 24) and 0xFF) + result[1] = chr(uint32(t shr 16) and 0xFF) + result[2] = chr(uint32(t shr 8) and 0xFF) + result[3] = chr(uint32(t) and 0xFF) proc `==`(a, b: PNGChunkType): bool = int(a) == int(b) #proc isAncillary(a: PNGChunkType): bool = (int(a) and (32 shl 24)) != 0 diff --git a/tester/testCodec.nim b/tester/testCodec.nim index b08fa45..6f4ac49 100644 --- a/tester/testCodec.nim +++ b/tester/testCodec.nim @@ -24,7 +24,6 @@ proc getNumColorChannels(colorType: PNGcolorType): int = of LCT_PALETTE: result = 1 of LCT_GREY_ALPHA: result = 2 of LCT_RGBA: result = 4 - else: result = 0 proc generateTestImage(width, height: int, colorType = LCT_RGBA, bitDepth = 8): Image = new(result)