Scott Rossi wrote:
> Anyone know if this is possible without referencing a windowID?
> This fails with a script error:
> import snapshot from stack "xyz"
> This defaults to selecting a region to capture and then fails:
> import snapshot of stack "xyz"
> This works, but clips the snapshot if any portion of the stack appears
> outside the screenRect:
> import snapshot from window windowID
> I'd prefer to avoid capturing the current card of a stack, but may
> fall back to that.
Go with card if you can't guarantee placement of the window.
The "from" option renders the object into a new buffer set up just for
the snapshot, while the older "of" syntax grabs the object's rect from
the composite screen buffer.
LiveCode renders only the content region of a window but the window
itself is rendered by the OS, so it has no choice but to obtain that
image from the screen buffer.
Fourth World Systems
Software Design and Development for the Desktop, Mobile, and the Web
Thanks for that great tip! I was just grumbling about the poor image quality of my exported snapshots (on Win7, LC 7.0.5). I tried your syntax "from card" instead of a rect or object, and it's a night and day difference. Gradients, photos and type are much smoother in the image from the card, even when I alter the size of the snapshot.