IWICBitmapFrameEncode::SetResolution method (wincodec.h)

Sets the physical resolution of the output image.

Syntax

HRESULT SetResolution(
  [in] double dpiX,
  [in] double dpiY
);

Parameters

[in] dpiX

Type: double

The horizontal resolution value.

[in] dpiY

Type: double

The vertical resolution value.

Return value

Type: HRESULT

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

Remarks

Windows Imaging Component (WIC) doesn't perform any special processing as a result of DPI resolution values. For example, data returned from IWICBitmapSource::CopyPixels isn't scaled by the DPI. The app must handle DPI resolution.

Requirements

Requirement Value
Minimum supported client Windows XP with SP2, Windows Vista [desktop apps | UWP apps]
Minimum supported server Windows Server 2008 [desktop apps | UWP apps]
Target Platform Windows
Header wincodec.h
Library Windowscodecs.lib
DLL Windowscodecs.dll