Available in the LEADTOOLS Imaging toolkit. |
ProgressivePasses Example for Visual J++
This example shows how to save and load a progressive file.
// Save the current image as a progressive CMP file.
LEAD1.setProgressivePasses( (short) 8 );
LEAD1.Save( "c:\\lead\\images\\TMP.cmp", (short) LTOCXU.FileConstants.FILE_CMP, (short) 24,
(short) LTOCXU.QFactorConstants.QFACTOR_PQ2,
(short) LTOCXU.SaveModifyConstants.SAVE_OVERWRITE );
// Set properties to show progressive paints when we load.
LEAD1.setPaintWhileLoad( true );
LEAD1.setAutoSetRects( false );
// Load the file we just saved.
LEAD1.setProgressivePasses( (short) LTOCXU.ProgressivePassesConstants.PROGRESSIVEPASSES_WHEN_MEANINGFUL );
LEAD1.Load( "c:\\lead\\images\\TMP.cmp", (short) 0, (short) 0, (short) 1 );
// Restore the default behavior.
LEAD1.setProgressivePasses( (short) 0 );