PCDRes example for C++ Builder

This example checks for a high resolution image and loads it if possible.

System::AnsiString myfile, msg;

myfile = "v:\\images\\img0024.pcd"; //No PCD sample image is included with LEADTOOLS
Lead1->
GetFileInfo(myfile, 0);
if(Lead1->
InfoPCDRes[L_PCD_4BASE] == True)
{
Lead1->
PCDRes = L_PCD_4BASE;
msg = "Loading 1024 x 1536 resolution";
}
else
{
Lead1->
PCDRes = L_PCD_BASE;
msg = "Loading 512 x 768 resolution";
}
ShowMessage(msg);
Screen.Cursor = crHourGlass;
//Turn on the automatic display rectangles and the scroll bars.
Lead1->
AutoSetRects = True;
Lead1->
AutoScroll = True;
//Load the file.
Lead1->
Load(myfile, 0, 0, 1);
Lead1->
ForceRepaint();
Screen->Cursor = crDefault;