Make your own free website on
'); // -->

Working with the PNG format:
July 07, 2000



Color type 3 PNG-writing bug in
ThumbsPlus v4.10 build 2009 on WindowsNT 4

Intent: to document a bug discovered in the application software ThumbsPlus v4


There are different classifications for PNG images according to how the pixel values are stored internally, and what range those values can span. The Web designer will be primarily concerned with two types: Color type 2 (or 6, although the alpha-channel is not yet well-supported by browsers), which is the PNG Truecolor format capable of displaying as many colors as, for instance, a JPEG does (no dithering or "quantization"); and Color type 3, which is color-mapped or "palette" -based. The GIF format is exclusively a color-mapped format.

Thus, direct conversion of GIFs to PNGs takes place in the context of a palette (color-mapped) image to another color-mapped image, and in most cases this is exactly what would be desired. Most software for making such conversions will make the output a PNG Color type 3 image by default, if starting with a GIF image. Furthermore the transparency features of most current browsers are limited (although the PNG format is not) to these palette PNG images. This means that it would be necessary in any case where the target medium of the PNG output file is the Web, that it be in the Color type 3 type in order that attributes like binary on/off transparency la GIF89a can be preserved.

The Problem:

ThumbsPlus is a popular shareware-distributed image cataloging and conversion program for Macintosh and Windows. In its latest release version for my platform (Win32) it exhibits a serious bug which makes much of its converted PNG Color type 3 image output unusable (dependent upon specific charateristics of the particular image data).

The Speculative Explanation:

The trouble in the case of ThumbsPlus is that the mapping of the pixel values to palette entries is being corrupted internally in the format conversion process -- and in my opinion there is no particularly good reason for this to be happening, since the mathematically more complex process of quantization (which as I understand the term is reduction of colors -- "mapping" -- to the maximum 256 that can exist in a palette-type image) does not have to be invoked in this instance. That is, the conversion of a color-mapped image (one without any file gamma meta-information, such as the aged GIF format) to another color-mapped image could (and in the preferences of expert users, probably should) simply involve the "copying" of the color table (palette) from one format's internal structure to the other format's structure. Instead, ThumbsPlus is most likely internally converting the image into an RGB type and then applying quantization to the pixel data, creating a new color table. In this process, the technical details (proprietary code) to which I am not privy, something is going very wrong.

Somewhere in this process the PNG palette is subjected to some bug, causing the highest values (highlights or whites) in the image to be converted to other values. The visual result is an ugly blooming of fungus-like speckles on the example image seen here. It looks rather as if the fruit has been left out too long!

Present state of remediation:

To their credit, the folks at Cerious Software, the makers of ThumbsPlus, have acknowledged my bug report and verified it, and promised that it will be fixed in the next build release. However I encourage other ThumbsPlus users (particularly other registered users as I am -- and a rather piqued one at this point, waiting for them to address the deficiencies of Thumbs with regards to PNG, which have been hanging around for years) -- I encourage all parties in fact, to write to Cerious and request that they upgrade their level of attention to the features and compliance regarding PNG in ThumbsPlus.

It is particularly unfortunate that an application as highly-regarded both by the industry press and by many of its users has developed such a bug. Even more unfortunate (since they have promised to fix this one, making it a temporary problem) is that an application with powerful and convenient batch-conversion features (allowing conversion of large collections of GIF files to PNG format, for example) has never done the right thing with PNGs. In plain fact, many collections of GIFs will include GIF89a images with the binary transparency feature used to make part of the image transparent. The transparency does not convert when ThumbsPlus saves PNGs from GIFs.

Author: Soren Andersen
Document Created on Friday, July 07, 2000
Document last modified on 07 July, 2000