Sign up now! · Forgot password?
RSS/Atom feed identi.ca Twitter

Indexed PNGs

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

2 of 3 messages available
Toggle history

Please log in to manage your subscriptions.

Indexed PNGs William Trenker 31 Mar 07:03
20020331051544.73F6C36F9@si... 07 Oct 20:15
  Indexed PNGs William Trenker 31 Mar 20:17
William Trenker
2002-03-31 07:03:15 UTC (over 12 years ago)

Indexed PNGs

Hello,

Having followed the many good tutorials I'm starting to get somewhere with the GIMP (1.2.3 - Windows98). Now I'm trying to reduced the file-size of the final images by indexing them before saving as PNG's. But when I try indexing the image, most of the anti-aliasing and other "fuzziness" pixels are gone. Here's a simple example: File/New (RGB, background)
Layers/New (transparent)
Tool - Fuzzy Brush
Brush Selection - Circle Fuzzy (19)
Colors - Foreground: Red, Background:White

With transparent layer selected draw anything (a squiggly line)

Tool - Smudge Smudge the squiggly line

Now index the image (with the Transparent layer still selected): Image/Mode/Index (defaults: Optimal Palette=255)

And I've lost almost all the fuzziness. The indexed palette shows only 53 shades of red and 1 shade of white. Most of the pixels that make the really fine fuzziness, that make the smudging look good, are gone.

Ok, now undo the Indexing, Merge Down the layers and do the Indexing again.

Fine, this time the image hasn't lost the finer shades of red (ie the subtle smudging is still there and the fuzzy line is still fuzzy). The Indexed Palette has 255 values ranging from full-red to full-white. BUT I have a white background. I don't want a white background I want a transparent background.

So, I undo the Merge Down, delete the background layer, and try Indexing again.

Rats! The smudging and fuzziness are gone again. The Indexed Palette is back to only 53 shades of red.

So what am I doing wrong? (I've tried playing with the transparency button on the layers dialog, I've tried the Dither Transparency option on the Index dialog.) What do I do to get a single layer in one color to give me an Indexed Palette with 255 "shades" of transparency?

Thanks for being patient.

Bill Trenker Kelowna BC Canada

"The commandments of the LORD are right, bringing joy to the heart. The commands of the LORD are clear, giving insight to life . . . For this is the love of God, that we keep His commandments. And His commandments are not burdensome." (Psalm 19:8, 1John 5:3) torahteacher.com

---
Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.343 / Virus Database: 190 - Release Date: 3/22/02

William Trenker
2002-03-31 20:17:14 UTC (over 12 years ago)

Indexed PNGs

At 09:15 PM 3/30/02 -0800, you wrote:

It is just one of the limitations of the index mode which is why their file size is smaller

In reply to my question, sent at 9:03 PM 3/30/02 -0800:

I'm trying to reduced the file-size of the final images by indexing them before saving as PNG's. But when I try indexing the image, most of the anti-aliasing and other "fuzziness" pixels are gone.

Thanks for replying.

I think my confusion stems from my target format, PNG (Portable Network Graphics). This format supports an alpha channel (variable transparency) in its indexed mode, called RGBA, so I just assumed that the GIMP's indexed format would support the same. I'm no expert but it appears that the GIMP's internal, indexed format makes some assumptions about the target format (such as binary transparency and the maximum 256-color palette, probably a design influence from the older, widely used GIF format). Hopefully, over time, the GIMP's indexed format will be more generous so that the newer indexed file formats, like PNG, can be used to full advantage. Then, the final conversion to the desired image format would be the place where output format limitations would be dealt with.

One great web application for PNG indexed graphics is very small images for use as bullets, buttons, icons, and such. Having an A(lpha) channel along with the conventional R, G, and B channels produces beautiful, anti-aliased, small graphics which are not dependent on the background color (unlike GIMP's Semi-Flatten filter). And because they're indexed the cost in file-size is small.

PNG is really gaining ground. The newest Netscape Navigator and Opera browsers fully support both true-color and indexed PNG. Unfortunately the newest Internet Explorer is still weak in this area. PNG's do not support multi-part, animated graphics. For this application there is a companion format being developed called MNG (Multiple-image Network Graphics). MNG is also specified to support transparent JPEG's, an interesting concept.

Sorry if this got a bit wordy. Thanks again, Bill

"The commandments of the LORD are right, bringing joy to the heart. The commands of the LORD are clear, giving insight to life . . . For this is the love of God, that we keep His commandments. And His commandments are not burdensome." (Psalm 19:8, 1John 5:3) torahteacher.com

---
Outgoing mail is certified Virus Free. Checked by AVG anti-virus system (http://www.grisoft.com). Version: 6.0.343 / Virus Database: 190 - Release Date: 3/22/02