Saves one or more images in memory buffers to a .WIC file.
HRESULT SaveToWICFile(
const Image *images,
size_t nimages,
DWORD flags,
REFGUID guidContainerFormat,
LPCWSTR szFile,
const GUID *targetFormat,
std::function<void(IPropertyBag2*)> setCustomProps = nullptr
)
images
Type: Image *
Pointer to one or more Image structures in a memory buffer.
nimages
Type: size_t
[in] The number of images.
flags
Type: DWORD
[in] One or more flags from the WIC_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.