realbasic-nug
[Top] [All Lists]

Re: String -> Picture (and back)

To: REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: String -> Picture (and back)
From: Matthias Buercher <reader at belle-nuit dot com>
Date: Thu, 31 Jan 2002 03:38:32 +0200
>>Does anybody have a good String->Picture routine (and one that will 
>>go Picture->String as well?).  I am writing a little resource 
>>extractor routine that I would like to have convert some named 
>>resources (strings) into the pictures that show up in ResEdit.
>
>Check out Michio Ono's plugins at:
>       http://micono.hoops.ne.jp/rb/index_e.html
>
>He's got one that can (among other things) convert a picture to/from 
>a MemoryBlock.  And you can use MemoryBlock.StringValue to convert 
>this to/from a string.
>
>However, this may not work for what you're trying to do -- do you 
>mean that you need to interpret PICT data, of the sort stored as a 
>PICT resource in ResEdit?  If so that's a different matter entirely, 
>and I don't have a good solution for it on hand.  You'd need either a 
>plugin or some Declares.

if you aren't completely anti-harddisk you can create a temporary file, 
write to the ressourcefork a ressource of type PICT with addresssource 
and then read it back with getpicture.

matthias


-----------------------------------------------------
matthias buercher  belle nuit montage  fax 4112742114
matti at belle-nuit dot com        http://www.belle-nuit.com   
-----------------------------------------------------



<Prev in Thread] Current Thread [Next in Thread>