BMPFormat
Résumé
The BMPFormat object represents a collection of Microsoft Windows bitmap (BMP) file properties that can be configured and used with the export method on the Layout, MapFrame, and MapView objects to create an output BMP file.
Discussion
BMP files are native Windows raster images. BMP files can store pixel data at several bit depths and can be compressed using the lossless RLE method. BMP images are typically much larger than formats such as JPEG or PNG.
The createExportFormat method can be used to create a BMPFormat object if the format parameter is set to BMP. The returned BMPFormat object contains all the properties associated with a generating a BMP file. These properties can be modified accordingly to produce different output results.
Propriétés
| Nom | Explication | Type de données |
|---|---|---|
|
clipToElements (Lecture et écriture) |
If set to |
Boolean |
|
colorMode (Lecture et écriture) |
A string constant that represents the number of bits to describe color in a pixel. The default value is
|
String |
|
filePath (Lecture et écriture) |
A string that represents the system path and file name, including the extension, for the exported file. |
String |
|
geoReferenceMapFrame (Lecture et écriture) |
The MapFrame used to control the coordinate system when the |
MapFrame |
|
height (Lecture et écriture) |
The height, in pixels, of the map area to be exported. This property only applies when exporting a |
Double |
|
resolution (Lecture et écriture) |
The effective dpi of the output vector data. The default value is 96. Remarque :When exporting a |
Integer |
|
showSelectionSymbology (Lecture et écriture) |
Show selected features in the map or map frame as selected in the output file. Setting this value to |
Boolean |
|
threshold (Lecture et écriture) |
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 (Lecture et écriture) |
The width, in pixels, of the map area to be exported. This property only applies when exporting a |
Double |
|
worldFile (Lecture et écriture) |
If set to |
Boolean |
Méthodes
setColorMode(bmp_color_mode)
A string constant that represents the number of bits to describe color in a pixel.
| Nom | Explication | Type de données |
|---|---|---|
|
bmp_color_mode |
Below is a list of valid strings.
|
String |
Exemple de code
The following script exports a layout to BMP format using default property values.
p = arcpy.mp.ArcGISProject('current')
lyt = p.listLayouts()[0]
bmp = arcpy.mp.CreateExportFormat('BMP', r'C:\Temp\output.bmp')
lyt.export(bmp)