grAb

From ZDoom Wiki
Jump to: navigation, search

The grAb chunk is a ZDoom-created chunk that may be present in PNG files to specify the base offset of a sprite (i.e., where in the image the sprite's 'foot' is).

The chunk is 8 bytes long, and is of the format XXXXYYYY, where XXXX and YYYY are big-endian integers specifying the number of pixels from the left and top of the image, respectively.

This chunk must be present somewhere after IHDR and before any IDAT chunks, or ZDoom will not recognise it.

This chunk can be added to a PNG file from the command line using SetPNG or grabpng. SLumpEd and Slade 3 offer a graphical interface for editing it.

Outside of ZDoom and derived ports, the Doom 64 port DoomWikiLogoIcon.pngDoom64 EX also uses this chunk.