Help with export snapshot

Mark Schonewille m.schonewille at economy-x-talk.com
Fri Apr 8 12:25:33 CDT 2011


Hi Tom,

Whenever you mention you get an error, you should post that error.

You define a rect, but you don't tell LiveCode what the rect belongs to.

Your approach:
put the rect of graphic "PreviewRect" of group "PreviewGroup" of this card into myRect
export snapshot from rect myRect to tPreviewImage as PNG

This should be:
export snapshot from rect myRect of this cd to tPreviewImage as PNG

I'm not sure that you actually need to define this rect separately. Can't you export it directly?

export grc "PreviewRect" of grp "PreviewGroup" of this cd to tPreviewImage as PNG

--
Best regards,

Mark Schonewille

Economy-x-Talk Consulting and Software Engineering
Homepage: http://economy-x-talk.com
Twitter: http://twitter.com/xtalkprogrammer
KvK: 50277553

New: Download the Installer Maker Plugin 1.6 for LiveCode here http://qery.us/ce

On 8 apr 2011, at 18:55, Thomas McGrath III wrote:

> I just figured this out and then due to another problem lost the code. For the life of me I can't remember what I just did.
> 
>   if exists (graphic "PreviewRect" of group "PreviewGroup" of this card) then
>        export snapshot from rect (the rect of graphic "PreviewRect" of group "PreviewGroup" of this card) to tPreviewImage as PNG
>        put  tPreviewImage into image "PreviewImage" of group (the short name of this card)
>    end if
> 
> This code will copy from the relative (window) coordinates as the docs state: "Important!  If a window, stack or object is specified, the rectangle is given in relative (window) coordinates; otherwise, it is given in absolute coordinates." EXCEPT an object is not specified but a rect is!!!
> 
> 
> Tried with erro:
> export snapshot from the rect of graphic "PreviewRect" of group "PreviewGroup" of this card to tPreviewImage as PNG
> 
> This one grabs the rect itself and not what is in front of it like I need:
> export snapshot from graphic "PreviewRect" of group "PreviewGroup" of this card to tPreviewImage as PNG
> 
> 
> 
> Any one feel like showing me what I'm doing wrong here????
> 
> Thanks
> 
> -- Tom McGrath III
> http://lazyriver.on-rev.com
> 3mcgrath at comcast.net




More information about the use-livecode mailing list