sixel: fix crash when splitting up an image across the scrollback
sixel: fix crash when splitting up an image across the scrollback If an image was split up across the scrollback, and the first image chunk was resized due to it being blended with an already existing...
View Articlesixel: destroy(): don’t unref a NULL pixman image
sixel: destroy(): don’t unref a NULL pixman image
View Articlesixel: calculate default bg once, in init
sixel: calculate default bg once, in init We have all information we need to calculate the default background color in sixel_init(): * Whether the image have transparency or not * The current ANSI...
View Articlesixel: avoid looking up color from palette for each sixel
sixel: avoid looking up color from palette for each sixel Instead, do the palette lookup when we receive the DECGCI (i.e. when the palette entry is selected), and store the actual color value in our...
View Articlesixel: call decsixel() directly, instead of going through sixel_put()
sixel: call decsixel() directly, instead of going through sixel_put()
View Articleterm: track cell color source
term: track cell color source Each cell now tracks it’s current color source: * default fg/bg * base16 fg/bg (maps to *both* the regular and bright colors) * base256 fg/bg * RGB Note that we don’t have...
View Articlesixel: VT state’s bg color may now be an index, rather than an actual color...
sixel: VT state’s bg color may now be an index, rather than an actual color value
View Articlesixel: resize: truncate instead of failing, when new size exceeds max size
sixel: resize: truncate instead of failing, when new size exceeds max size If the size we’re trying to set exceeds the configured max size, truncate instead of failing.
View Articlesixel: DECGRI (repeat) with a count of 0 should emit a single sixel
sixel: DECGRI (repeat) with a count of 0 should emit a single sixel
View Articlesixel: revert to default state when an invalid DECGRI character is received
sixel: revert to default state when an invalid DECGRI character is received
View Articlesixel/terminal: use the new grid and selection APIs
sixel/terminal: use the new grid and selection APIs Use grid_row_abs_to_sb() instead of manually “rebasing” row numbers. Use selection_get_{start,end}() to retrieve the current selection coordinates.
View Articlesixel: add sixel_reflow_grid()
sixel: add sixel_reflow_grid() This function reflows all sixels in the specified grid. The pre-existing sixel_reflow() function is a shortcut for sixel_reflow_grid(term, &term->normal)...
View Articlesixel: don’t crash when sixel image exceeds current sixel max height
sixel: don’t crash when sixel image exceeds current sixel max height When we try to resize a sixel past the current max height, we set col > image-width to signal this. This means ‘width’ could be...
View ArticleTag a couple variables with UNUSED, to fix warnings with clang-15
Tag a couple variables with UNUSED, to fix warnings with clang-15 Closes #1278
View Articlesixel: apply background alpha when P2=0 or P2=2, and current bg color is the...
sixel: apply background alpha when P2=0 or P2=2, and current bg color is the default bg color Closes #1360
View Articlesixel: fix cursor positioning logic
sixel: fix cursor positioning logic This adjusts the logic that positions the text cursor after emitting a sixel, when sixel scrolling mode is *enabled*. We’ve always mimicked XTerm’s behavior....
View Articlesixel: respect sixel aspect ratio
sixel: respect sixel aspect ratio That is, parse P1 when initializing a new sixel, and don’t ignore pad/pad in the raster attributes command. The default aspect ratio is 2:1, but most sixels will...
View Articlesixel: stop cropping images to the last non-transparent row
sixel: stop cropping images to the last non-transparent row
View Articlesixel: minor fixes after implementing support for non-1:1 aspect ratios
sixel: minor fixes after implementing support for non-1:1 aspect ratios * Lazy initialize image height. This is necessary to prevent garbage from being rendered for "empty" sixels. * Fix plotting of...
View Articlesixel: regression: linefeed count for chunked up sixel image
sixel: regression: linefeed count for chunked up sixel image All image chunks but the last *should* scroll the screen content.
View Articlesixel: ensure enough rows have been scrolled in, to fit the image
sixel: ensure enough rows have been scrolled in, to fit the image When emitting a sixel, we need to: a) scroll terminal content to ensure the new image fits b) position the text cursor Recent changes...
View Articlesixel: assert upper pixel of last sixel maps to last image row, *or lower*
sixel: assert upper pixel of last sixel maps to last image row, *or lower*
View Articlesixel: special case parsing of images with an aspect ratio of 1:1
sixel: special case parsing of images with an aspect ratio of 1:1 Images with an aspect ratio of 1:1 are by far the most common (though not the default). It makes a lot of sense, performance wise, to...
View Articlesixel: refactor: shorten very verbose switch case statements
sixel: refactor: shorten very verbose switch case statements
View Articlesixel: add_ar_11(): manually unroll loop
sixel: add_ar_11(): manually unroll loop This generates both smaller, and faster code
View Articlesixel: re-scale images when the cell dimensions change
sixel: re-scale images when the cell dimensions change Before this patch, when the cell dimensions changed (i.e. when the font size changes), sixel images were either removed (the new cell dimensions...
View Articlesixel: fix regression for DECGRI with a repeat count of 0
sixel: fix regression for DECGRI with a repeat count of 0
View Articlesixel: erase: fix clearing of cell->attrs.clean
sixel: erase: fix clearing of cell->attrs.clean When erasing a sixel, the cells underneath it must be marked as 'dirty', in order to be re-rendered. This was not being done correctly; the for loop...
View ArticleDon't use fancy Unicode quotes, stick to ASCII
Don't use fancy Unicode quotes, stick to ASCII
View Articlesixel: fix row height calculation in resize_vertically()
sixel: fix row height calculation in resize_vertically() In resize_vertically(), we assumed a sixel is 6 pixels tall. This is mostly true, but not for non-1:1 sixels. Or, to be more precise, not for...
View Articlesixel: performance improvements
sixel: performance improvements * Store pointer to current pixel (i.e. pixel we're about to write to), instead of a row-byte-offset. This way, we don't have to calculate the offset into the backing...
View Articlesixel: debug: fix logged width/height values when emitting sixel
sixel: debug: fix logged width/height values when emitting sixel image.width and image.height are the scaled dimensions, and these haven't been set when the log message is printed.
View Articlesixel: we no longer need the extra newline
sixel: we no longer need the extra newline Since we never place the cursor *under* the sixel anymore.
View Articlesixel: debug: sixel image _may_ be zero-sized
sixel: debug: sixel image _may_ be zero-sized For example, and single GNL (Graphical New Line) will result in a sixel with a non-zero height, but a zero width.
View Articlesixel: don't try to emit a sixel if we're outside the image's boundaries
sixel: don't try to emit a sixel if we're outside the image's boundaries Closes #1634
View Articlesixel: initialize the color table to colors used by the VT340
sixel: initialize the color table to colors used by the VT340
View Articlesixel: place cursor on the last character row touched by the sixel
sixel: place cursor on the last character row touched by the sixel After emitting a sixel, place the cursor on the character row touched by the last sixel. The last sixel _may_ not be a multiple of 6...
View Articlesixel: trim trailing, fully transparent sixel rows
sixel: trim trailing, fully transparent sixel rows See https://github.com/hpjansson/chafa/issues/192
View Articlesixel: RA region does not affect the text cursor position
sixel: RA region does not affect the text cursor position The raster attributes is, really, just a way to erase an area. And, if the sixel is transparent, it's a nop. The final text cursor position...
View Articlesixel: hopefully handle image height correctly when trimming
sixel: hopefully handle image height correctly when trimming When trimming trailing empty rows from the final image, handle the RA region correctly: * If image is transparent, trim down to the last...
View Articlesixel: fix cursor positioning when image is split up into several
sixel: fix cursor positioning when image is split up into several
View Articlesixel: abuse wmemset() when initializing a freshly allocated image buffer
sixel: abuse wmemset() when initializing a freshly allocated image buffer wmemset() is heavily optimized, and in some cases, *much* faster than manually initializing the new image pixels. Furthermore,...
View Articlesixel: also set 'alloc_height', when short-cutting a resize operation
sixel: also set 'alloc_height', when short-cutting a resize operation In some cases, a sixel may be resized vertically, while still having a zero-width. In this case, the resize operations are...
View Articlesixel: don't allow pan/pad changes after sixel data has been emitted
sixel: don't allow pan/pad changes after sixel data has been emitted Changing pan/pad changes the sixel's aspect ratio. While I don't know for certain what a real VT340 would do, I suspect it would...
View Articlesixel: comment: document the P1 parameter
sixel: comment: document the P1 parameter (and no, it's no longer unimplemented)
View Articleterm: performance: use a bitfield to track which ascii printer to use
term: performance: use a bitfield to track which ascii printer to use The things affecting which ASCII printer we use have grown... Instead of checking everything inside term_update_ascii_printer(),...
View Articlesixel: default bg color is now taken from the sixel palette, not the ANSI bg...
sixel: default bg color is now taken from the sixel palette, not the ANSI bg color The wording in the original VT340 documentation is vague: Pixel positions specified as 0 are set to the current...
View Articleconfig: add color.sixelN options
config: add color.sixelN options These options allows you to configure the default sixel color palette.
View Article