Available in the LEADTOOLS Imaging toolkit. |
PCDRes example for C++ 4.0 and later
This example checks for a high resolution image and loads it if possible.
CString myfile("v:\\images\\img0024.pcd"); // No PCD sample image is included with LEADTOOLS
m_Lead1.GetFileInfo(myfile, 0, 0 );
CString msg;
if (m_Lead1.GetInfoPCDRes (PCDRES_4BASE))
{
m_Lead1.SetPCDRes(PCDRES_4BASE);
msg = "Loading 1024 x 1536 resolution";
}
else
{
m_Lead1.SetPCDRes(PCDRES_BASE);
msg = "Loading 512 x 768 resolution";
}
MessageBox(msg);
BeginWaitCursor();
// Turn on the automatic display rectangles and the scroll bars.
m_Lead1.SetAutoSetRects(TRUE);
m_Lead1.SetAutoScroll(TRUE);
// Load the file.
m_Lead1.Load(myfile, 0, 0, 1);
m_Lead1.ForceRepaint();
EndWaitCursor();