ArcObjects Library Reference (Carto)  

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
[C#]
public IMapImage ExportMapImage (
    IGeoImageDescription pImageDescription,
    IImageType pImageType
);
[C++]
HRESULT ExportMapImage(
  IGeoImageDescription* pImageDescription,
  IImageType* pImageType,
  IMapImage** ppImage
);
[C++]

Parameters

pImageDescription [in]

  pImageDescription is a parameter of type IGeoImageDescription

pImageType [in]

  pImageType is a parameter of type IImageType

ppImage [out, retval]

  ppImage is a parameter of type IMapImage

Product Availability

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

Description

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.

Remarks

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