The GetImageInfoStructure function/method in the BiDIB DLL/OCX retrieves information about resolution, size, bitcount and image format of the device independent bitmap. The GetDIBWidth and GetDIBHeight methods are used for retrieving image size in the BiDIB ActiveX control.
[C++]
/* Retrieving the width and height 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 width and height of an image file*/
int iRes;
iRes = BiDIB.GetDIBWidth(hDib);
if (iRes == -1)
{
// Error
}