From 1c9277343140effcc9eee8845757afd1eed4f4bd Mon Sep 17 00:00:00 2001 From: bptato Date: Tue, 24 Sep 2024 23:25:07 +0200 Subject: sixel: support transparency Sixel can only represent transparency for fully transparent (alpha = 0) and fully opaque (alpha = 255) pixels, i.e. we would have to do blending ourselves to do this "properly". But what do you even blend? Background color? Images? Clearly you can't do text... So instead of going down the blending route, we now just approximate the 8-bit channel with Sixel's 1-bit channel and then patch it up with dither. It does look a bit weird, but it's not *that* bad, especially compared to the previous strategy of "blend with some color which hopefully happens to be the background color" (it rarely was). Note that this requires us to handle transparent images specially in term. That is, for opaque ones, we can leave out the "clear cells affected by image" part, but for transparent ones, we must clear the entire image every time. --- todo | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'todo') diff --git a/todo b/todo index e6b14ece..21e78282 100644 --- a/todo +++ b/todo @@ -69,7 +69,7 @@ layout engine: - iframe - writing-mode, grid, ruby, ... (i.e. cool new stuff) images: -- z order, proper image blending +- z order - animation man: - add a DOM -> man page converter so that we do not depend on pandoc -- cgit 1.4.1-2-gfad0