dcsimg
Using in memory representation of gif files.
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Anonymous
Posted On:   Friday, January 4, 2002 08:54 AM

I am using setIconImage to change the coffee cup Icon on most default Java Frames. I have no problem with loading a gif or jpg file with toolkit.getImage("image.gif"). setIconImage().., etc.. My question is: How can I "hardcode" the image that I load in such that my program is not dependent on loading an image file? Can I use a Memory based representation of the image file and make it into a variable or set of variables. I would then be interested in converting from either jpg or gif to this in memory format. Thanks Please use html tags to format code blocks.    More>>

I am using setIconImage to change the coffee cup Icon on most default Java Frames. I have no problem with loading a gif or jpg file with toolkit.getImage("image.gif").
setIconImage().., etc..

My question is:
How can I "hardcode" the image that I
load in such that my program is not dependent on loading an image file?
Can I use a Memory based representation of the image file and make it into a
variable or set of variables.

I would then be interested in converting from either jpg or gif to this in memory format.

Thanks



Please use html tags to format code blocks.

   <<Less

Re: Using in memory representation of gif files.

Posted By:   Kenneth_Foo  
Posted On:   Thursday, January 10, 2002 01:57 AM

I think what you mean is that you do not want to keep loading the images in different frames.

What you can do is have a class to load all images in the beginning then get your frames to point to the images from that class.

This way, you only load the images once.
About | Sitemap | Contact