diff options
author | bptato <nincsnevem662@gmail.com> | 2023-06-29 21:53:19 +0200 |
---|---|---|
committer | bptato <nincsnevem662@gmail.com> | 2023-06-29 21:53:19 +0200 |
commit | ef136ac44db26074bf9528f17dee764f731ed4eb (patch) | |
tree | 228cab22145defd6ee74635a38ab0e93436359f1 /src/img | |
parent | a7b784589a6667865669d54db801e975ad3d5cd1 (diff) | |
download | chawan-ef136ac44db26074bf9528f17dee764f731ed4eb.tar.gz |
png: fix grayscale regression
it's 0x1, not 0x11. oops
Diffstat (limited to 'src/img')
-rw-r--r-- | src/img/png.nim | 2 |
1 files changed, 1 insertions, 1 deletions
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 |