Sorry.Im not clear with your answer.Can you explain that..Because what I thought is a binary image is a digital image that has only two possible values for each pixel. Typically the two colors used for a binary image are black and white though any two colors can be used.
But in GIF the format supports up to 8 bits per pixel, allowing a single image to reference a palette of up to 256 distinct colors.
Explain what you mean by "GIF image into binary". I'm assuming you mean to get an actual array of pixels instead of having them in a compressed format, but the question seems vague.
Marco93, if you want to play it that way, your post has no sense. GIF is an image compression format which handles a maximum of 8 bits per pixel and allows animation. Simply saying "GIF is binary" isn't helping, as you will find that pretty much anything on a computer breaks down to binary.
edit: I should really check for previous posts before I post mine.
Seems you are right, I had never heard of it in that way. [link]
Well, the first thing you have to do is read and uncompress the GIF image before you can change it to a binary image. Once you have the pixels in an array, you check each pixel with a threshold (127 I would assume) so if the pixel has a value higher than the threshold, it pixel would be 1, if it's lower, then it would be 0.
Both cases require reading and writing to bitmaps, so it would probably be easiest for you to use a bitmap library on the net.
public class GrossmontBank
//class variables (global - accessible throughout this class)
//scanner object to be used throughout
private static Scanner input = new Scanner(System.in);