ShowJPEGWebTunerDlg Example for Visual Basic

Dim RasterWebDlg As New LEADRasterDlgWeb
Dim RasterIO As New LEADRasterIO
Dim nRet As Integer

Private Sub JPEGWebTuner_Click()
   RasterWebDlg.Bitmap = LEADRasterView1.Raster.Bitmap
   RasterWebDlg.UIFlags = JPEGWEBTUNER_SHOW_INFORMATION + _
                                        JPEGWEBTUNER_SHOW_PREVIEW + _
                                        JPEGWEBTUNER_SHOW_TOOL_ZOOMLEVEL + _
                                        JPEGWEBTUNER_SHOW_SAVETHUMBNAIL + _
                                        JPEGWEBTUNER_SHOW_OPTIONS + _
                                        JPEGWEBTUNER_SHOW_SAVETHUMBNAIL

   nRet = RasterWebDlg.ShowJPEGWebTunerDlg(hWnd) 
   
   If (nRet = 0 And RasterWebDlg.DialogStatus = DLG_OK) Then
      If (RasterWebDlg.EnableProgressive) Then
        RasterIO.ProgressivePasses = 1
      End If
      If RasterWebDlg.EnableStamp Then
         RasterIO.SaveWithStamp LEADRasterView1.Raster, _
                                 "c:\temp\output.jpg", _
                                 RasterWebDlg.JPEGFormat, _
                                 24, _
                                 RasterWebDlg.Quality, _
                                 32, _
                                 32, _
                                 24
         Else
         RasterIO.Save LEADRasterView1.Raster, _
                       "c:\\temp\\output.jpg", _
                       RasterWebDlg.JPEGFormat, _
                       24, _
                       RasterWebDlg.Quality, _
                       SAVE_OVERWRITE
         End If
    End If
End Sub