-
Notifications
You must be signed in to change notification settings - Fork 97
Open
Description
Hello there! I'm adding libsixel support to Notcurses. Everything's working pretty well, except that transparent pixels (A=255 in RGBA8888) aren't being elided. For the attached image, you can see from oiiotool that we've got alphas of either 0 or 255:
...
Pixel (37, 98): 112 72 24 255 (0.439216 0.282353 0.0941177 1)
Pixel (38, 98): 112 72 24 255 (0.439216 0.282353 0.0941177 1)
Pixel (39, 98): 112 72 24 255 (0.439216 0.282353 0.0941177 1)
Pixel (40, 98): 112 72 24 255 (0.439216 0.282353 0.0941177 1)
Pixel (41, 98): 112 72 24 255 (0.439216 0.282353 0.0941177 1)
Pixel (42, 98): 0 0 0 0 (0 0 0 0)
Pixel (43, 98): 0 0 0 0 (0 0 0 0)
Pixel (44, 98): 0 0 0 0 (0 0 0 0)
Pixel (45, 98): 0 0 0 0 (0 0 0 0)
Here's my native decoder:
Here's libsixel:
All the [0 0 0 0] RGBA values have somehow become red, when ideally they wouldn't be included at all.
Some decision function taking the 8 bit alpha input needs yield a 1 bit output of "include" or "elide". It makes sense to me to make this an attribute of the sixel_dither_t that the user can set (just a threshold, not a callback).
I'm happy to write this up, but wanted to ask first whether I'm missing something, or whether this is a good idea.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels

