Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Java > BMP to GIF convertion

Reply
Thread Tools

BMP to GIF convertion

 
 
Hiranya Samarasekera
Guest
Posts: n/a
 
      08-26-2003
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


 
Reply With Quote
 
 
 
 
Marco Schmidt
Guest
Posts: n/a
 
      08-26-2003
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
 
Reply With Quote
 
 
 
 
Hiranya Samarasekera
Guest
Posts: n/a
 
      08-27-2003
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" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> 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



 
Reply With Quote
 
Marco Schmidt
Guest
Posts: n/a
 
      08-27-2003
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
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Re: How to store picture (*.jpg, *.bmp, *.gif) into sql database ? Curt_C [MVP] ASP .Net 3 08-14-2009 01:33 AM
System.Drawing: Error when using a .bmp or .gif file but not when .jpg Richard ASP .Net 3 09-19-2007 01:14 PM
BMP to TIFF or TIFF to BMP- any loss? Jenna Topping Digital Photography 5 01-23-2005 01:18 AM
Re: How to store picture (*.jpg, *.bmp, *.gif) into sql database ? Tampa .NET Koder ASP .Net 0 07-27-2004 03:54 AM
32 dpp BMP to 24dpp BMP?? Harry Simpson ASP .Net 0 10-30-2003 07:36 PM



Advertisments