PNG (for Portable Network Graphics) is a graphic file format that is supported by various source ports, notably Doom64 EX, Doomsday, EDGE, Eternity Engine, Vavoom, ZDoom and ZDoom-derivatives. Most support this format for textures, some also support it for sprites, and ZDoom even uses it as the container for its savegame format.

Special chunks[edit]

PNG chunks can be likened to WAD lumps, they are a specific subpart of the file. Contrarily to lumps, they are case-sensitive: The first letter is upper-case for "critical" chunks (without which the image cannot work) and lower-case for "ancillary" chunks (which can be ignored). The second letter is upper case for public chunks (part of the standard specifications) or lower case for "private" chunks (non-standard). The third letter has no given role yet and is thus always upper case, and the last letter indicates whether image manipulation software that does not recognize the chunk should delete it (upper-case) or keep it (lower-case). A chunk's anatomy consists of a 32-bit unsigned integer value for its data size, then the four-byte chunk name, and finally a 32-bit integer value used for cyclic redundancy check performed on the data and name bytes. The minimum size of a chunk is therefore 12 bytes for a data-less chunk; however only the data bytes are counted for the size value.

The PNG format encourages the use of custom, non-standard chunks for specialized roles. The following custom chunks have special relevance for various source ports.

  • grAb - indicates the center position of the image. This is used to indicate sprite offsets in ZDoom, Doom64 EX, Eternity, and EDGE. This should not be confused with the standard oFFs chunk, which is meant for printing offsets. This chunk must be between the IHDR chunk and the first IDAT chunk. SLumpEd and SLADE 3 are both able to edit this chunk. The data for the chunk contain the X-offset, then the Y-offset, both represented by a 32-bit signed integer value each.
  • alPh - indicates that a grayscale image should be treated as a standalone alpha channel. This data-less lump is used by ZDoom for some decals and crosshairs. This chunk must be between the IHDR chunk and the first IDAT chunk.
  • huBs, ptIc, snAp, viSt, pcLs and raNd - various chunks used by ZDoom and derivatives to store save game information. These chunks must be between the last IDAT chunk and the IEND chunk.


This article incorporates text from the open-content ZDoom documentation project article PNG.