From 86c133f37ec41e4dce39c692696228e8151fe75c Mon Sep 17 00:00:00 2001 From: bptato Date: Mon, 5 Jun 2023 12:56:52 +0200 Subject: Fix 16bit grayscale bug --- src/img/bitmap.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/img') diff --git a/src/img/bitmap.nim b/src/img/bitmap.nim index 03048f4d..f944ad59 100644 --- a/src/img/bitmap.nim +++ b/src/img/bitmap.nim @@ -436,7 +436,7 @@ proc writepxs(reader: var PNGReader, crow: var openArray[RGBAColor]) = of 2: ((u shr (6 - j)) and 3) * 85 of 4: ((u shr (6 - j)) and 15) * 17 of 8: u - of 16: u div 2 + of 16: u # we ignore the lower 8 bits. else: 0 j += int(reader.bitDepth) i += j div 8 -- cgit 1.4.1-2-gfad0