Jump to content

Copy image data to clipboard


Recommended Posts

Hi all!

My brain and google skills stopped working and I can't believe there's no simple solution to this.

I have image data (not a displayed image) and I want to copy it to the clipboard. All solutions I found was using getimage or exportimage, which means a dummy indicator and also a small border around the picture (I would use it if I could get rid of that border).

Is there a more sophisticated/simpler method to copy the actual image data/picture? I'm on Windows so it can be platform dependent. Wrapping Clipboard.SetImage would be a solution but maybe some of you have a code sitting around.

Thanks in advance.

Link to comment

Glad you found a solution.  Keep in mind I think that method only works if you have the front panel loaded into memory.  I saw a clipboard API years ago but can't seem to find it now, which would probably work in that edge case better.

Link to comment

Yes, I forgot to add this notion to the post. Not a biggie though, it means that's it's not so practical to subVI this function.
My other concern about such a solution that I'm not sure it works on older platforms if the dummy is off-screen. That's why I placed the dummy on screen and toggled its visibility, but it's not needed nowadays. But I didn't care to test...

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.