IImageService.GetRecommendedBufferSize method
Applies To: IImageService
Returns the size of the buffer required to extract an image with dimensions set by SetImageInfo method.
It is particularly useful when extracting an image in memory. It is used to initialize the image buffer before requesting for an image.
[Visual Basic 6.0]
variable = Object.GetRecommendedBufferSize()
Return Value
Long.
Requirements
Platform |
32 bit Windows OS (WinXP) |
Environment |
.NET Framework, COM, ANSI C / C++ Standard compliant |
Dependency |
ESRI.ImageServer.ISClient.dll (.NET Framework), ISClient.dll (COM/C++), ISClientC.dll (C/C++) |
Include |
isclientc.h (ANSI C) |
Example
[Visual Basic 6.0]
Private Sub Form1_Load()
Dim client As New CClientObject
Dim strConfigPath As String
strConfigPath = "c:\Program Files\ArcGIS\ImageServer10.0\XADefs\ISViewer.ISCConfig"
If client.Init(strConfigPath) = False Then
MsgBox client.Status
Exit Sub
End If
Dim cService As CImageService
Set cService = client.OpenImageService(“ImageService://hawkings:10000/Dxb_Tif”, "")
If cService Is Nothing Then Exit Sub
Dim returnVal As Boolean
returnVal = cService.SetImageInfo(120034.5, 869002.6, 120500.13, 869711.39, 500, 500)
If returnVal = False Then
MsgBox theService.Status
Exit Sub
End If
Dim dwImgSize As Long
dwImgSize = cService.GetRecommendedBufferSize()
End Sub
For a detailed example, please see the ISViewer Sample in VB 6.0 or the Client Application Sample in ANSI C in [ArcGIS Image Server installation folder]\Developer Kit\Client Applications\Samples\ folder.
Related Topics
See also: SetImageInfo, and GetImageByExtent