TGAFormat
サマリー
The TGAFormat object represents a collection of Truevision Graphics Adaptor (TGA) file properties that can be configured and used with the export method on the Layout, MapFrame, and MapView objects to create an output TGA file.
ディスカッション
TGA files have historically been used for content that is meant to be used in other applications (for example, image sprites for animated games) and is read and written by many popular graphic arts applications. It supports multiple bit depths including 32 bit with alpha (transparency) support.
The createExportFormat method can be used to create a TGAFormat object if the format parameter is set to TGA. The returned TGAFormat object contains all the properties associated with a generating a TGA 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 |
|
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 |
|
transparentBackground (読み取り/書き込み) |
If set to 注意:Transparent backgrounds are only supported when |
Boolean |
|
width (読み取り/書き込み) |
The width, in pixels, of the map area to be exported. This property only applies when exporting a |
Double |
方法
setColorMode(color_mode)
A string constant that represents the number of bits to describe color in a pixel.
| 名前 | 説明 | データ タイプ |
|---|---|---|
|
color_mode |
Below is a list of valid strings.
|
String |
コードのサンプル
The following script exports a layout to TGA format using default property values.
p = arcpy.mp.ArcGISProject('current')
lyt = p.listLayouts()[0]
tga = arcpy.mp.CreateExportFormat('TGA', r'C:\Temp\Output.tga')
lyt.export(tga)