Charles wrote:
> Jim,
> 
> Thanks for your comments.  I did use my variable, myImage but I accidentally  
> omitted it. Here is my actual script:
> 
> export snapshot from group id 126899 of card "graph" to myImage as PNG
> set the clipBoardData["image"] to myImage
>    
> go stack "report"
>    
> put myImage into image id 1033 of card "page1" of stack "report" 
> 
> 
> The stack "report" is a substack of my app and is used for printing.  The 
> code is in my print button of my main stack. The above code works but as I 
> mentioned it strips out the text in the image.
Richard's advice is very good.

You might also try this.

on mouseup
        lock screen
        go to card "graph"
        import snapshot from rect (rect of grp id 126899) of window the 
windowid of this stack to myImage as PNG
        put myImage into image id 1033 of card "page1" of stack "report"
        go back
        unlock screen
        -- anything else
end mouseup

This bypasses the issue Richard mentioned and simply does a screen capture of 
the pixels in the area occupied by the group.

Jim Lambert

        
P.S. You may find it necessary to adjust the width and height of img id 1033 
after putting myImage into it.
        set the width of img  image id 1033 of card "page1" to the width of grp 
id 126899   
        set the height of img  image id 1033 of card "page1" to the height of 
grp id 126899             
        


_______________________________________________
use-livecode mailing list
[email protected]
Please visit this url to subscribe, unsubscribe and manage your subscription 
preferences:
http://lists.runrev.com/mailman/listinfo/use-livecode

Reply via email to