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

Copy to clipboard #247

Open
frmdstryr opened this issue Dec 15, 2017 · 10 comments
Open

Copy to clipboard #247

frmdstryr opened this issue Dec 15, 2017 · 10 comments

Comments

@frmdstryr
Copy link

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!

@phw
Copy link
Owner

phw commented Dec 15, 2017

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
Copy link
Owner

phw commented Jan 5, 2018

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.

@ewnd9
Copy link

ewnd9 commented Jan 5, 2018

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

@frmdstryr
Copy link
Author

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.

@phw
Copy link
Owner

phw commented Apr 10, 2018

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 added a commit that referenced this issue Apr 12, 2018
Allows animation to be pasted into rich text editors and file to be copied with file managers.

See #247
@phw
Copy link
Owner

phw commented Apr 12, 2018

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 phw removed the help wanted label Apr 12, 2018
@MicaelJarniac
Copy link

MicaelJarniac commented Dec 2, 2021

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.

@renatorib
Copy link

+1 for this feature, would be super useful

@locomoco28
Copy link

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

@TerraSkye
Copy link

+1, it would increase the usability allot

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

No branches or pull requests

7 participants