Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Re: Images and the Clipboard

From: sanghabum:aol at: 23-Aug-2001 5:38

[greggirwin--starband--net]
> I'm new to REBOL, so pardon my ignorance but would it be possible (if > somewhat inefficient) to convert the image to a base 64 string, and write
it
> to the clipboard that way? Could you then also wrote out a clip-format
value
> as meta-data for reconversion?
Hi Gregg, welcome to Rebol, It's fun, fast and frustrating in equal measures. I've tried loads of combinations of this sort of type, and not hit on one that works....Rebol often seems more like being lost in a maze than coding. I think the problem has two halves. First the Clipboard is undocumented (not in the Rebol Core 2.3 PDF: which doesn't cover View, but is worth downloading for all the goodies it does contains). That suggests to me that it is a half-finished feature. "mb" comments that the clipboard will take images on an Amiga, though not read them back. Second is probably a Windows issue. I don't know the clipboard API in Windows, but the clipboard can clearly contain structured data: raw text, rtf, images, etc. Just writing binary to the clipboard is unlikely to work as I need to also tell Windows what sort of data is there. And that I don't know how to do, or even if it is possible. And, of course, my code would no longer be portable if I bowed to a windows limitation. All I was trying to do was implement a screen capture routine in such a way that the user could then paste it straight into another program. As the Windows/Rebol clipboard doesn't support (as far as I can tell) anything but text, I've just had to give the user a little more work: I'm writing out a file instead: save/png %mytempfile %myimage --Thanks for the help --Colin.