Hiranya Samarasekera:
I tried to read a JPEG file and to convert it into GIF format, usin the ACME
encorder. But it throws up an exception saying that there are too much
colors for a GIF. This happens even if i use a JPEG with 2 colors.
Does anyone know the reason for this?
Well, there are too many colors in the input image.

GIF only
supports up to 256 different colors in an image. Your average JPEG
photo has a lot more. ACME then simply gives up.
BTW, I doubt that the JPEG really has only two colors. Even if you
compressed a two-color-image as JPEG, there may be more colors after
compression because of the way JPEG works. And JPEG is suitable only
for photos with a lot of different colors, so saving a two color image
as JPEG is a bad idea. That's why conversion between JPEG and GIF
rarely is a good idea. They are designed for different types of
images.
Anyway, the solution for your problem is using some sort of color
reduction. Some GIF encoders at
<
http://www.geocities.com/marcoschmidt.geo/java-image-coding.html>
have this built-in, search for "color image quantization". And think
again if you really must convert those JPEGs to GIF.
Regards,
Marco