Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transparent images in Kitty are displayed with artefacts #1781

Closed
hankertrix opened this issue Oct 14, 2024 · 4 comments
Closed

Transparent images in Kitty are displayed with artefacts #1781

hankertrix opened this issue Oct 14, 2024 · 4 comments
Labels
invalid This doesn't seem right

Comments

@hankertrix
Copy link
Contributor

What system are you running Yazi on?

Linux X11

What terminal are you running Yazi in?

kitty 0.36.4

yazi --debug output

Yazi
    Version: 0.3.3 (Arch Linux 2024-09-05)
    Debug  : false
    OS     : linux-x86_64 (unix)

Ya
    Version: 0.3.3 (Arch Linux 2024-09-05)

Emulator
    Emulator.via_env: ("xterm-kitty", "")
    Emulator.via_csi: Ok(Kitty)
    Emulator.detect : Kitty

Adapter
    Adapter.matches: Kitty

Desktop
    XDG_SESSION_TYPE           : Some("x11")
    WAYLAND_DISPLAY            : None
    DISPLAY                    : Some(":0")
    SWAYSOCK                   : None
    HYPRLAND_INSTANCE_SIGNATURE: None
    WAYFIRE_SOCKET             : None

SSH
    shared.in_ssh_connection: false

WSL
    WSL: false

Variables
    SHELL              : Some("/bin/bash")
    EDITOR             : Some("nvim")
    VISUAL             : Some("nvim")
    YAZI_FILE_ONE      : None
    YAZI_CONFIG_HOME   : None

Text Opener
    default: Some(Opener { run: "${EDITOR:-vi} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })
    block  : Some(Opener { run: "${EDITOR:-vi} \"$@\"", block: true, orphan: false, desc: "$EDITOR", for_: None, spread: true })

Multiplexers
    TMUX               : false
    tmux version       : No such file or directory (os error 2)
    ZELLIJ_SESSION_NAME: None
    Zellij version     : No such file or directory (os error 2)

Dependencies
    file             : 5.45
    ueberzugpp       : No such file or directory (os error 2)
    ffmpegthumbnailer: 2.2.3
    magick           : 7.1.1-39
    fzf              : 0.55.0
    fd               : 10.2.0
    rg               : 14.1.1
    chafa            : No such file or directory (os error 2)
    zoxide           : No such file or directory (os error 2)
    7z               : 17.05
    7zz              : No such file or directory (os error 2)
    jq               : 1.7.1


--------------------------------------------------
When reporting a bug, please also upload the `yazi.log` log file - only upload the most recent content by time.
You can find it in the "/home/hanker/.local/state/yazi" directory.

Did you try the latest nightly build to see if the problem got fixed?

Yes, and I updated the debug information above (yazi --debug) to the nightly that I tried

Describe the bug

The image previewer for Kitty is displaying weird artefacts on transparent PNG images like shown:

image

This is how it should look like:

image

Minimal reproducer

Preview these images in Yazi:

chin-chin
cultist
dancer
doll
fascination
frangiclave
grimoire
injury

You will find that all of them have weird artefacts.

Anything else?

Joshuto seems to preview these images just fine, as shown:

image

Joshuto uses ratatui-image to do its image previews, so maybe following what ratatui-image does would work.

@hankertrix hankertrix added the bug Something isn't working label Oct 14, 2024
@hankertrix hankertrix changed the title Transparent images in Kitty are displayed with artifacts Transparent images in Kitty are displayed with artefacts Oct 14, 2024
@sxyazi
Copy link
Owner

sxyazi commented Oct 14, 2024

Version: 0.3.3 (Arch Linux 2024-09-05)

Yazi has supported transparent images only since PR #1556. Currently, you need to use the nightly version.

@sxyazi sxyazi closed this as not planned Won't fix, can't repro, duplicate, stale Oct 14, 2024
@sxyazi sxyazi added invalid This doesn't seem right and removed bug Something isn't working labels Oct 14, 2024
@sxyazi
Copy link
Owner

sxyazi commented Oct 14, 2024

Also make sure to do a yazi --clear-cache after upgrading to the latest version

@hankertrix
Copy link
Contributor Author

Ah I see, I forgot to do yazi --clear-cache after running the latest master version.

Sorry for the noise.

Copy link

I'm going to lock this issue because it has been closed for 30 days. ⏳
This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please file a new issue and complete the issue template so we can capture all the details necessary to investigate further.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 14, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
invalid This doesn't seem right
Projects
None yet
Development

No branches or pull requests

2 participants