Available in the LEADTOOLS Imaging toolkit. |
ShowResizeDlg Example for Visual Basic
Private Sub Resize_Click() Dim RasterImgDlg As New LEADRasterDlgImg_U Dim RasterKrnDlg As New LEADRasterDlgKrn_U Dim nRet As Integer RasterKrnDlg.InitDlg 0 RasterImgDlg.MaxNewWidth = 0 RasterImgDlg.MaxNewHeight = 0 RasterImgDlg.MaxNewResolutionX = 0 RasterImgDlg.MaxNewResolutionY = 0 RasterImgDlg.CurrentWidth = LEAD1.BitmapWidth RasterImgDlg.CurrentHeight = LEAD1.BitmapHeight RasterImgDlg.CurrentResolutionX = LEAD1.BitmapXRes RasterImgDlg.CurrentResolutionY = LEAD1.BitmapYRes RasterImgDlg.BitsPerPixel = LEAD1.BitmapBits RasterImgDlg.UIFlags = RESIZE_SHOW_IDENTICALVALUE Or _ RESIZE_SHOW_MAINTAINASPECT Or _ RESIZE_SHOW_PERCENTAGE RasterImgDlg.Bitmap = LEAD1.Bitmap nRet = RasterImgDlg.ShowResizeDlg(hWnd) If (nRet = 0 And RasterImgDlg.DialogStatus = DLG_OK) Then LEAD1.Size RasterImgDlg.NewWidth, RasterImgDlg.NewHeight, RasterImgDlg.ResizeFlags End If RasterKrnDlg.FreeDlg End Sub