D3DXIMAGE_FILEFORMAT
Microsoft DirectX 9.0 SDK Update (October 2004)

D3DXIMAGE_FILEFORMAT Enumerated Type


Describes the supported image file formats. See Remarks for descriptions of these formats.

Syntax

typedef enum _D3DXIMAGE_FILEFORMAT {
    D3DXIFF_BMP = 0,
    D3DXIFF_JPG = 1,
    D3DXIFF_TGA = 2,
    D3DXIFF_PNG = 3,
    D3DXIFF_DDS = 4,
    D3DXIFF_PPM = 5,
    D3DXIFF_DIB = 6,
    D3DXIFF_HDR = 7,
    D3DXIFF_PFM = 8,
    D3DXIFF_FORCE_DWORD = 0x7fffffff
} D3DXIMAGE_FILEFORMAT;

Constants

D3DXIFF_BMP

Microsoft Windows bitmap (BMP) file format.

D3DXIFF_JPG

Joint Photographics Experts Group (JPEG) compressed file format.

D3DXIFF_TGA

Truevision (Targa, or TGA) image file format.

D3DXIFF_PNG

Portable Network Graphics (PNG) file format.

D3DXIFF_DDS

Microsoft DirectDraw surface (DDS) file format.

D3DXIFF_PPM

Portable pixmap (PPM) file format.

D3DXIFF_DIB

Windows device-independent bitmap (DIB) file format.

D3DXIFF_HDR

High dynamic range file format.

D3DXIFF_PFM

Portable float map file format.

D3DXIFF_FORCE_DWORD

Forces this enumeration to compile to 32 bits in size. This value is not used.

Remarks

Functions that begin with D3DXLoadxxx support all of the formats listed. Functions that begin with D3DXSavexxx support all but the Truevision (.tga) and portable pixmap (.ppm) formats.

The following table lists the available input and output formats.

File ExtensionDescription
.bmpWindows bitmap format. Contains a header that describes the resolution of the device on which the rectangle of pixels was created, the dimensions of the rectangle, the size of the array of bits, a logical palette, and an array of bits that defines the relationship between pixels in the bitmapped image and entries in the logical palette.
.ddsDirectDraw Surface file format. Stores textures, volume textures, and cubic environment maps, with or without mipmap levels, and with or without pixel compression. See DDS File Reference.
.dibWindows DIB. Contains an array of bits combined with structures that specify width and height of the bitmapped image, color format of the device where the image was created, and resolution of the device used to create that image.
.hdrHigh dynamic range format. Encodes each pixel as an RGBE 32-bit color, with 8 bits of mantissa for red, green, and blue, and a shared 8-bit exponent. Each channel is separately compressed with run-length encoding (RLE).
.jpgJPEG standard. Specifies variable compression of 24-bit RGB color and 8-bit gray-scale Tagged Image File Format (TIFF) image document files.
.pfmPortable float map format. A raw floating point image format, without any compression. The file header specifies image width, height, monochrome or color, and machine word order. Pixel data is stored as 32-bit floating point values, with 3 values per pixel for color, and one value per pixel for monochrome.
.pngPortable Network Graphics format. A nonproprietary bitmap format using lossless compression.
.ppmPortable Pixmap format. A binary or ASCII file format for color images that includes image height and width and the maximum color component value.
.tgaTarga or Truevision Graphics Adapter format. Supports depths of 8, 15, 16, 24, and 32 bits, including 8-bit gray scale, and contains optional color palette data, image (x, y) origin and size data, and pixel data.

See Types of Bitmaps (GDI+) World Wide Web link for more information on some of these formats.

Enumerated Type Information

Headerd3dx9tex.h
Minimum operating systems Windows 98


© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.