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
copy snapshot of card rectangle into image container
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: copy snapshot of card rectangle into image container
Hi Jalz,
almost:
...
EXport snapshot from rectangle 15,50,600,600 of card "Print 1" of stack "Print" TO img "your image here..."
...
Best
Klaus
almost:
...
EXport snapshot from rectangle 15,50,600,600 of card "Print 1" of stack "Print" TO img "your image here..."
...

Best
Klaus
-
- VIP Livecode Opensource Backer
- Posts: 10052
- Joined: Sat Apr 08, 2006 7:05 am
- Contact:
Re: copy snapshot of card rectangle into image container
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
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn