Exports an image in a well-known format (PNG, JPEG, etc.) for a given image description.
ExportImage(GeoImageDescription ImageDescription, ImageType ImageType)
Parameter |
Description |
ImageDescription |
Defines the properties of the image generated by the service. Pixel data will be processed on-the-fly to fit description properties. The properties you can specify include extent, spatial reference, compression, interpolation, band selection, etc.
New at version 10.0, this also defines a mosaic rule on how mosaic should be performed, and a rendering rule on how the image should be rendered using a MosaicRule and a RenderingRule value objects. |
ImageType |
Defines the format and the return type for transmitting the requested image. |
Return Value
An ImageResult object.
Remarks
The supported formats, defined using the ImageType parameter, include JPEG, PNG, BMP, and TIFF. The JPEG format is the same as the JPEG compressed image returned from the GetImage method. Image content can be returned as a URL or as a MIME data stream.
If the size of the image in terms of number of columns and rows 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 version 10.0, 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, etc. is added to map.
New at version 10.0, "JPGPNG" is added as a new format to the this request, which returns a JPG when there are no transparent pixels like a PNG.
Examples