aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorbptato <nincsnevem662@gmail.com>2024-04-27 19:09:37 +0200
committerbptato <nincsnevem662@gmail.com>2024-04-27 19:09:37 +0200
commitb3eeab53df6af843b835c4c717f71c79dabc3ba8 (patch)
treebb177409375f53752604f294ee4923e5e9598ce1 /src
parenta87aae2ee477089fb45d9bf085f31966b2afe833 (diff)
downloadchawan-b3eeab53df6af843b835c4c717f71c79dabc3ba8.tar.gz
term: remove background color blending in sixel
Diffstat (limited to 'src')
-rw-r--r--src/local/term.nim10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/local/term.nim b/src/local/term.nim
index 129411c3..85347f49 100644
--- a/src/local/term.nim
+++ b/src/local/term.nim
@@ -684,22 +684,14 @@ proc outputSixelImage(term: Terminal; x, y, offx, offy, dispw, disph: int;
let W = int(dispw) - offx
var n = offy * int(bmp.width)
let L = disph * int(bmp.width)
- let cx0 = offx div term.attrs.ppc
while n < L:
var bands = newSeq[SixelBand]()
- let cy = n div int(bmp.width) div term.attrs.ppl
for i in 0 ..< 6:
if n >= bmp.px.len:
break
let mask = 1u8 shl i
for x in 0 ..< W:
- let cx = cx0 + x div term.attrs.ppc
- let bgcolor0 = term.canvas[cy * term.canvas.width + cx].format.bgcolor
- let bgcolor = if bgcolor0.t == ctRGB:
- bgcolor0.rgbcolor
- else:
- term.defaultBackground
- let c = RGBColor(bgcolor.blend(bmp.px[n + x + offx])).toEightBit()
+ let c = RGBColor(bmp.px[n + x + offx]).toEightBit()
if (let j = bands.find(c); j != -1):
bands[j].data[x] = bands[j].data[x] or mask
else: