com.esri.arcgis.carto
Interface IImageType

All Superinterfaces:
Serializable
All Known Implementing Classes:
ImageType

public interface IImageType
extends Serializable

Provides access to the Image Type Interface.

Remarks

Supported image formats include: PNG32, PNG24, PNG, JPG, GIF, BMP, DIB, TIFF, EMF, PS, PDF, AI, SVG and SVGZ. Please note that optimized MapServices do not support the Adobe Illustrator (AI) format. However they additionally support the PNG32 image format with full alpha channel transparency support. ReturnType includes URL and MimeData. If URL is specified the image is stored as a file at the specified location (Physical Output Directory) and can be accessed by internet clients through the Virtual Output Directory. If MIME is specified a stream of bytes is returned to the client.

When To Use

Use IImageType to set the image format and the return type for MapServer output images. MapServer output images are created using ExportMapImage on IMapServer2 and the following methods on IMapServerLayout: ExportLayout, ExportLegend, ExportNorthArrow and ExportScaleBar.

Product Availability

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


Method Summary
 int getFormat()
          The image format.
 int getReturnType()
          The return type.
 void setFormat(int imageFormat)
          The image format.
 void setReturnType(int returnType)
          The return type.
 

Method Detail

getFormat

int getFormat()
              throws IOException,
                     AutomationException
The image format.

Remarks

Supported image formats include: BMP, JPG, DIB, TIFF, PNG, PNG24, EMF, PS, PDF, AI, GIF, SVG and SVGZ. When a PNG24 image is requested from MapServer and in the same request specifies a transparent color, a 32-bit PNG is returned in order to support the transparency. The transparency is within the alpha channel and only supports only binary transparency.

Please note that optimized MapServices do not support the Adobe Illustrator (AI) format. However they additionally support the PNG32 image format with full alpha channel transparency support. PNG32 maintains transparency in the image that is set on the layer in the source map. To find out what image formats are supported by a map service, use the IMapServer2::ServiceConfigurationInfo property.

If SupportedImageFormatTypes is missing from ServiceConfigurationInfo, the MapService supports image formats mentioned in the first line.

The PNG32 image format is only supported by the ExportMapImage function on an optimized MapService. In order to maintain backward compatibility, the PNG32 format is not explicitly included in the esriImageFormat enum. To request the PNG32 format, cast the value 13 to type esriImageFormat in code section below.

Any export function, for both standard and optimized MapServer, that does not support PNG32 returns PNG24 when asked for this image type.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A com.esri.arcgis.carto.esriImageFormat constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setFormat

void setFormat(int imageFormat)
               throws IOException,
                      AutomationException
The image format.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
imageFormat - A com.esri.arcgis.carto.esriImageFormat constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getReturnType

int getReturnType()
                  throws IOException,
                         AutomationException
The return type.

Remarks

ReturnType includes URL and MimeData. If URL is specified the image is stored as a file at the specified location (Physical Output Directory) and can be accessed by internet clients through the Virtual Output Directory. If MIME is specified a stream of bytes is returned to the client.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Returns:
A com.esri.arcgis.carto.esriImageReturnType constant
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setReturnType

void setReturnType(int returnType)
                   throws IOException,
                          AutomationException
The return type.

Product Availability

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

Supported Platforms

Windows, Solaris, Linux

Parameters:
returnType - A com.esri.arcgis.carto.esriImageReturnType constant (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.