BMP to GIF convertion

  • Thread starter Hiranya Samarasekera
  • Start date
H

Hiranya Samarasekera

Hi all,

I'm in the process of writing a BMP to GIF converter.. Can anyone suggest me
a good BMP to GIF conversion library.

Does the ACME package have this feature?

thanks in advance,
Hiranya
 
M

Marco Schmidt

Hiranya Samarasekera:
I'm in the process of writing a BMP to GIF converter.. Can anyone suggest me
a good BMP to GIF conversion library.

Does the ACME package have this feature?

ACME has a GIF encoder. Simply combine a BMP decoder with a GIF
encoder. Here is a list with both such tools:
<http://www.geocities.com/marcoschmidt.geo/java-image-coding.html>.
Note that some countries still have a patent on GIF's LZW algorithm:
<http://www.geocities.com/marcoschmidt.geo/gif-image-file-format.html>.

Regards,
Marco
 
H

Hiranya Samarasekera

Thanks Marco for the info...

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?

Thanks,
Hiranya

*****************
 
M

Marco Schmidt

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,434
Messages
2,571,685
Members
48,796
Latest member
Greg L.

Latest Threads

Top