BMP to GIF convertion

Discussion in 'Java' started by Hiranya Samarasekera, Aug 26, 2003.

  1. 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
    Hiranya Samarasekera, Aug 26, 2003
    #1
    1. Advertising

  2. 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
    --
    Please reply in the newsgroup, not by email!
    Java programming tips: http://jiu.sourceforge.net/javatips.html
    Other Java pages: http://www.geocities.com/marcoschmidt.geo/java.html
    Marco Schmidt, Aug 26, 2003
    #2
    1. Advertising

  3. 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

    *****************

    "Marco Schmidt" <> wrote in message
    news:...
    > 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
    > --
    > Please reply in the newsgroup, not by email!
    > Java programming tips: http://jiu.sourceforge.net/javatips.html
    > Other Java pages: http://www.geocities.com/marcoschmidt.geo/java.html
    Hiranya Samarasekera, Aug 27, 2003
    #3
  4. 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
    --
    Please reply in the newsgroup, not by email!
    Java programming tips: http://jiu.sourceforge.net/javatips.html
    Other Java pages: http://www.geocities.com/marcoschmidt.geo/java.html
    Marco Schmidt, Aug 27, 2003
    #4
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Harry Simpson

    32 dpp BMP to 24dpp BMP??

    Harry Simpson, Oct 30, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    336
    Harry Simpson
    Oct 30, 2003
  2. Richard
    Replies:
    3
    Views:
    4,085
    velocity4anil
    Sep 19, 2007
  3. Curt_C [MVP]
    Replies:
    3
    Views:
    14,277
    jharr100
    Aug 14, 2009
  4. Tampa .NET Koder
    Replies:
    0
    Views:
    504
    Tampa .NET Koder
    Jul 27, 2004
  5. Just D.
    Replies:
    2
    Views:
    1,859
    Just D.
    Jan 12, 2005
Loading...

Share This Page