Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Distortion in GIF?

51 views
Skip to first unread message

Animesh K

unread,
Jun 26, 2007, 3:56:15 PM6/26/07
to
Hello All:

I am saving a black and white (with transparency) image, after color
map, as GIF and PNG. The PNG image retains the original sharpness and
GIF shows some distortions.

Following are the image samples:

B&W image: http://www.stutimandal.com/images/contact_bw.png

PNG image after color map:
http://www.stutimandal.com/images/contact_cldblue.png

GIF image after color map:
http://www.stutimandal.com/images/contact_cldblue.gif

Am I doing something wrong? As far as I understand, GIF is lossless and
should not show any distortion? Do I have to upgrade GIMP or change some
settings?

Best regards,
Animesh

Marc 'BlackJack' Rintsch

unread,
Jun 26, 2007, 7:49:19 PM6/26/07
to
In <f5rr10$kvg$1...@agate.berkeley.edu>, Animesh K wrote:

> PNG image after color map:
> http://www.stutimandal.com/images/contact_cldblue.png
>
> GIF image after color map:
> http://www.stutimandal.com/images/contact_cldblue.gif
>
> Am I doing something wrong? As far as I understand, GIF is lossless and
> should not show any distortion? Do I have to upgrade GIMP or change some
> settings?

GIF is lossless if you have a 256 color image with no transparency or a
255 color image with 1-bit transparency, i.e. every pixel is either
complete opaque and has one of the 255 colors or it is complete
transparent. PNG on the other hand has 8-bit transparency even in indexed
mode.

Ciao,
Marc 'BlackJack' Rintsch

Animesh K

unread,
Jun 26, 2007, 7:56:55 PM6/26/07
to

Thanks for the answer. I understand GIF better now.

Zhagrasa

unread,
Jun 27, 2007, 12:30:32 PM6/27/07
to
Animesh K schrieb:

>Thanks for the answer. I understand GIF better now.

Note that PNG supports several different modes. These are:
- paletted images of 2, 4, 16 or 256 colors, where one color may be
marked as transparent (just like GIF)
- gray-scale images with 8 or 16 bit color depth
- true-color images with 24 or 48 bit color depth
- The latter two may also have a true alpha channel of 8 or 16 bpp.


In case you didn't know: If you open a paletted image, GIMP will not
automatically convert it to RGB-color, but rather tries to work with the
available colors. This will cause many operations to either produce odd
results or simple be not available at all.

-Lost

unread,
Jun 27, 2007, 11:09:36 PM6/27/07
to

2 things.

1. Does that mean you should switch the mode to RGB manually for all
palleted images?

2. How do you know if an image is palleted (sorry, this is probably
just my ignorance)?

--
-Lost
Remove the extra words to reply by e-mail. Don't e-mail me. I am
kidding. No I am not.

Zhagrasa

unread,
Jun 28, 2007, 9:41:00 AM6/28/07
to
-Lost schrieb:

>1. Does that mean you should switch the mode to RGB manually for all
>palleted images?

Depends on what operations you intend to perform on the image. Converting RGB
back to palette is a lossy process, so you should avoid doing it more often
than necessary.
Just remember that any operation on a palette image will have to work with
the limited amount of colors that are already defined there.
E.g. if all palette entries are red and green tones, then you cannot even
insert a blue text.
So, for many cases you don't have a choice other than to convert to RGB.

>2. How do you know if an image is palleted (sorry, this is probably just
>my ignorance)?

View > Info window
or just look which item under Image > Mode is grayed out.

-Lost

unread,
Jun 30, 2007, 5:12:56 PM6/30/07
to

Thank you very much.

0 new messages