Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
jmburnod
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
-
Contact:
Post
by jmburnod » Fri Jul 14, 2017 9:05 am
Hi Bidge,
I tested your script
Code: Select all
export snapshot from cd "ImageAreaCard" of stack "ImageArea" to image "W1" of stack "ToPrint"
it works for me (LC indy 8.1.3, OS X 10.12.3)
What version of LC do you use ?
Best regards
Jean-Marc
Last edited by
jmburnod on Fri Jul 14, 2017 9:09 am, edited 1 time in total.
https://alternatic.ch
-
bidgeeman
- Posts: 495
- Joined: Wed Feb 21, 2007 7:58 am
- Location: Australia
Post
by bidgeeman » Fri Jul 14, 2017 9:09 am
Hello Jean - Marc.
I had to go back to using Livecode 8.14 as I struck a terrible bug in V9.0. Not sure what was causing it as I went over the code several times and just could not get rid if it. In 8.14 it works like a charm.
Bidge
-
Klaus
- Posts: 13829
- Joined: Sat Apr 08, 2006 8:41 am
- Location: Germany
-
Contact:
Post
by Klaus » Fri Jul 14, 2017 4:36 pm
Hi David,
bidgeeman wrote:Code: Select all
export snapshot from cd "ImageAreaCard" of stack "ImageArea" to image "W1" of stack "ToPrint"
that is NOT the code I posted, Sir!
So no wonder it uses GLOBAL screen coordinates as you experienced.
Best
Klaus
-
jmburnod
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
-
Contact:
Post
by jmburnod » Fri Jul 14, 2017 6:03 pm
Hi Klaus,
I was surprised that
Code: Select all
export snapshot from cd "ImageAreaCard" of stack "ImageArea" to image "W1" of stack "ToPrint"
works. I also expected a snapshot of screen from 0,0.
Do you have an idea why ?
Best
Jean-Marc
https://alternatic.ch
-
Klaus
- Posts: 13829
- Joined: Sat Apr 08, 2006 8:41 am
- Location: Germany
-
Contact:
Post
by Klaus » Fri Jul 14, 2017 6:29 pm
Bonsoir Jean-Marc,
sorry, no idea why!?
Obviously this has changed in recent versions, but I still prefer to use the RECT syntax.
Best
Klaus
-
bidgeeman
- Posts: 495
- Joined: Wed Feb 21, 2007 7:58 am
- Location: Australia
Post
by bidgeeman » Sat Jul 15, 2017 12:44 am
Hi Klaus.
I actually used the "rect" part of the code as well.....as usual it was probably one of my typo's.
My apologies and again, thanks for pointing that out as I will go back and find the error.
Thanks
Bidge
-
jacque
- VIP Livecode Opensource Backer
- Posts: 7237
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
-
Contact:
Post
by jacque » Sat Jul 15, 2017 3:42 pm
Klaus wrote:Obviously this has changed in recent versions, but I still prefer to use the RECT syntax.
One advantage of snapshotting an object instead of a rect is that you get the correct image even if the object is covered by another object, or is on a different card, or even on a different stack. It can even be offscreen. The snapshot can optionally include effects and metadata.
The reason Jean-Marc didn't get a full screen image is because the script specified a card object. To get a full screen shot it would need a rectangle in global coordinates.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
-
jmburnod
- VIP Livecode Opensource Backer
- Posts: 2718
- Joined: Sat Dec 22, 2007 5:35 pm
- Location: Genève
-
Contact:
Post
by jmburnod » Sat Jul 15, 2017 7:35 pm
Hi Jacqueline,
Thanks for explanations
The reason Jean-Marc didn't get a full screen image is because the script specified a card object. To get a full screen shot it would need a rectangle in global coordinates.
You refresh my brain and I remember:
Code: Select all
import snapshot from rect (the rect of this cd) of this cd
import an image of current cd
Best regards
Jean-Marc
https://alternatic.ch