From ef136ac44db26074bf9528f17dee764f731ed4eb Mon Sep 17 00:00:00 2001 From: bptato Date: Thu, 29 Jun 2023 21:53:19 +0200 Subject: png: fix grayscale regression it's 0x1, not 0x11. oops --- src/img/png.nim | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/img') diff --git a/src/img/png.nim b/src/img/png.nim index 44630420..247c3395 100644 --- a/src/img/png.nim +++ b/src/img/png.nim @@ -292,7 +292,7 @@ proc writepxs(reader: var PNGReader, crow: var openArray[RGBAColor]) = for x in 0 ..< crow.len: let u = reader.uprow[i] let n = case reader.bitDepth - of 1: ((u shr (7 - j)) and 0x11) * 255 + of 1: ((u shr (7 - j)) and 0x1) * 255 of 2: ((u shr (6 - j)) and 0x3) * 85 of 4: ((u shr (4 - j)) and 0xF) * 17 of 8: u -- cgit 1.4.1-2-gfad0