DirectXTex Functions

Functions

Name Description
BitsPerColor Returns the color-depth (also known as the bit-depth) for a given DXGI format. For formats with a mix of different channel sizes, this function returns the color-depth of the largest channel.
BitsPerPixel Returns the bits per pixel, given the DXGI format.
CaptureTexture Captures a render target and returns an image.
Compress Compresses one or more images to a block compression (BC) format.
ComputeMSE Computes the mean squared error (MSE) for each component, based on two input images.
ComputeNormalMap Converts a height map to a normal map.
ComputePitch Returns the row and slice pitch, for a given width, height and DXGI format.
ComputeScanlines Returns the number of scanlines in an image, given the height and DXGI format.
Convert Converts one or more images from one pixel format to another. Block compressed (BC) formats are not supported.
CopyRectangle Copies a rectangular area from a source image to a destination image. Block compression (BC) formats are not supported.
CreateShaderResourceView Creates a Direct3D 11 resource and shader resource view from a set of images.
CreateShaderResourceViewEx Creates a Direct3D 11 resource and shader resource view from a set of images, specifying extended parameters to control the created resource’s usage, binding flags, CPU access flags, and miscellaneous flags.
CreateTexture Creates a Direct3D 11 texture resource from a set of images.
CreateTextureEx Creates a Direct3D 11 texture resource from a set of images, specifying extended parameters to control the created resource’s usage, binding flags, CPU access flags, and miscellaneous flags.
Decompress Converts one or more images from a block compressed (BC) format to a non-BC format.
FlipRotate Flips horizontally or vertically, or rotates by 90, 180 or 270 degrees, one or more images.
GenerateMipMaps Generates mipmaps for one or more images.
GenerateMipMaps3D Generates mipmaps for 3D volume textures, from a set of 2D images representing slices of the volume.
GetMetadataFromDDSFile Returns the texture metadata from a file.
GetMetadataFromDDSMemory Returns the texture metadata from a file image stored in a memory buffer.
GetMetadataFromTGAFile Returns the texture metadata from a file.
GetMetadataFromTGAMemory Returns the texture metadata from a file image stored in a memory buffer.
GetMetadataFromWICFile Returns the texture metadata from a file.
GetMetadataFromWICMemory Returns the texture metadata from a file image stored in a memory buffer.
GetWICCodec Returns a WIC GUID for a given file container.
HasAlpha Indicates whether the DXGI format includes an alpha channel.
IsCompressed Indicates whether the DXGI format is in a block compressed (BC) format.
IsPacked Indicates whether the DXGI format is a packed format.
IsSRGB Indicates whether the DXGI format is an sRGB format.
IsSupportedTexture Indicates whether the texture metadata is supported by the D3D11 device.
IsTypeless Indicates whether the DXGI format is a typeless format.
IsValid Indicates whether the DXGI format is a valid format.
IsVideo Indicates whether the DXGI format is a DXGI 1.2 format that is not supported for general use by DirectX 11.
LoadFromDDSFile Loads a .DDS file.
LoadFromDDSMemory Loads a .DDS file from an image in a memory buffer.
LoadFromTGAFile Loads a .TGA file.
LoadFromTGAMemory Loads a .TGA file from an image in a memory buffer.
LoadFromWICFile Loads a .WIC file.
LoadFromWICMemory Loads a .WIC file from an image in a memory buffer.
MakeSRGB Converts the DXGI format to an equivalent sRGB format, if one exists.
MakeTypeless Converts a DXGI format to a TYPELESS equiavlent, if any. This does not modify depth/stencil formats which have multiple ‘typeless’ mappings.
MakeTypelessFLOAT Converts a TYPELESS DXGI format to a FLOAT equivalent, if any.
MakeTypelessUNORM Converts a TYPELESS DXGI format to a UNORM equivalent, if any.
PremultiplyAlpha Converts an image assuming the original is not using premultiplied alpha into a premultiplied alpha version of the same image.
Resize Resizes one or more images.
SaveToDDSFile Saves one or more images in memory buffers to a .DDS file.
SaveToDDSMemory Saves one or more images in memory buffers to a .DDS file image also in a memory buffer.
SaveToTGAFile Saves one or more images in memory buffers to a .TGA file.
SaveToTGAMemory Saves one or more images in memory buffers to a .TGA file image also in a memory buffer.
SaveToWICFile Saves one or more images in memory buffers to a .WIC file.
SaveToWICMemory Saves one or more images in memory buffers to a .WIC WIC-supported bitmap file.

For functions grouped by subject, see DirectXTex Texture Library.

See also

DirectXTex Texture Library

DirectXTex Library Reference at CodePlex, with example code