If set to true, the file will contain pixel scale and real-world coordinate information. World files are not generated for Layout exports.
If you export a 3D view, this parameter will be ignored regardless of the setting because world files are not applicable to 3D views.
The default value is false.
{
//Export the map view associated with a map frame to BMP.
string filePath = @"Path and file name for the output export file";
//Create BMP format with appropriate settings
//EMF, EPS, GIF, JPEG, PDF, PNG, SVG, TGA, and TFF formats are also available for export
BMPFormat BMP = new BMPFormat()
{
Resolution = 300,
Height = 500,
Width = 800,
HasWorldFile = true,
OutputFileName = filePath
};
//Export on the worker thread
await QueuedTask.Run(() =>
{
MapView mv_bmp = mapFrame.GetMapView(layoutView);
if (mv_bmp != null)
{
//Check to see if the path is valid and export
if (BMP.ValidateOutputFilePath())
{
mv_bmp.Export(BMP); //Export to BMP
}
}
});
}
Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)