How to retrieve the DPI of a TIFF image

  Imaging Toolkit

In order to retrieve the DPI of a TIFF image, One can use the GetTiffImageDPI function.

One should use the GetTiffImageDPI function like this:

LONG dwDPI;
GetTiffImageDPI(hChain, nImage, &dwDPI);
UINT wHorizontalDPI = LOWORD(dwDPI);
UINT wVerticalDPI = HIWORD(dwDPI);

The nImage parameter is the index of the page in the TIFF file.

One can check the using of the GetTiffImageDPI function in the TIFF C++ Sample. The sample is available in the SDK.

Regards,
Technical Support Team