MapWinGIS:Image Save
From MapWindow GIS
Save
Saves the image to file.
VB.NET Usage
Function Save(ImageFileName As String, Optional WriteWorldFile As Boolean, Optional FileType As MapWinGIS.ImageType, Optional cBack As MapWinGIS.ICallback) As Boolean
Parameters
|
ImageFileName | The filename to use to save the image. |
| WriteWorldFile | Optional. A boolean value representing whether a world file is also written. The default is false. |
| FileType | Optional. The filetype to use to save the image. Default is "USE_FILE_EXTENSION". |
| cBack | Optional. The ICallback object which will receive the progress and error messages while the image is being saved. |
| ReturnValue | A boolean value representing the success or failure of saving the image. |
Sample Code
Private Sub SaveImage()
Dim image As New MapWinGIS.Image()
Dim success As Boolean
Dim filename As String
'Set the filename to be used to save the image
filename = "C:\test.bmp"
'Save the image as a bitmap
success = image.Save(filename, False, MapWinGIS.ImageType.BITMAP_FILE, Me)
'If the save wasn't successful display an error message
If Not success Then
MsgBox("There were errors saving the image.")
End If
End Sub
VB 6 Usage
Function Save(ImageFileName As String, Optional WriteWorldFile As Boolean, Optional FileType As ImageType, Optional cBack As ICallback) As Boolean
Parameters
|
ImageFileName | The filename to use to save the image. |
| WriteWorldFile | Optional. A boolean value representing whether a world file is also written. The default is false. |
| FileType | Optional. The filetype to use to save the image. Default is "USE_FILE_EXTENSION". |
| cBack | Optional. The ICallback object which will receive the progress and error messages while the image is being saved. |
| ReturnValue | A boolean value representing the success or failure of saving the image. |
Sample Code
Private Sub SaveImage()
Dim image As New MapWinGIS.image
Dim success As Boolean
Dim filename As String
'Set the filename to be used to save the image
filename = "C:\test.bmp"
'Save the image as a bitmap
success = image.Save(filename, False, MapWinGIS.ImageType.BITMAP_FILE, Me)
'If the save wasn't successful display an error message
If Not success Then
MsgBox ("There were errors saving the image.")
End If
End Sub
















