Image format

From ZDoom Wiki
Jump to navigation Jump to search

ZDoom supports the following image formats natively for any use; note however that some formats have intrinsic limitations that make them inadequate choices. Some formats are paletted, in this case they will use either the global palette or an internal one.

  • Doom's native patch/sprite format; paletted, supports offsets, translations and translucency
  • Raw image, used by flats, some Heretic and Hexen fullscreen pictures (including AUTOPAGE) and some of Strife's startup lumps; paletted, supports translations but not translucency
  • PNG; paletted or true color, supports offsets and translucency, translations are unreliable - ZDoom also defines two additional chunks
  • MiniWikipediaLogoIcon.pngJPEG; true color, does not support translucency or translations
  • MiniWikipediaLogoIcon.pngDDS; true color, mipmapped, supports translucency
  • MiniWikipediaLogoIcon.pngPCX; paletted or true color, supports translucency only in true color
  • MiniWikipediaLogoIcon.pngTGA; paletted or true color, supports translucency
  • IMGZ; ZDoom-specific format, stores only an alpha map
  • Build tiles; the format native to games such as Duke Nukem 3D (see ZDuke)

In addition, ZDoom also supports different graphic formats but only for some specialized purposes, such as ENDOOM or the startup lumps.

  • Planar; a VGA full screen image, in 4-bit, 16-color format and a resolution of 640x480, used by Hexen's startup
  • ANSI, a semi-graphic format used by the ENDOOM screen and Heretic's startup

Important notes:

  • The MiniWikipediaLogoIcon.pngBMP format is not supported. This is deliberate. This format does not support offsets, transparency, or compression, and is therefore cumbersome and useless. (The BMP specs actually allow for transparency in 32-bit mode, and compression is theoretically possible. However, the most common tool used for editing BMP files, MS Paint, does not, rendering the question irrelevant.)
  • Transparency is handled directly by the images themselves, depending on the format's possibilities. There are no transparent colors.
  • In the software renderer, colors are remapped to their closest match from the game palette. ZDoom features a DirectX renderer which is used on Windows systems to display 2D graphics, allowing MiniWikipediaLogoIcon.pngtruecolor for HUD and interface graphics (including HUD weapon sprites). OpenGL source ports such as GZDoom can render everything in truecolor.