GIFFormat
サマリー
The GIFFormat object represents a collection of Graphic Interchange Format (GIF) file properties that can be configured and used with the export method on the Layout, MapFrame, and MapView objects to create an output GIF file.
ディスカッション
GIF files are a legacy raster format for use on the web. GIFs cannot contain more than 256 colors (8 bits per pixel), which, along with optional lossless RLE or LZW compression, makes them smaller than other file formats. GIF files can also define a transparent color. GIFs can be generated with an accompanying world file for use as georeferenced raster data.
The createExportFormat method can be used to create a GIFFormat object if the format parameter is set to GIF. The returned GIFFormat object contains all the properties associated with a generating a GIF file. These properties can be modified accordingly to produce different output results.
プロパティ
| 名前 | 説明 | データ タイプ |
|---|---|---|
|
clipToElements (読み取り/書き込み) |
If set to |
Boolean |
|
colorMode (読み取り/書き込み) |
A string constant that represents the number of bits to describe color in a pixel. The default value is
|
String |
|
filePath (読み取り/書き込み) |
A string that represents the system path and file name, including the extension, for the exported file. |
String |
|
geoReferenceMapFrame (読み取り/書き込み) |
The MapFrame used to control the coordinate system when the |
MapFrame |
|
height (読み取り/書き込み) |
The height, in pixels, of the map area to be exported. This property only applies when exporting a |
Double |
|
resolution (読み取り/書き込み) |
The effective dpi of the output vector data. The default value is 96. 注意:When exporting a |
Integer |
|
showSelectionSymbology (読み取り/書き込み) |
Show selected features in the map or map frame as selected in the output file. Setting this value to |
Boolean |
|
threshold (読み取り/書き込み) |
Image intensities set above this value will appear white in the output file and all other values will appear black. This property is applied only when the |
Boolean |
|
width (読み取り/書き込み) |
The width, in pixels, of the map area to be exported. This property only applies when exporting a |
Double |
|
worldFile (読み取り/書き込み) |
If set to |
Boolean |
方法
setColorMode(gif_color_mode)
A string constant that represents the number of bits to describe color in a pixel.
| 名前 | 説明 | データ タイプ |
|---|---|---|
|
gif_color_mode |
Below is a list of valid strings.
|
String |
コードのサンプル
The following script exports a layout to GIF format using default property values.
p = arcpy.mp.ArcGISProject('current')
lyt = p.listLayouts()[0]
gif = arcpy.mp.CreateExportFormat('GIF', r'C:\Temp\Output.gif')
lyt.export(gif)