copying an image

J. Landman Gay jacque at hyperactivesw.com
Mon May 5 13:10:26 EDT 2014


On 5/5/14, 11:42 AM, larry at significantplanet.org wrote:
> I used your:
>    put the clipboarddata["image"]
> in a variety of ways, but could not make it work.
 > The dictionary says "set the clipboardData..."  not put.

Sorry, I wasn't clear. I used "put" just to see the binary data in the 
message box. Later in my post I mentioned setting the imagedata but I 
wasn't specific about it.

> Then I used this code in a button:
>
> on mouseUp
>
> set the clipboardData["image"] to image myLastImage
>
> put the clipboard
>
> end mouseUp
>
>
>
> The message box pops up saying "image"
>
> BUT, I still having nothing on my Windows (XP) clipboard!!

I see, you want to transfer the image to another program. The image is 
there, when I check on my Mac ("Show clipboard" in the Finder's edit 
menu) it isn't displayed but the clipboard says it contains a TIFF 
image. When I try to paste into Graphic Converter, it says the image 
contains two formats and gives me a choice: png or TIFF. I can paste 
either one into a blank document. The original I copied was a png.

It works with either of these:

copy img 1
set the clipboarddata["image"] to img 1

So maybe we need a way to specify that only a certain format should be 
included in the image content. I would guess the ability to paste 
elsewhere would depend on the receiving app's ability to separate the 
two formats and choose one. Graphic Converter is good that way, it puts 
up a dialog and asks which one to use.

-- 
Jacqueline Landman Gay         |     jacque at hyperactivesw.com
HyperActive Software           |     http://www.hyperactivesw.com




More information about the use-livecode mailing list