This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes Beginning Java and the fly likes Convert gif to byte array Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Convert gif to byte array" Watch "Convert gif to byte array" New topic
Author

Convert gif to byte array

Keith Harrison
Greenhorn

Joined: Mar 04, 2006
Posts: 15
Hello.

I have the following method:


At the point where I have typed >>> HERE <<< I want to read in a gif image from localhost root directory (i.e "/images/noImage.gif") and convert it to a byte array to use as return.

Seems simple enough but need guidance!

Thanks to anybody who can help

Keith
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41128
    
  45
Welcome to JavaRanch.

A quick Google search found this highly relevant code example.


Ping & DNS - my free Android networking tools app
Keith Harrison
Greenhorn

Joined: Mar 04, 2006
Posts: 15
Thank you very much.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Convert gif to byte array
 
Similar Threads
Displaying BLOB image in a jsp page
wanna send image bytes to server
downloading image
How to display images directly from database?
Streaming image data into JSP