This document is archived and information here might be outdated.  Recommended version.

IImageServer2.ExportMapImage Method (ArcObjects .NET 10.8 SDK)
ArcObjects Help for .NET developers > ArcObjects Help for .NET developers > ArcObjects namespaces > Carto > ESRI.ArcGIS.Carto > Interfaces > II > IImageServer2 Interface > IImageServer2.ExportMapImage Method
ArcGIS Developer Help

IImageServer2.ExportMapImage Method

Exports into a well-known image with a correct aspect ratio for a given image description.

[Visual Basic .NET]
Public Function ExportMapImage ( _
    ByVal pImageDescription As IGeoImageDescription, _
    ByVal pImageType As IImageType _
) As IMapImage
public IMapImage ExportMapImage (
    IGeoImageDescription pImageDescription,
    IImageType pImageType
HRESULT ExportMapImage(
  IGeoImageDescription* pImageDescription,
  IImageType* pImageType
pImageDescription [in]

pImageDescription is a parameter of type IGeoImageDescription* pImageType [in]
pImageType is a parameter of type IImageType*

Product Availability

Available with ArcGIS Engine, ArcGIS Desktop, and ArcGIS Server.


Exports an image to a supported format including JPEG, PNG, BMP, and TIFF, scales the image into a square pixel size, and returns both the image data and the adjusted image extent for a given image description.  Comparing to ExportImage, ExportMapImage exports a MapImage which contains information defined in ImageResult plus image extent and map scale.


If the size of the image exceeds the limit defined in the image service
configuration, this method will return an error.

If the pixel type defined in ImageDescription is different from the pixel type of
the image service, the pixel values will be converted according to the specified
pixel type if possible. Otherwise, an error will be returned at 9.3.

New at 10, if the image service pixel type cannot be converted to the requested pixel type, a default raster renderer will be applied. A proper default renderer is created using the same rule as when a raster dataset of the same properties, e.g. number of band, pixel type, and etc is added to map.

See Also

IImageServer2 Interface