Page 1 of 1

copy snapshot of card rectangle into image container

Posted: Fri Jul 25, 2014 8:36 pm
by jalz
Hey all,

I would like to copy a specific rectangle on one of my cards and paste it into a image object Looking through the dictionary, I have found the following code which pretty much copies the card and the size I want, but it doesn't place it where I want, any chance someone can point me in the right direction please.

import snapshot from rectangle 15,50,600,600 of card "Print 1" of stack "Print"

Thanks
Jalz

Re: copy snapshot of card rectangle into image container

Posted: Fri Jul 25, 2014 8:41 pm
by Klaus
Hi Jalz,

almost:
...
EXport snapshot from rectangle 15,50,600,600 of card "Print 1" of stack "Print" TO img "your image here..."
...
:D


Best

Klaus

Re: copy snapshot of card rectangle into image container

Posted: Fri Jul 25, 2014 8:42 pm
by jalz
Ahhh Thanks :)

Re: copy snapshot of card rectangle into image container

Posted: Fri Jul 25, 2014 8:43 pm
by FourthWorld
Import snapshot is pretty much limited to creating an image object, but export snapshot is much more flexible, allowing among other things the ability to put the image contents into a variable. Once there, you can simply put the contents of that variable into any existing image object:

Code: Select all

 export snapshot from rect 20,20,500,500 to tVar as png
put tVar into img 1