This week's book giveaway is in the General Computing forum.
We're giving away four copies of Arduino in Action and have Martin Evans, Joshua Noble, and Jordan Hochenbaum on-line!
See this thread for details.
The moose likes Java in General and the fly likes Opening .gif files Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Java in General
Reply Bookmark "Opening .gif files" Watch "Opening .gif files" New topic
Author

Opening .gif files

zaeem masood ashar
Ranch Hand

Joined: Mar 17, 2001
Posts: 54
Hi
Can we open a .gif file using IO. If yes can someone please write a code snippet!!
thanks


SCJP2
Manfred Leonhardt
Ranch Hand

Joined: Jan 09, 2001
Posts: 1492
Hi Zaeem,
If you just want to use it as an image use the following:
Image im = Toolkit.getImage( fileName.gif );
Otherwise you can just use FileInputStream and read it in as bytes as it is just a binary file anyway!
Regards,
Manfred.
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Opening .gif files
 
Similar Threads
what types of image is suported in java
Binary Data in XML
how to store jpg/gif picture in Database
Image
Any software