New topic: 

Change extension at runtime

<http://forums.realsoftware.com/viewtopic.php?t=34361>

         Page 1 of 1
   [ 5 posts ]                 Previous topic | Next topic          Author  
Message        serd83          Post subject: Change extension at runtimePosted: 
Tue Jun 22, 2010 5:29 pm                         
Joined: Thu Feb 22, 2007 7:08 pm
Posts: 1153                It is possible to add for example JPEG, PNG, etc. 
pictures(I change the extension before to .txt for example) to the IDE and 
change the extension at runtime to JPEG, PNG, etc. and assign it to a picture 
variable?   
                             Top                mjh          Post subject: Re: 
Change extension at runtimePosted: Tue Jun 22, 2010 5:38 pm                     
    
Joined: Sun Feb 19, 2006 3:10 pm
Posts: 779
Location: Hamburg, Germany                I don’t think so; the contents of 
the file gets interpreted at compile-time. Why would one want to do that 
anyway?      
_________________
Michael J. Hußmann 
http://digicam-experts.de  
                             Top                serd83          Post subject: 
Re: Change extension at runtimePosted: Tue Jun 22, 2010 5:50 pm                 
        
Joined: Thu Feb 22, 2007 7:08 pm
Posts: 1153                When I have a lot of JPEG pictures and add it to the 
IDE, the application will be large. I thought to add instead the JPEG files 
with a .txt extension(the application have so much fewer MB). I know that there 
are alternatives like loading the pictures from a database or simple a folder.

Thanks   
                             Top                mjh          Post subject: Re: 
Change extension at runtimePosted: Tue Jun 22, 2010 6:04 pm                     
    
Joined: Sun Feb 19, 2006 3:10 pm
Posts: 779
Location: Hamburg, Germany                serd83 wrote:When I have a lot of 
JPEG pictures and add it to the IDE, the application will be large. I thought 
to add instead the JPEG files with a .txt extension(the application have so 
much fewer MB).
You could write the contents of the .txt file to a temporary .jpg file and read 
that back in. It would be simpler to load the image from a JPEG file within the 
application package (under Mac OS X) or some external folder.      
_________________
Michael J. Hußmann 
http://digicam-experts.de  
                             Top                pony          Post subject: Re: 
Change extension at runtimePosted: Tue Jun 22, 2010 6:39 pm                     
            
Joined: Sat Nov 11, 2006 2:43 pm
Posts: 767
Location: DFW area, Texas, USA                serd83 wrote:When I have a lot of 
JPEG pictures and add it to the IDE, the application will be large. I thought 
to add instead the JPEG files with a .txt extension(the application have so 
much fewer MB). I know that there are alternatives like loading the pictures 
from a database or simple a folder.

Thanks

I presume this is on Windows? Christian just posted that on Windows the images 
get converted to bitmaps, this doesn't happen on Mac OS, they remain JPEGs. 

This post details converting strings to pictures which may be what you are 
looking for:
viewtopic.php?p=42928#p42928

I use one of the MBS plugins to do the same thing.      
_________________
Fly like a mouse, run like a cushion, be the small bookcase.
http://www.wish-sandwich.com  
                             Top             Display posts from previous: All 
posts1 day7 days2 weeks1 month3 months6 months1 year Sort by AuthorPost 
timeSubject AscendingDescending          Page 1 of 1
   [ 5 posts ]      
-- 
Over 1500 classes with 29000 functions in one REALbasic plug-in collection. 
The Monkeybread Software Realbasic Plugin v9.3. 
http://www.monkeybreadsoftware.de/realbasic/plugins.shtml

[email protected]

Reply via email to