| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
Replace screen-coordinate image placements with immutable pixel images referenced by ordinary grid cells. Draw visible marker runs through the redraw scene using per-client sixel or text backends so images follow history, copy mode, clipping and overwrites.
Use the DEC hue origin and channel order, and round percentage and HLS conversions to the nearest byte value.
Retain the padded canonical pixel canvas separately from the image content. Scale only the populated portion of partial edge cells so an image keeps its exact raster size on the originating terminal while retaining its cell footprint.
Build an adaptive 256-colour palette with median cut instead of using a fixed colour cube. Apply Floyd-Steinberg error diffusion while mapping pixels to reduce banding and preserve image detail.
|
Here are a few quick comments:
|
Sorry, something went wrong.
|
image_get_text_cell could just go into image.c and image-ascii.c could be removed. |
Sorry, something went wrong.
…77. Kitty images now use the adaptive 256-colour median-cut palette with direct nearest-colour mapping.
…n the image, the image was overflowing lines and banding.
…xel.c:1077. Kitty images now use the adaptive 256-colour median-cut palette with direct nearest-colour mapping." This reverts commit 00ffe74.
I've done this. There are 3 branches now: |
Sorry, something went wrong.
I looked into this. Unfortunately not really. Kitty uses a 24-bit image-id so internally it becomes 32-bits. Kitty also handles things like the x and y and other things as uint so reducing the x and y to 16 bits would introduce a lot more checking and could potentially cause an issue with large images. The tradeoff to save a few bytes here is not going to be worth it.
I would not add a union there. Although graphical backends replace the character with a space, the other fields still matter:
In particular, an image flag is not immutable: later grid operations can clear or replace it while retaining the rest of A separate image-specific extended-cell representation could save memory, but it would require explicit conversion logic
I've propagated the checks using this in the 4902-image-support branch to the foundation sixel branch now.
Done. image_sample, image_cell, image, and image_rectangle are now private to image.c; tmux.h contains only forward declarations and the accessor interface. The SIXEL, Kitty, and fallback renderers now use those accessors rather than reaching into the image structures directly.
fixed.
Done.
should be fixed now.
Done. |
Sorry, something went wrong.
|
An extra 12 bytes is adding almost a third to the size of grid_extd_entry and it is heavily used now. I think we should ignore images more than 64k wide or 64k high and reduce the X and Y to u_short. Even with an enormous 64 x 64 pixels per cell, that would be an image of 1000 x 1000 cells. Or, if you could store X and Y as cells instead of pixels you could have the image as 64k cells wide or high, which would be impossible to reach. For the ID, it is silly to store the same 32 bit ID in every cell which references the image and waste four bytes in cells which have no image. Nobody will have 4 billion images. So I would either:
|
Sorry, something went wrong.
|
You don't need to store the data in the same format in grid_extd_entry and grid_cell - the latter can be any size and the image_id can just be looked up in grid_get_cell1. Everything outside grid.c would see it as 32 bits. |
Sorry, something went wrong.
This reverts commit 3e3567b.
…ne later overwritten by text. On a SIXEL terminal, damaged cells are omitted from image output; on Kitty they remain ordinary positional placements.
…d first in the cell.
Scale SIXEL rasters uniformly when clients have different cell dimensions, while retaining the original logical cell canvas as blank padding. Map crops using real cell boundaries so partial final cells are not stretched or compressed.
| Back | FazBrowse Home | New Git URL |
Replace screen-coordinate image placements with immutable pixel images referenced by ordinary grid cells. Draw visible marker runs through the redraw scene using per-client sixel or text backends so images follow history, copy mode, clipping and overwrites.