Available in the LEADTOOLS Imaging toolkit. |
PCDRes example for Visual J++
This example checks for a high resolution image and loads it if possible.
String strMyFile = "v:\\images\\img0024.pcd"; // No PCD sample image is included with LEADTOOLS
LEAD1.GetFileInfo( strMyFile, (short) 0, 0 );
String strMsg = "";
if( LEAD1.getInfoPCDRes( (short) LTOCXU.PCDResConstants.PCDRES_4BASE ) )
{
LEAD1.setPCDRes( (short) LTOCXU.PCDResConstants.PCDRES_4BASE );
strMsg = "Loading 1024 x 1536 resolution";
}
else
{
LEAD1.setPCDRes( (short) LTOCXU.PCDResConstants.PCDRES_BASE );
strMsg = "Loading 512 x 768 resolution";
}
MessageBox.show( strMsg );
setCursor( Cursor.WAIT ); // hourglass
// Turn on the automatic display rectangles and the scroll bars.
LEAD1.setAutoSetRects( true );
LEAD1.setAutoScroll( true );
// Load the file.
LEAD1.Load( strMyFile, (short) 0, (short) 0, (short) 1 );
LEAD1.ForceRepaint();
setCursor( Cursor.DEFAULT ); // default