

If matte is true, each colormap index is followed by a 1 or 2-byte alpha value.īy running convert -type Palette subject1.png subject3.png If the image contains more than 256 colors or the image depth is 16, the index value is stored as two contiguous bytes with the most significant byte being first. If there are 256 or fewer colors in the image, each byte of image data contains an index value. PseudoClass image data is an array of index values into the color map. The colormap data occurs immediately following the header (or image directory if the montage key is in the header). The number of colormap entries is defined by the colors key. If the image depth is 16, each colormap entry consumes two bytes with the most significant byte being first.

The colormap is stored as a series of red, green, and blue pixel values, each value being a byte in size. PseudoClass images are colormapped RGB images.

Each intensity value is one byte in length for images of depth 8 (0.255), two bytes for a depth of 16 (0.65535), and images of depth 32 (0.4294967295) require four bytes in most significant byte first order. How the image data is formatted depends upon the class of the image as specified (or not specified) by the value of the class key in the header.ĭirectClass images are continuous-tone, images stored as RGB (red, green, blue), RGBA (red, green, blue, alpha), CMYK (cyan, yellow, magenta, black), or CMYKA (cyan, yellow, magenta, black, alpha) intensity values as defined by the colorspace key. Since I'm not versed in this subject, this ImageMagick page might help understand what's going on: The main difference appears to be in the class definition of both images. Thanks to the awesome ImageMagick tools, I found some clues on what is probably going on here. These are similar images to the ones provided. Just to make our lives easier, I'll name the images: I have no idea of the impact of such formats when processed by pdfTeX. Disclaimer: I'll try to write a technical explanation of what I found, but I'm not versed in those image witchcrafts.
