Saves one or more images in memory buffers to a .WIC file.
HRESULT SaveToWICFile(
const Image &image,
DWORD flags,
REFGUID guidContainerFormat,
LPCWSTR szFile,
const GUID *targetFormat,
std::function<void(IPropertyBag2*)> setCustomProps = nullptr
)
image
Type: Image
[in] Pointer to a single Image structure in a memory buffer.
flags
Type: DWORD
[in] One or more flags from the DDS_FLAGS enumeration.
guidContainerFormat
Type: REFGUID
[in] GUID of the container format. See GetWICCodec.
szFile
Type: LPCWSTR
[in] Source file.
targetFormat
Type: GUID *
[in, optional] The WIC pixel format, as a GUID. If the specified WIC pixel format is not supported by the WIC codec, E_FAIL is returned.
setCustomProps
Type: std::function<void(IPropertyBag2*)>
[in, optional] Any custom properties for the image, as a function that returns void and takes a pointer to an IPropertyBag2.
Type: HRESULT
Header: Declared in directxtex.h.