Import from rect

Thomas McGrath III mcgrath3 at mac.com
Fri Jan 16 16:17:21 EST 2009


Richard,

Actually a snapshot of an object does not take an exact snapshot  
following the attributes of the object (transparency, etc.) but a  
snapshot of the rect of the object will follow the attributes  
(transparency, etc.)

Tom

Tom McGrath III
Lazy River Software
3mcgrath at comcast.net

iTunes Library Suite - libITS
Information and download can be found on this page:
http://www.lazyriversoftware.com/RevOne.html





On Jan 16, 2009, at 12:33 PM, Richard Gaskin wrote:

> Thomas McGrath III wrote:
>> I have the following line of code in a stack which works great but   
>> seems to me to be wrong:
>> import snapshot from rect (the rect of img "TEST2") of card "Test"  
>> of  stack "Tester" -- Works as expected
>> So if I fix it to what I think it should be it doesn't work but   
>> snapshots from the actual stack or card but not the rect of the  
>> image:
>> import snapshot from rect (the rect of img "TEST2" of card  
>> "Gradient  Lab" of stack "LRSGradientText") -- Does not work as  
>> expected
>> Any ideas or the obvious answer that I might be missing. Example  
>> one  does work and I am using it but every time I go through my  
>> code I try  to 'fix' it with example two and then it doesn't work.  
>> This is the  fifth time I broke it trying to fix it..... But it  
>> ain't broke......
>
> Offhand I don't know why the latter isn't working, but you might  
> consider using the new form of "export snapshot" which allows you to  
> specify the object rather than merely its rect:
>
>  export snapshot from grp "MyGroup" to file "MyImage.jpg" as jpeg
>
> This will cause the object specified to be rendered into an  
> offscreen buffer directly, then that buffer is compressed into the  
> specified format for writing to disk.
>
> The benefit here may be that the card on which the object resides  
> doesn't even need to be opened to get its image exported.
>
> HTH -
>
> --
> Richard Gaskin
> Fourth World
> Revolution training and consulting: http://www.fourthworld.com
> Webzine for Rev developers: http://www.revjournal.com
> _______________________________________________
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your  
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-revolution




More information about the use-livecode mailing list