imageclipr
imageclipr copied to clipboard
Clipboard data is not an image
Hi!
I am on Debian 11. The same bug appears on XFCE and Cinnamon Desktop Environment. I installed the extension following the instructions, including installing the xclip package in linux. However, when I execute the paste image addin command, I get the following error message:
Error in save_clipboard_image(img_file_name, dir = dirname(file_path)) : Clipboard data is not an image.
I have looked around and I am suspecting the native clipboard to somehow interfere with xclip ability to handle the image once I copy it to the clipboard.
Maxime
Hi Maxime,
thanks for your comment. The error occurs here: https://github.com/Toniiiio/imageclipr/blob/4b49aef08aa50b2a9c14eaff9298cfa10bbd6f5c/R/insertImageCode.R#L64 so it seems no picture was created on disk.
Sys.info()[1]
should yield "Linux" for you. So the error should occur after https://github.com/Toniiiio/imageclipr/blob/4b49aef08aa50b2a9c14eaff9298cfa10bbd6f5c/R/insertImageCode.R#L46.
Your xclip installation should have been succesful. Otherwise it should throw an earlier error.
So the error has to be in https://github.com/Toniiiio/imageclipr/blob/4b49aef08aa50b2a9c14eaff9298cfa10bbd6f5c/R/insertImageCode.R#L54.
I am not the contributor of the linux code part. But i remember having the discussion of whether only png pictures are taken care of.
Could you re-test with a png picture and tell me if that works?
Hi @Toniiiio , I have the same issue on Ubuntu 22.04. I tried using a png file, but it did not work either. I'm rather sure I've used this package on previous versions of R/Rstudio and Ubuntu without issues.