Kitty Graphics Protocol - image scaling enhancements #8458
monsterkodi
started this conversation in
Ideas
Replies: 2 comments 5 replies
-
On Thu, Mar 20, 2025 at 09:02:21AM -0700, monsterkodi wrote:
Hello,
here are two ideas how the image scaling of the graphics protocol could be even more versatile:
- add possibility to turn off the linear filtering.
- add possibility to specify bottom and right pixel offset.
reasoning:
One might want to highlight/overlay certain areas with a semi-transparent color.
The most efficient way to do this would be an image with just one pixel, scaled to the desired area.
Right now this doesn't work, since the linear filtering produces a kind of 'cushion' effect.
You can instead generate an indexed PNG with a single color, it should
compress very well and work for this purpose.
It is possible to specify pixel perfect top and left corners of the area via the X and Y parameters,
but it is not possible to specify exact bottom and right corners (at least i don't know how).
Top, left and width, height give you exact bottom, right.
|
Beta Was this translation helpful? Give feedback.
1 reply
-
On Thu, Mar 20, 2025 at 11:51:35AM -0700, monsterkodi wrote:
Thanks for your fast reply!
I will try out the PNG idea. But i still think it would be nice to be able to opt out of the filtering ;)
Nice sure, worth the overhead of modifying the protocol and then needing
to have some way to detect it across terminal emulators, etc., no. As it
is kitty is the only terminal emulator that implements the spec in its
entirety, I'd rather not complicate it further for a niche use case. The
use case is covered by indexed PNG fairly efficiently.
Maybe I am stupid, but I don't think it is possible right now to simultaneously scale an image up and place it at an arbitrary pixel location. From what i understand, the only way to scale images up in size is by specifying `c` and `r` (cols and rows to span) and
when i do that, the lower right corner is always at a cell border, even when i offset the top left corner with `X` and `Y`.
Not in combination with scaling, no. Without scaling, absolutely.
|
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
here are two ideas how the image scaling of the graphics protocol could be even more versatile:
reasoning:
One might want to highlight/overlay certain areas with a semi-transparent color.
The most efficient way to do this would be an image with just one pixel, scaled to the desired area.
Right now this doesn't work, since the linear filtering produces a kind of 'cushion' effect.
It is possible to specify pixel perfect top-left corner of the area via the X and Y parameters,
but it is not possible to specify an exact bottom-right corner (at least i don't know how).
It would be really nice, if one could specify the desired image size in pixels with W and H.
Beta Was this translation helpful? Give feedback.
All reactions