Map service GetTileImageInfo method
Gets information about the image format of the cache tiles.
GetTileImageInfo(string MapName)
Parameter |
Description |
---|---|
MapName |
The name of the map (data frame) that contains a cache. |
Return Value
A TileImageInfo object that contains information about the image format and compression quality, if applicable.
Remarks
Depending on how the cache for the map service was generated, four image formats may be available: PNG8, PNG24, PNG32 or JPEG. Compression quality only applies to lossy image formats (JPEG).
- PNG8: a lossless, 8-bit color, image format that uses an indexed color palette and an alpha table. Each pixel stores a value (0-255) that is used to look up the color in the color-palette and the transparency in the alpha table. 8-bit PNGs are similar to GIF images and enjoy the best support for transparent backgrounds.
- PNG24: a lossless, three-channel image format that supports large color variations (16 million colors) and has limited support for transparency. Each pixel contains three 8-bit color channels and the file header contains the single color that represents the transparent background. Cached image tiles using PNG24 are significantly larger than those using PNG8 or JPEG.
- PNG32: a lossless, four-channel image format that supports large color variations (16 million colors) and transparency. Each pixel contains three 8-bit color channels and one 8-bit alpha channel that represents the level of transparency for each pixel. While the PNG32 format allows for partially transparent pixels in the range from 0 to 255, ArcGIS Server map server caches only support fully transparent (0) or fully opaque (255) values in the transparency channel. Cached image tiles using PNG32 are significantly larger than the other ArcGIS Server cache image formats.
- JPEG: a lossy, three-channel image format that supports large color variations (16 million colors) but does not support transparency. Each pixel contains three 8-bit color channels. Caches using JPEG provide control over compression quality and can be more compact than the PNG format.
Examples
C#
MapService_MapServer mapservice = new MapService_MapServer();
mapservice.Url = "http://localhost:6080/arcgis/services/MapFusedCache/MapServer";
string mapname = mapservice.GetDefaultMapName();
if (mapservice.HasSingleFusedMapCache(mapname))
{
TileImageInfo tileimageinfo = mapservice.GetTileImageInfo(mapname);
}
VB.NET
Dim mapservice As MapService_MapServer = New MapService_MapServer()
mapservice.Url = "http://localhost:6080/arcgis/services/MapFusedCache/MapServer"
Dim mapname As String = mapservice.GetDefaultMapName()
If mapservice.HasSingleFusedMapCache(mapname) Then
Dim tileimageinfo As TileImageInfo = mapservice.GetTileImageInfo(mapname)
End If
Java
String serviceURL = "http://localhost:6080/arcgis/services/MapService/MapServer";
MapServerBindingStub mapService = new MapServerBindingStub(serviceURL);
String mapName = mapService.getDefaultMapName();
if (mapService.hasSingleFusedMapCache(mapName))
{
TileImageInfo tileImageInfo = mapService.getTileImageInfo(mapName);
System.out.println("Compression Quality: " + tileImageInfo.getCompressionQuality());
System.out.println("Anti-Aliasing: " + tileImageInfo.getAntialiasing());
System.out.println("Cache Tile Format: " + tileImageInfo.getCacheTileFormat());
}
10/23/2013