Expand description
§Migration Table
Structs§
- Blob
- CMSE_
FLAGS - CNMAP_
FLAGS - CP_
FLAGS - DDSMeta
Data - DDS_
FLAGS - DXGI_
FORMAT - FORMAT_
TYPE - HResult
Error - Image
- Mean
Squared Error - Pitch
- Rect
- Scratch
Image - TEX_
ALPHA_ MODE - Matches DDS_ALPHA_MODE, encoded in MISC_FLAGS2
- TEX_
COMPRESS_ FLAGS - TEX_
DIMENSION - Subset here matches D3D10_RESOURCE_DIMENSION and D3D11_RESOURCE_DIMENSION
- TEX_
FILTER_ FLAGS - TEX_
MISC_ FLAG - Subset here matches D3D10_RESOURCE_MISC_FLAG and D3D11_RESOURCE_MISC_FLAG
- TEX_
MISC_ FLAG2 - TEX_
PMALPHA_ FLAGS - TGA_
FLAGS - TexMetadata
Constants§
- CMSE_
DEFAULT - CMSE_
IGNORE_ ALPHA - Ignore the channel when computing MSE
- CMSE_
IGNORE_ BLUE - Ignore the channel when computing MSE
- CMSE_
IGNORE_ GREEN - Ignore the channel when computing MSE
- CMSE_
IGNORE_ RED - Ignore the channel when computing MSE
- CMSE_
IMAG E1_ SRGB - Indicates that image needs gamma correction before comparision
- CMSE_
IMAG E1_ X2_ BIAS - Indicates that image should be scaled and biased before comparison (i.e. UNORM -> SNORM)
- CMSE_
IMAG E2_ SRGB - Indicates that image needs gamma correction before comparision
- CMSE_
IMAG E2_ X2_ BIAS - Indicates that image should be scaled and biased before comparison (i.e. UNORM -> SNORM)
- CNMAP_
CHANNEL_ ALPHA - Channel selection when evaluting color value for height
- CNMAP_
CHANNEL_ BLUE - Channel selection when evaluting color value for height
- CNMAP_
CHANNEL_ GREEN - Channel selection when evaluting color value for height
- CNMAP_
CHANNEL_ LUMINANCE - Channel selection when evaluting color value for height
- CNMAP_
CHANNEL_ RED - Channel selection when evaluting color value for height
- CNMAP_
COMPUTE_ OCCLUSION - Computes a crude occlusion term stored in the alpha channel
- CNMAP_
DEFAULT - CNMAP_
INVERT_ SIGN - Inverts normal sign
- CNMAP_
MIRROR - Use mirror semantics for scanline references (defaults to wrap)
- CNMAP_
MIRROR_ U - Use mirror semantics for scanline references (defaults to wrap)
- CNMAP_
MIRROR_ V - Use mirror semantics for scanline references (defaults to wrap)
- CP_
FLAGS_ 8BPP - Override with a legacy 8 bits-per-pixel format size
- CP_
FLAGS_ 16BPP - Override with a legacy 16 bits-per-pixel format size
- CP_
FLAGS_ 24BPP - Override with a legacy 24 bits-per-pixel format size
- CP_
FLAGS_ BAD_ DXTN_ TAILS - BC formats with malformed mipchain blocks smaller than 4x4
- CP_
FLAGS_ LEGACY_ DWORD - Assume pitch is DWORD aligned instead of BYTE aligned
- CP_
FLAGS_ NONE - Normal operation
- CP_
FLAGS_ PAGE4K - Assume pitch is 4096-byte aligned instead of BYTE aligned
- CP_
FLAGS_ PARAGRAPH - Assume pitch is 16-byte aligned instead of BYTE aligned
- CP_
FLAGS_ YMM - Assume pitch is 32-byte aligned instead of BYTE aligned
- CP_
FLAGS_ ZMM - Assume pitch is 64-byte aligned instead of BYTE aligned
- DDS_
FLAGS_ ALLOW_ LARGE_ FILES - Enables the loader to read large dimension .dds files (i.e. greater than known hardware requirements)
- DDS_
FLAGS_ BAD_ DXTN_ TAILS - Some older DXTn DDS files incorrectly handle mipchain tails for blocks smaller than 4x4
- DDS_
FLAGS_ EXPAND_ LUMINANCE - When loading legacy luminance formats expand replicating the color channels rather than leaving them packed (L8, L16, A8L8)
- DDS_
FLAGS_ FORCE_ DX9_ LEGACY - Force use of legacy header for DDS writer (will fail if unable to write as such)
- DDS_
FLAGS_ FORCE_ DX10_ EXT - Always use the ‘DX10’ header extension for DDS writer (i.e. don’t try to write DX9 compatible DDS files)
- DDS_
FLAGS_ FORCE_ DX10_ EXT_ MISC2 - DDS_FLAGS_FORCE_DX10_EXT including miscFlags2 information (result may not be compatible with D3DX10 or D3DX11)
- DDS_
FLAGS_ FORCE_ DXT5_ RXGB - Force use of ‘RXGB’ instead of ‘DXT5’ for DDS write of BC3_UNORM data
- DDS_
FLAGS_ FORCE_ RGB - Convert DXGI 1.1 BGR formats to DXGI_FORMAT_R8G8B8A8_UNORM to avoid use of optional WDDM 1.1 formats
- DDS_
FLAGS_ LEGACY_ DWORD - Assume pitch is DWORD aligned instead of BYTE aligned (used by some legacy DDS files)
- DDS_
FLAGS_ NONE - DDS_
FLAGS_ NO_ 16BPP - Conversions avoid use of 565, 5551, and 4444 formats and instead expand to 8888 to avoid use of optional WDDM 1.2 formats
- DDS_
FLAGS_ NO_ LEGACY_ EXPANSION - Do not implicitly convert legacy formats that result in larger pixel sizes (24 bpp, 3:3:2, A8L8, A4L4, P8, A8P8)
- DDS_
FLAGS_ NO_ R10B10 G10A2_ FIXUP - Do not use work-around for long-standing D3DX DDS file format issue which reversed the 10:10:10:2 color order masks
- DDS_
FLAGS_ PERMISSIVE - Allow some file variants due to common bugs in the header written by various leagcy DDS writers
- DXGI_
FORMAT_ 420_ OPAQUE - DXGI_
FORMAT_ A8P8 - DXGI_
FORMAT_ A8_ UNORM - DXGI_
FORMAT_ AI44 - DXGI_
FORMAT_ AYUV - DXGI_
FORMAT_ B4G4 R4A4_ UNORM - DXGI_
FORMAT_ B5G5 R5A1_ UNORM - DXGI_
FORMAT_ B5G6 R5_ UNORM - DXGI_
FORMAT_ B8G8 R8A8_ TYPELESS - DXGI_
FORMAT_ B8G8 R8A8_ UNORM - DXGI_
FORMAT_ B8G8 R8A8_ UNORM_ SRGB - DXGI_
FORMAT_ B8G8 R8X8_ TYPELESS - DXGI_
FORMAT_ B8G8 R8X8_ UNORM - DXGI_
FORMAT_ B8G8 R8X8_ UNORM_ SRGB - DXGI_
FORMAT_ BC1_ TYPELESS - DXGI_
FORMAT_ BC1_ UNORM - DXGI_
FORMAT_ BC1_ UNORM_ SRGB - DXGI_
FORMAT_ BC2_ TYPELESS - DXGI_
FORMAT_ BC2_ UNORM - DXGI_
FORMAT_ BC2_ UNORM_ SRGB - DXGI_
FORMAT_ BC3_ TYPELESS - DXGI_
FORMAT_ BC3_ UNORM - DXGI_
FORMAT_ BC3_ UNORM_ SRGB - DXGI_
FORMAT_ BC4_ SNORM - DXGI_
FORMAT_ BC4_ TYPELESS - DXGI_
FORMAT_ BC4_ UNORM - DXGI_
FORMAT_ BC5_ SNORM - DXGI_
FORMAT_ BC5_ TYPELESS - DXGI_
FORMAT_ BC5_ UNORM - DXGI_
FORMAT_ BC6H_ SF16 - DXGI_
FORMAT_ BC6H_ TYPELESS - DXGI_
FORMAT_ BC6H_ UF16 - DXGI_
FORMAT_ BC7_ TYPELESS - DXGI_
FORMAT_ BC7_ UNORM - DXGI_
FORMAT_ BC7_ UNORM_ SRGB - DXGI_
FORMAT_ D16_ UNORM - DXGI_
FORMAT_ D24_ UNORM_ S8_ UINT - DXGI_
FORMAT_ D32_ FLOAT - DXGI_
FORMAT_ D32_ FLOAT_ S8X24_ UINT - DXGI_
FORMAT_ G8R8_ G8B8_ UNORM - DXGI_
FORMAT_ IA44 - DXGI_
FORMAT_ NV11 - DXGI_
FORMAT_ NV12 - DXGI_
FORMAT_ P010 - DXGI_
FORMAT_ P016 - DXGI_
FORMAT_ P8 - DXGI_
FORMAT_ P208 - DXGI_
FORMAT_ R1_ UNORM - DXGI_
FORMAT_ R8G8 B8A8_ SINT - DXGI_
FORMAT_ R8G8 B8A8_ SNORM - DXGI_
FORMAT_ R8G8 B8A8_ TYPELESS - DXGI_
FORMAT_ R8G8 B8A8_ UINT - DXGI_
FORMAT_ R8G8 B8A8_ UNORM - DXGI_
FORMAT_ R8G8 B8A8_ UNORM_ SRGB - DXGI_
FORMAT_ R8G8_ B8G8_ UNORM - DXGI_
FORMAT_ R8G8_ SINT - DXGI_
FORMAT_ R8G8_ SNORM - DXGI_
FORMAT_ R8G8_ TYPELESS - DXGI_
FORMAT_ R8G8_ UINT - DXGI_
FORMAT_ R8G8_ UNORM - DXGI_
FORMAT_ R8_ SINT - DXGI_
FORMAT_ R8_ SNORM - DXGI_
FORMAT_ R8_ TYPELESS - DXGI_
FORMAT_ R8_ UINT - DXGI_
FORMAT_ R8_ UNORM - DXGI_
FORMAT_ R9G9 B9E5_ SHAREDEXP - DXGI_
FORMAT_ R10G10 B10A2_ TYPELESS - DXGI_
FORMAT_ R10G10 B10A2_ UINT - DXGI_
FORMAT_ R10G10 B10A2_ UNORM - DXGI_
FORMAT_ R10G10 B10_ XR_ BIAS_ A2_ UNORM - DXGI_
FORMAT_ R11G11 B10_ FLOAT - DXGI_
FORMAT_ R16G16 B16A16_ FLOAT - DXGI_
FORMAT_ R16G16 B16A16_ SINT - DXGI_
FORMAT_ R16G16 B16A16_ SNORM - DXGI_
FORMAT_ R16G16 B16A16_ TYPELESS - DXGI_
FORMAT_ R16G16 B16A16_ UINT - DXGI_
FORMAT_ R16G16 B16A16_ UNORM - DXGI_
FORMAT_ R16G16_ FLOAT - DXGI_
FORMAT_ R16G16_ SINT - DXGI_
FORMAT_ R16G16_ SNORM - DXGI_
FORMAT_ R16G16_ TYPELESS - DXGI_
FORMAT_ R16G16_ UINT - DXGI_
FORMAT_ R16G16_ UNORM - DXGI_
FORMAT_ R16_ FLOAT - DXGI_
FORMAT_ R16_ SINT - DXGI_
FORMAT_ R16_ SNORM - DXGI_
FORMAT_ R16_ TYPELESS - DXGI_
FORMAT_ R16_ UINT - DXGI_
FORMAT_ R16_ UNORM - DXGI_
FORMAT_ R24G8_ TYPELESS - DXGI_
FORMAT_ R24_ UNORM_ X8_ TYPELESS - DXGI_
FORMAT_ R32G8 X24_ TYPELESS - DXGI_
FORMAT_ R32G32 B32A32_ FLOAT - DXGI_
FORMAT_ R32G32 B32A32_ SINT - DXGI_
FORMAT_ R32G32 B32A32_ TYPELESS - DXGI_
FORMAT_ R32G32 B32A32_ UINT - DXGI_
FORMAT_ R32G32 B32_ FLOAT - DXGI_
FORMAT_ R32G32 B32_ SINT - DXGI_
FORMAT_ R32G32 B32_ TYPELESS - DXGI_
FORMAT_ R32G32 B32_ UINT - DXGI_
FORMAT_ R32G32_ FLOAT - DXGI_
FORMAT_ R32G32_ SINT - DXGI_
FORMAT_ R32G32_ TYPELESS - DXGI_
FORMAT_ R32G32_ UINT - DXGI_
FORMAT_ R32_ FLOAT - DXGI_
FORMAT_ R32_ FLOAT_ X8X24_ TYPELESS - DXGI_
FORMAT_ R32_ SINT - DXGI_
FORMAT_ R32_ TYPELESS - DXGI_
FORMAT_ R32_ UINT - DXGI_
FORMAT_ SAMPLER_ FEEDBACK_ MIN_ MIP_ OPAQUE - DXGI_
FORMAT_ SAMPLER_ FEEDBACK_ MIP_ REGION_ USED_ OPAQUE - DXGI_
FORMAT_ UNKNOWN - DXGI_
FORMAT_ V208 - DXGI_
FORMAT_ V408 - DXGI_
FORMAT_ X24_ TYPELESS_ G8_ UINT - DXGI_
FORMAT_ X32_ TYPELESS_ G8X24_ UINT - DXGI_
FORMAT_ Y210 - DXGI_
FORMAT_ Y216 - DXGI_
FORMAT_ Y410 - DXGI_
FORMAT_ Y416 - DXGI_
FORMAT_ YUY2 - FORMAT_
TYPE_ FLOAT - FORMAT_
TYPE_ SINT - FORMAT_
TYPE_ SNORM - FORMAT_
TYPE_ TYPELESS - FORMAT_
TYPE_ UINT - FORMAT_
TYPE_ UNORM - TEX_
ALPHA_ MODE_ CUSTOM - TEX_
ALPHA_ MODE_ OPAQUE - TEX_
ALPHA_ MODE_ PREMULTIPLIED - TEX_
ALPHA_ MODE_ STRAIGHT - TEX_
ALPHA_ MODE_ UNKNOWN - TEX_
ALPHA_ WEIGHT_ DEFAULT - Default value for alpha weight used for GPU BC7 compression
- TEX_
COMPRESS_ A_ DITHER - Enables dithering alpha for BC1-3 compression
- TEX_
COMPRESS_ BC7_ QUICK - Minimal modes (usually mode 6) for BC7 compression
- TEX_
COMPRESS_ BC7_ USE_ 3SUBSETS - Enables exhaustive search for BC7 compress for mode 0 and 2; by default skips trying these modes
- TEX_
COMPRESS_ DEFAULT - TEX_
COMPRESS_ DITHER - Enables both RGB and alpha dithering for BC1-3 compression
- TEX_
COMPRESS_ PARALLEL - Compress is free to use multithreading to improve performance (by default it does not use multithreading)
- TEX_
COMPRESS_ RGB_ DITHER - Enables dithering RGB colors for BC1-3 compression
- TEX_
COMPRESS_ SRGB - if the input format type is IsSRGB(), then SRGB_IN is on by default
- TEX_
COMPRESS_ SRGB_ IN - if the input format type is IsSRGB(), then SRGB_IN is on by default
- TEX_
COMPRESS_ SRGB_ OUT - if the output format type is IsSRGB(), then SRGB_OUT is on by default
- TEX_
COMPRESS_ UNIFORM - Uniform color weighting for BC1-3 compression; by default uses perceptual weighting
- TEX_
DIMENSION_ TEXTUR E1D - TEX_
DIMENSION_ TEXTUR E2D - TEX_
DIMENSION_ TEXTUR E3D - TEX_
FILTER_ BOX - Filtering mode to use for any required image resizing
- TEX_
FILTER_ CUBIC - Filtering mode to use for any required image resizing
- TEX_
FILTER_ DEFAULT - TEX_
FILTER_ DITHER - Use ordered 4x4 dithering for any required conversions
- TEX_
FILTER_ DITHER_ DIFFUSION - Use error-diffusion dithering for any required conversions
- TEX_
FILTER_ DITHER_ MASK - TEX_
FILTER_ FANT - Filtering mode to use for any required image resizing
- TEX_
FILTER_ FLOAT_ X2BIAS - Enable *2 - 1 conversion cases for unorm<->float and positive-only float formats
- TEX_
FILTER_ FORCE_ NON_ WIC - Forces use of the non-WIC path when both are an option
- TEX_
FILTER_ FORCE_ WIC - Forces use of the WIC path even when logic would have picked a non-WIC path when both are an option
- TEX_
FILTER_ LINEAR - Filtering mode to use for any required image resizing
- TEX_
FILTER_ MIRROR - Wrap vs. Mirror vs. Clamp filtering options
- TEX_
FILTER_ MIRROR_ U - Wrap vs. Mirror vs. Clamp filtering options
- TEX_
FILTER_ MIRROR_ V - Wrap vs. Mirror vs. Clamp filtering options
- TEX_
FILTER_ MIRROR_ W - Wrap vs. Mirror vs. Clamp filtering options
- TEX_
FILTER_ MODE_ MASK - TEX_
FILTER_ POINT - Filtering mode to use for any required image resizing
- TEX_
FILTER_ RGB_ COPY_ ALPHA - When converting RGB(A) to R, defaults to using grayscale. These flags indicate copying a specific channel instead
- TEX_
FILTER_ RGB_ COPY_ BLUE - When converting RGB(A) to R, defaults to using grayscale. These flags indicate copying a specific channel instead
- TEX_
FILTER_ RGB_ COPY_ GREEN - When converting RGB(A) to R, defaults to using grayscale. These flags indicate copying a specific channel instead
- TEX_
FILTER_ RGB_ COPY_ RED - When converting RGB(A) to R, defaults to using grayscale. These flags indicate copying a specific channel instead
- TEX_
FILTER_ SEPARATE_ ALPHA - Resize color and alpha channel independently
- TEX_
FILTER_ SRGB - sRGB <-> RGB for use in conversion operations
- TEX_
FILTER_ SRGB_ IN - sRGB <-> RGB for use in conversion operations
- TEX_
FILTER_ SRGB_ MASK - TEX_
FILTER_ SRGB_ OUT - sRGB <-> RGB for use in conversion operations
- TEX_
FILTER_ TRIANGLE - Filtering mode to use for any required image resizing
- TEX_
FILTER_ WRAP - Wrap vs. Mirror vs. Clamp filtering options
- TEX_
FILTER_ WRAP_ U - Wrap vs. Mirror vs. Clamp filtering options
- TEX_
FILTER_ WRAP_ V - Wrap vs. Mirror vs. Clamp filtering options
- TEX_
FILTER_ WRAP_ W - Wrap vs. Mirror vs. Clamp filtering options
- TEX_
MISC2_ ALPHA_ MODE_ MASK - TEX_
MISC_ TEXTURECUBE - TEX_
PMALPHA_ DEFAULT - TEX_
PMALPHA_ IGNORE_ SRGB - ignores sRGB colorspace conversions
- TEX_
PMALPHA_ REVERSE - converts from premultiplied alpha back to straight alpha
- TEX_
PMALPHA_ SRGB - if the input format type is IsSRGB(), then SRGB_IN is on by default
- TEX_
PMALPHA_ SRGB_ IN - if the input format type is IsSRGB(), then SRGB_IN is on by default
- TEX_
PMALPHA_ SRGB_ OUT - if the output format type is IsSRGB(), then SRGB_OUT is on by default
- TEX_
THRESHOLD_ DEFAULT - Default value for alpha threshold used when converting to 1-bit alpha
- TGA_
FLAGS_ ALLOW_ ALL_ ZERO_ ALPHA - If the loaded image has an all zero alpha channel, normally we assume it should be opaque. This flag leaves it alone.
- TGA_
FLAGS_ BGR - 24bpp files are returned as BGRX; 32bpp files are returned as BGRA
- TGA_
FLAGS_ DEFAULT_ SRGB - If no colorspace is specified in TGA 2.0 metadata, assume sRGB
- TGA_
FLAGS_ FORCE_ LINEAR - Writes linear gamma metadata into the file reguardless of format (TGA 2.0 only)
- TGA_
FLAGS_ FORCE_ SRGB - Writes sRGB metadata into the file reguardless of format (TGA 2.0 only)
- TGA_
FLAGS_ IGNORE_ SRGB - Ignores sRGB TGA 2.0 metadata if present in the file
- TGA_
FLAGS_ NONE - WIN10_
DXGI_ FORMAT_ P208 - WIN10_
DXGI_ FORMAT_ V208 - WIN10_
DXGI_ FORMAT_ V408 - WIN11_
DXGI_ FORMAT_ A4B4 G4R4_ UNORM - XBOX_
DXGI_ FORMAT_ D16_ UNORM_ S8_ UINT - XBOX_
DXGI_ FORMAT_ R4G4_ UNORM - XBOX_
DXGI_ FORMAT_ R10G10 B10_ 6E4_ A2_ FLOAT - XBOX_
DXGI_ FORMAT_ R10G10 B10_ 7E3_ A2_ FLOAT - XBOX_
DXGI_ FORMAT_ R10G10 B10_ SNORM_ A2_ UNORM - XBOX_
DXGI_ FORMAT_ R16_ UNORM_ X8_ TYPELESS - XBOX_
DXGI_ FORMAT_ X16_ TYPELESS_ G8_ UINT
Functions§
- compress
- Note that threshold is only used by BC1. TEX_THRESHOLD_DEFAULT is a typical value to use
- compute_
normal_ map - convert
- Convert the image to a new format
- convert_
to_ single_ plane - Converts the image from a planar format to an equivalent non-planar format
- decompress
- generate_
mip_ maps - levels of ‘0’ indicates a full mipchain, otherwise is generates that number of total levels (including the source base image)
- generate_
mip_ maps_ 3d - levels of ‘0’ indicates a full mipchain, otherwise is generates that number of total levels (including the source base image)
- premultiply_
alpha - Converts to/from a premultiplied alpha version of the texture
- resize
- Resize the image to width x height. Defaults to Fant filtering.
- save_
dds - scale_
mip_ maps_ alpha_ for_ coverage