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

WebP images that have been inserted to the clipboard using xclip can't be pasted into other programs #151

Open
rodrigomorales1 opened this issue May 22, 2024 · 3 comments

Comments

@rodrigomorales1
Copy link

Steps to reproduce

  1. Insert a WebP image to the clipboard using $ xclip -selection clipboard -t image/webp /tmp/a.webp. You can download a simple image from Wikimedia Commons using the following command: $ wget -O /tmp/a.webp 'https://upload.wikimedia.org/wikipedia/commons/c/c6/Vunosnii-balcon.webp'
  2. Open any of the following programs: Inkscape, GIMP, LibreOffice
  3. Try pressing Ctrl+v to insert the WebP image in the program

What happened?

Although the image is in the clipboard, pressing Ctrl+v doesn't paste the image in the program (be it Inkscape, GIMP or LibreOffice)

What should have happened?

Upon pressing Ctrl+v, the image should have been pasted into the program.

Additional information

When I open the image in Mozilla Firefox 125.0.3 and I right click on the image and I choose the option Copy Image, I can then paste it in any of the aforementioned programs: Inkscape, GIMP and LibreOffice. The image can't be pasted into those programs when the image has been inserted to the clipboard using $ xclip -selection clipboard -t image/webp /tmp/a.webp.

System information

  • Operating system: Ubuntu 22.04.4 LTS
  • xclip version: 0.13
  • inkscape version: Inkscape 1.3.2 (1:1.3.2+202311252150+091e20ef0f)
  • gimp version: GNU Image Manipulation Program version 2.10.30
  • libreoffice version: LibreOffice 7.3.7.2 30(Build:2)
@rodrigomorales1
Copy link
Author

rodrigomorales1 commented May 22, 2024

I have opened an issue related to this topic in the Inkscape bug's repository. Here's the link.

@schrmh
Copy link

schrmh commented Nov 8, 2024

Try xclip -selection clipboard -t image/webp -i /tmp/a.webp (with -i)
This worked for me when your command did not.

Honestly, I was originally speculating about if common terminal emulators don't provide a selection target for images but after clearing by using
xclip -selection clipboard /dev/null
I was able to also use the command you tried and paste the image into another application then.
So maybe we just copied something before / something took priority over image targets. (Before using -i I also tried it with other image files, so this is not webp specific.)
Well, now I get

TARGETS
image/webp

when checking targets via xclip -o -target TARGETS -selection clipboard.
(Sadly I did not check those prior and I can't seem to get into not being able to paste the image again.)

@rodrigomorales1
Copy link
Author

@schrmh I downloaded the same image from my first comment and I used the flag -i as you suggested.

wget -O /tmp/a.webp 'https://upload.wikimedia.org/wikipedia/commons/c/c6/Vunosnii-balcon.webp'
/usr/bin/xclip -selection clipboard -t image/webp -i /tmp/a.webp

I could not paste the image in neither Libreoffice, GIMP nor Inkscape in Ubuntu 24.04.1 LTS.

Gimp showed the message "There is no image data in the clipboard to paste."

Inkscape showed the message "Nothing on the clipboard".

Libreoffice just did nothing when I pressed Ctrl+v. Nothing happened when I right-clicked anywhere in the document and then clicked on "Paste".

System information

lsb_release -a
Distributor ID:	Ubuntu
Description:	Ubuntu 24.04.1 LTS
Release:	24.04
Codename:	noble

All of the programs below were installed using sudo apt install <package-name>.

$ /usr/bin/gimp --version
GNU Image Manipulation Program version 2.10.36
$ /usr/bin/inkscape --version
Inkscape 1.2.2 (b0a8486541, 2022-12-01)
$ /usr/bin/libreoffice --version
LibreOffice 24.2.6.2 420(Build:2)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants