com.esri.arcgis.carto
Interface IImageDisplay2

All Superinterfaces:
Serializable
All Known Implementing Classes:
ImageDisplay

public interface IImageDisplay2
extends Serializable

Provides access to the Image Display Interface.

Description

This interface is new at ArcGIS 9.3. It supersedes IImageDisplay.

Remarks

Setting 0 for either the height or the width for ExportMapImage output results in an error. An ExportMapImage result needs both height and width to be set. In order to control the size of an exported map image, IMapServerInit2 contains two properties: MaxImageHeight and MaxImageWidth. The default value for these properties is 2048 pixels. See ExportMapImage for more information.

ExportMapImage on IMapServer2 and the following methods on IMapServerLayout: ExportLayout, ExportLegend, ExportNorthArrow and ExportScaleBar.

Furthermore, the follwing methods on MapServer depend on ImageDisplay: ComputeScale, Find, Identify, QueryHyperlinks, ToMapPoints and FromMapPoints. For example, both the Find and Identify methods can be performed for only the visible layers in the map. Layer visibility may be dependent on map scale which, in turn, is dependent on the image display. The methods ToPagePoints and FromPagePoints on MapServerLayout also depend on ImageDisplay.

Product Availability

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


Method Summary
 double getDeviceResolution()
          The device resolution of the image (dots per inch).
 int getHeight()
          The height of the image in pixels.
 IColor getTransparentColor()
          Transparent color for image types that support transparent color.
 int getWidth()
          The width of the image in pixels.
 void setDeviceResolution(double dpi)
          The device resolution of the image (dots per inch).
 void setHeight(int imageHeight)
          The height of the image in pixels.
 void setTransparentColor(IColor ppTransparentColor)
          Transparent color for image types that support transparent color.
 void setWidth(int imageWidth)
          The width of the image in pixels.
 

Method Detail

getHeight

int getHeight()
              throws IOException,
                     AutomationException
The height of the image in pixels.

Remarks

When setting a value for Height it is important to note that the result depends on a number of variables such as the method being used, the output Format and the DeviceResolution. Please review the remarks for ExportMapImage and ExportLayout for more information.

In order to control the size of an exported map image, IMapServerInit2 contains two properties: MaxImageHeight and MaxImageWidth . The default value for these properties is 2048 pixels.

Product Availability

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

Returns:
The imageHeight
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setHeight

void setHeight(int imageHeight)
               throws IOException,
                      AutomationException
The height of the image in pixels.

Product Availability

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

Parameters:
imageHeight - The imageHeight (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getWidth

int getWidth()
             throws IOException,
                    AutomationException
The width of the image in pixels.

Remarks

When setting a value for Width it is important to note that the result depends on a number of variables such as the method being used, the output Format and the DeviceResolution. Please review the remarks for ExportMapImage and ExportLayout for more information.

In order to control the size of an exported map image, IMapServerInit2 contains two properties: MaxImageHeight and MaxImageWidth . The default value for these properties is 2048 pixels.

Product Availability

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

Returns:
The imageWidth
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setWidth

void setWidth(int imageWidth)
              throws IOException,
                     AutomationException
The width of the image in pixels.

Product Availability

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

Parameters:
imageWidth - The imageWidth (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getDeviceResolution

double getDeviceResolution()
                           throws IOException,
                                  AutomationException
The device resolution of the image (dots per inch).

Remarks

When setting a value for DeviceResolution it is important to note that the result depends on a number of variables such as the method being used and the output Format selected in addition to the DeviceResolution. Please review the remarks for ExportMapImage and ExportLayout for more information.

Product Availability

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

Returns:
The dpi
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setDeviceResolution

void setDeviceResolution(double dpi)
                         throws IOException,
                                AutomationException
The device resolution of the image (dots per inch).

Product Availability

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

Parameters:
dpi - The dpi (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

getTransparentColor

IColor getTransparentColor()
                           throws IOException,
                                  AutomationException
Transparent color for image types that support transparent color.

Remarks

Use this property to make a specified color transparent. This is most commonly done to make the background transparent. This can done on any MapServer function that takes an ImageDisplay as a parameter.

Setting a transparent color is valid only for formats that support transparency. These include: png, png24 and gif.

When using ExportMapImage if different colors are set as transparent in the MapDescription (TransparentColor) and in the ImageDisplay, the color set in the ImageDisplay takes precedence over the one set in the MapDescription..

To make background of the image transparent set the ImageDisplay2 TransparentColor equal to the BackgroundColor specified in IMapServerInfo2 .

Product Availability

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

Returns:
A reference to a com.esri.arcgis.display.IColor
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.

setTransparentColor

void setTransparentColor(IColor ppTransparentColor)
                         throws IOException,
                                AutomationException
Transparent color for image types that support transparent color.

Product Availability

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

Parameters:
ppTransparentColor - A reference to a com.esri.arcgis.display.IColor (in)
Throws:
IOException - If there are interop problems.
AutomationException - If the ArcObject component throws an exception.