peek icon indicating copy to clipboard operation
peek copied to clipboard

Copy to clipboard

Open frmdstryr opened this issue 6 years ago • 10 comments

Is there (or would it be possible) to have an option to copy the created gif to the clipboard?

Many websites (ex github) let you paste image data from the clipboard it automatically uploads it as an image.

This app is awesome btw! Thanks!

frmdstryr avatar Dec 15 '17 14:12 frmdstryr

Sounds useful, also for myself :) Should be totally possible.

I am just pretty loaded with work, so it will take a while until I work on features for Peek again. But maybe somebody wants to give this a shot :)

phw avatar Dec 15 '17 14:12 phw

I fear this will be a wontfix. I experimented with it, but when I copy the GIF to the clipboard it will only consist of a single frame as PNG no matter how I try :( From a quick view it looks like the X11 clipboard only supports single pixbuf objects, there seems to be no way to store arbitrary binary data of a certain type.

But I don't have experience with this, I will see if there is anything to be done about it. But it is not looking good at the moment.

phw avatar Jan 05 '18 11:01 phw

Just for the reference a corresponding issue in the Chromium tracker https://bugs.chromium.org/p/chromium/issues/detail?id=356210

ewnd9 avatar Jan 05 '18 15:01 ewnd9

Come to think of it, I've only ever uploaded screenshots using copy and paste. Also tried to copy and paste a gif here and it only uses the url so I guess this is just not supported. Drag and drop seems to be the only way to do this (vs manually browsing).

Perhaps another approach would be to add a "drag" target to the last created file right in peek that you can simply drag and drop from peek? I guess this is not saving much time as it already shows a pop-up to open the file anyways (although I do forget where I save them sometimes and it would be useful).

I can close this if this is a wontfix.

frmdstryr avatar Jan 26 '18 19:01 frmdstryr

The chromium issue mentions the workaround of copying text/html payload instead (basically just a <img src="data:image/png;base64,...">, I will test this.

phw avatar Apr 10 '18 13:04 phw

Some very basic proof of concept, which copies the image to the clipboard after saving.

It allows to:

  • Paste the image into a rich text editor (tested with GMail on Firefox and Chrome and with LibreOffice Writer)
  • Copy the image file with a file manager (tested only with Nautilus)

Also tested in evolution when creating a mail, there it attaches the file to the e-mail.

This won't help to e.g. copy the file into an image editor. It also doesn't cover the case of e.g. github, since there is no rich text editor there (also in my tests data uris did not work in github markdown).

phw avatar Apr 12 '18 11:04 phw

Is there anything new regarding this? I just installed Peek for the first time, on Manjaro KDE, and I'd absolutely love this option.

I came from Windows, and there I'd use ShareX all the time. It could not only record it to the clipboard, but also automatically upload to Imgur or Gfycat, and store the uploaded URL to the clipboard.

What I mostly want, is a quick way to record a GIF from my screen, and paste it to Discord.

Edit: Just tested it a bit more, seems like if I copy a GIF from the file manager and paste it here on GitHub, it does automatically upload it as a GIF and insert it as markdown, so copy-pasting GIFs seems to work here.

On Discord, however, when I copy-paste the GIF from a file manager, it pastes the file path instead, but I think that might be Discord's fault since it does work here on GitHub.

Drag-and-drop works perfectly from a file manager to Discord.

MicaelJarniac avatar Dec 02 '21 14:12 MicaelJarniac

+1 for this feature, would be super useful

renatorib avatar Jun 13 '22 16:06 renatorib

image

I copied this from my browser by right clicking a GIF and selecting Copy Image. I then pasted it in the text input here on GItHub which works as expected. I do the same on Discord all the time. So I feel like it should be possible.

I would love to have this feature to quickly capture GIFs of my screen and share it on Discord to show stuff to friends. I used to use Gyazo on Windows in the past which uploads the GIF to their cloud.

Are there any plans on revisiting this feature request again? Would love to see this implemented <3

locomoco28 avatar Sep 21 '23 07:09 locomoco28

+1, it would increase the usability allot

TerraSkye avatar Jan 16 '24 08:01 TerraSkye