ShowJPEGWebTunerDlg Example for C++ 5.0 and later
void CDialogs::OnJPEGWebTuner()
{
m_pRasterWebDlg->PutBitmap (m_RasterView.GetRaster().GetBitmap ());
m_pRasterWebDlg->PutUIFlags ( JPEGWEBTUNER_SHOW_INFORMATION |
JPEGWEBTUNER_SHOW_PREVIEW |
JPEGWEBTUNER_SHOW_TOOL_ZOOMLEVEL |
JPEGWEBTUNER_SHOW_SAVETHUMBNAIL |
JPEGWEBTUNER_SHOW_OPTIONS |
JPEGWEBTUNER_SHOW_SAVETHUMBNAIL);
nRet = m_pRasterWebDlg->ShowJPEGWebTunerDlg((long)this->m_hWnd);
if(nRet == 0 && m_pRasterWebDlg->GetDialogStatus () == OK)
{
if ( m_pRasterWebDlg->GetEnableProgressive())
m_pRasterIO->PutProgressivePasses (1);
if (m_pRasterWebDlg->GetEnableStamp())
{
m_pRasterIO->SaveWithStamp ((ILEADRaster*) m_RasterView.GetRaster ().m_lpDispatch,
"c:\\temp\\output.jpg",
(RasterFileConstants)m_pRasterWebDlg->GetJPEGFormat(),
24,
(QFactorConstants)m_pRasterWebDlg->GetQuality(),
32,
32,
24 );
}
else
{
m_pRasterIO->Save ((ILEADRaster*)m_RasterView.GetRaster().m_lpDispatch,
"c:\\temp\\output.jpg",
(RasterFileConstants)m_pRasterWebDlg->GetJPEGFormat ()
24,
m_pRasterWebDlg->GetQuality (),
SAVE_OVERWRITE );
}
}