The GetImageInfoStructure function (BiDIB.dll) retrieves information about the resolution, size, bitcount and image format of the device independent bitmap. The GetDIBHorizontalDPI and GetDIBVerticalDPI methods are used for retrieving resolution in the BiDIB ActiveX control.
[C++]
/* Retrieving the resolution of an image file*/
#include “BiDIB.h”
DIBINFO dibinfo;
int iRet;
/* 1. parameter: path and name of the image file
2. parameter: page number (zero based integer)
3. parameter: Pointer to the info structure */
iRet = GetImageInfoStructure(_T(“C:\\Images\\Test.tif”), 0,
&dibinfo);
if (iRet != LS_OK)
{
// Error
}
[C#]
/* Retrieving the resolution of an image file*/
int iRes;
iRes = BiDIB.GetDIBVerticalDPI(hDib);
if (iRes == -1)
{
// Error
}