#include "BITIFF.H"
LONG CALLBACK GetTiffImageDPI( TIFFFILE hChain,
int iImage,
LPLONG lpDPI)
Description
Returns the dot per inch (DPI) setting of the specified image. The LOWORD of lpDPI is the horizontal DPI and HIWORD of lpDPI is the vertical DPI. If the TIFF image does not contain DPI information, the function returns the screen DPI.
Parameters
|
TIFFFILE |
hChain |
TIFF image chain handle. |
|
int |
iImage |
Index of the image in the chain. |
|
LPLONG |
lpDPI |
The address where to return the DPI. |
Return values
TOK on success, error code if failed. Possible error code values are TINDEXOUTOFRANGE and TIMAGENOTREGISTERED. You need not to call TiffError() because the return value is the same for both functions.
References to related functions
See SetTiffImageDPI().
Requirements
Header : Declared in BiTiff.h; include BiTiff.h.
Library : Use BiTIFF.lib.
DLLs : BiTiff.dll.
Code example
if (GetTiffImageDPI(hChain, nImage, &dwValue) == TOK)
{
SetDlgItemText(hDlg,ID_XDPI,ltoa(LOWORD(dwValue),Buff,10));
SetDlgItemText(hDlg,ID_YDPI,ltoa(HIWORD(dwValue),Buff,10));
}