Render Images

Chris Carroll-Davis chris at carroll-davis.co.uk
Tue Mar 14 09:06:17 EST 2006


Ian -

DOH!

I saw that in the docs, but just thought it was taking the rect info  
of the object to get a partial screen grab.  Should read more  
carefully... Should read more carefully... Should read more  
carefully... Should read more carefully... Should read more  
carefully... Should read more carefully...

Just tried it with a group and it seems to work beautifully!

C


On 14 Mar 2006, at 13:49, Ian Wood wrote:

> In the docs for import/ export snapshot:
>
> "To export a snapshot of a specific (non-stack) object, use the form:
>
> export snapshot from [rect[angle] ] of chunk to ...
>
> Where chunk is any chunk expression resolving to a control, or any  
> expression evaluating to a control reference."
>
> As usual it took me a little trial and error to turn the docs into  
> actual code, in this case by trying to be too complex - now to see  
> if it'll work on groups...
>
> Ian
>
> On 14 Mar 2006, at 13:43, Chris Carroll-Davis wrote:
>
>> Ian -
>>
>> Thanks so much - that's perfect!   I am writing a multimedia app  
>> that needs to display text in many, many languages.  Whilst  
>> Unicode goes a long to help, it is not a panacea - e.g. can you  
>> display Cambodian and Thai on your machine?  I'm writing a utility  
>> that means that as long as our translators can correctly see the  
>> text (as text) on their machine we can export the text as a  
>> graphic to display correctly within the app on anyone's machine.
>>
>> By the way - where did you find this syntax?  Is there a document  
>> I'm missing?  I checked through the Rev docs and User guide pdf  
>> but couldn't find any reference to it...
>>
>> Thanks again!
>>
>> Chris
>>
>>
>> On 14 Mar 2006, at 13:09, Ian Wood wrote:
>>
>>>
>>> On 14 Mar 2006, at 12:35, Chris Carroll-Davis wrote:
>>>
>>>> A question:  the release blurb for 2.7 says: "Render an image  
>>>> from any object on-screen, preserving the alpha channel, then  
>>>> transform and save."  Now this seems to be exactly what I  
>>>> need!...  I would like to convert some formatted text (i.e. a  
>>>> field) to a PNG file with transparency.  Can I do this in 2.7?   
>>>> Can't find reference to this in docs.
>>>
>>> import snapshot from fld "test"
>>> or
>>> export snapshot from fld "test" to file "test.png" as PNG
>>>
>>> Having made sure that the opaque of the field is set to false  
>>> first so that there is actually some transparency to capture.  
>>> This is VERY powerful as it takes the info from the object  
>>> directly - it doesn't matter if there are other objects on top. A  
>>> dream come true for some of my apps...
>>>
>>>> I can achieve a similar effect by exporting (via snapshot) text  
>>>> on a white background then displaying resulting image using the  
>>>> "multiply" or "screen" inks (which are brilliant, btw) but that  
>>>> limits my options for colours in text.
>>>
>>> If you just want to show text over other colours you can use a  
>>> regular text field with the opaque set to false - no limitations  
>>> on colours, and works in older versions of Rev.
>>>
>>> Ian
>>> _______________________________________________
>>> 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
>>>
>>
>> _______________________________________________
>> 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
>
> _______________________________________________
> 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