hzeller / timg

A terminal image and video viewer.
GNU General Public License v2.0
1.91k stars 73 forks source link

Images rendered blurry in fzf preview. #102

Closed yrammos closed 1 year ago

yrammos commented 1 year ago

When timg is used as image viewer for fzf previews, images appear blurry in Kitty without the -p kitty parameter.

With the aforementioned parameter, previews do not work at all: a string of characters is instead dumped.

Command passed to fzf:

timg -p kitty -E --frames=1 --loops=1 -g $(( $COLUMNS / 2 - 4 ))x$(( $FZF_PREVIEW_LINES * 2 )) "$1"

hzeller commented 1 year ago

With 'blurry' you mean that it outputs it as block graphics ?

I suspect fzf filters out the non-standard escape codes that are used to send the image to kitty. Applications that provide an terminal app do that often to prevent munging the UI elements.

There is nothing timg can do here, you need to ask the fzf project if it is possible to allow certain image output extension like the kitty protocol.

yrammos commented 1 year ago

Makes sense — thank you, @hzeller.