Search the Knowledgebase |
Browse by Category |
|
|
|
| How can I specify the size of the bitmap being exported in a script? |
| User Opinions |
100%
0%
|
|
Thank you for rating this answer.
|
The Plot.Export command is accessible from the PlotDocument object.
'Open a file so there is something to export Set Plot = mvApp.Documents.Open(mvApp.ApplicationFolder + "Samples\flow.gsm") After you have a PlotDocument (Plot), you can export the map using the Export command.
'Export the map as a bitmap Plot.Export(FileName:="c:\Temp\export.tif")
When you are exporting to a bitmap format, such as a TIF, BMP, JPG, PNG, or GIF, there are some options that are available. These allow you to control the exported image size, color depth, and quality. The most common options are: Width and Height or HDPI and VDPI (dots per inch), ColorDepth, Automatic, and Quality. These can be used like this:
'Export the map as a bitmap using Width and Height Plot.Export(FileName:="c:\Temp\export.tif", Options:="Width=1024, Height=720")
'Export the map as a bitmap using HDPI and VDPI at 300 dots per inch Plot.Export(FileName:="c:\Temp\export.tif", Options:="HDPI=300, VDPI=300")
'Export the map with ColorDepth set to monochrome Plot.Export(FileName:="c:\Temp\export.tif", Options:="ColorDepth=1") 'ColorDepth = 4 for 16 colors, 8 for 256 colors, or 24 for true color
'Export the map with automatic compression turned off and quality set to 100% Plot.Export(FileName:="c:\Temp\export.jpg", Options:="Automatic=False, Quality=100")
|
| Visitor Comments |
|
No visitor comments posted. Post a comment
|
| Attachments |
|
No attachments were found.
|