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. Compared to ExportImage, this method exports a MapImage which contains information defined in ImageResult plus the image extent and map scale.
ExportScaledImage(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 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 of the exported image |
Return Value
A MapImage object.
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 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, and 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