LoadUseViewPerspective example for Visual J++

Note: This topic is for Document/Medical only.

This example times the loading of a bitmap with and without changing the internal view perspective.

// Do not include paints when measuring time.
LEAD1.setAutoRepaint( false );

// Time the load using the bitmap's view perspective.
LEAD1.setLoadUseViewPerspective( true );

Time timeStart = new Time();
LEAD1.Load( "c:\\lead\\images\\ocr1.tif", (short) 0, (short) 0, (short) 1 );
Time timeEnd = new Time();
MessageBox.show( timeEnd.getSecond() - timeStart.getSecond() + " seconds loaded as is" );

// Time the load that converts the bitmap's view perspective.
LEAD1.setLoadUseViewPerspective( false );
timeStart = new Time();
LEAD1.Load( "c:\\lead\\images\\ocr1.tif", (short) 0, (short) 0, (short) 1 );
timeEnd = new Time();
MessageBox.show( timeEnd.getSecond() - timeStart.getSecond() + " seconds converted on load" );