IWICDdsEncoder::SetParameters method (wincodec.h)

Sets DDS-specific data.


HRESULT SetParameters(
  [out] WICDdsParameters *pParameters


[out] pParameters

Type: WICDdsParameters*

Points to the structure where the information is described.

Return value


If this method succeeds, it returns S_OK. Otherwise, it returns an HRESULT error code.


You cannot call this method after you have started to write frame data, for example by calling IWICDdsEncoder::CreateNewFrame.

Setting DDS parameters using this method provides the DDS encoder with information about the expected number of frames and the dimensions and other parameters of each frame. The DDS encoder will fail if you do not set frame data that matches these expectations. For example, if you set WICDdsParameters::Width and Height to 32, and MipLevels to 6, the DDS encoder will expect 6 frames with the following dimensions:

  • 32x32 pixels.
  • 16x16 pixels.
  • 8x8 pixels.
  • 4x4 pixels.
  • 2x2 pixels.
  • 1x1 pixels.


Minimum supported client Windows 8.1 [desktop apps | UWP apps]
Minimum supported server Windows Server 2012 R2 [desktop apps | UWP apps]
Target Platform Windows
Header wincodec.h
Library Windowscodecs.lib
DLL Windowscodecs.dll

See also