user2671156
user2671156

Reputation: 33

PLTE chunk missing from a non-corrupt PNG file

I am making a PNG importer for use in GLUT and OpenGL projects. When I open a PNG file in a hex editor or reference this image:

http://upload.wikimedia.org/wikipedia/commons/1/17/PNG-Gradient_hex.png

the PLTE chunk cannot be seen. How do I know where it is? Does it follow directly after processing IHDR?

Upvotes: 0

Views: 1338

Answers (1)

Jongware
Jongware

Reputation: 22457

This is not a paletted image, so there is no need for a PLTE chunk. From the PNG Reference:

Color    Allowed    Interpretation
Type     Bit Depths
2        8/16       Each pixel is an R,G,B triple.

Upvotes: 1

Related Questions