in reply to Copy an image to the Clipboard, Windows

Sounds like an XY problem to me.

What's your real goal? What's your process?

Why not simply save the image(s) (.png, .gif or .jpg or .bmp if necessary) directly to disk and then manipulate them with an appropriate tool.



If I've misconstrued your question or the logic needed to answer it, I offer my apologies to all those electrons which were inconvenienced by the creation of this post.

Replies are listed 'Best First'.
Re^2: Copy an image to the Clipboard, Windows
by remling (Novice) on Oct 16, 2014 at 12:57 UTC
    I have a Tk gui that generates several plots and graphs using the Tk::Canvas. Currently, I allow users to save .gifs, .pngs, .jpegs, etc by converting the canvas to GD, then dump to disk. Several users have asked that I allow them to CNTRL-C the canvas image (copy to clipboard) so they can paste the image into an email, spreadsheet, whatever. It's really more of a convenience... they already have the ability to get the image from the disk save.
      Ok.... so XY problem guess was not PRECISELY on-target; now sounds (to this non-user of Tk:...) like a tradeoff between cost/difficulty (as mentioned by other responders) and your (presumed) desired to please the users.

      But unless they're the source of big$ or major gratification, I probably would not bother!



      If you didn't program your executable by toggling in binary, it wasn't really programming!

        There are dollar and gratification considerations, but at the same time I have bigger fish to fry... was hoping for some low-hanging fruit. The docs for the Win32::clipboard module (uggh) indicate the set method only accepts strings. I can generate requested images on the fly and in memory on the CNTRL-C event... just can't stuff them on the clipboard.
      depending on the machine they are using, maybe you can tell them to try clipx? i am pretty sure that clipx does this (copy images to clipboard) and it also allows you to copy multiple entries at the same time. maybe the users installing clipx could be a solution