ArcGIS Pro 3.7 API Reference Guide
ArcGIS.Desktop.Mapping Namespace / BMPFormat Class
Members Example

In This Topic
    BMPFormat Class
    In This Topic
    Represents a Microsoft Windows Bitmap (BMP) object that can be used to export a MapView, MapFrame, or a Layout.
    Syntax
    Public Class BMPFormat 
       Inherits ExportFormat
    public class BMPFormat : ExportFormat 
    Remarks
    BMP files are simple, native Windows raster images. In general, BMPs are much larger than formats such as JPEG or PNG. They do not scale as well as vector files and may appear blocky or jagged when increased in size. BMPs can be generated with an accompanying world file for use as georeferenced raster data.
    Example
    Export the map view associated with a map frame to BMP
    {
      //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
          }
        }
      });
    }
    Inheritance Hierarchy

    System.Object
       ArcGIS.Desktop.Mapping.ExportFormat
          ArcGIS.Desktop.Mapping.BMPFormat

    Requirements

    Target Platforms: Windows 11 Home, Pro, Enterprise (64 bit)

    ArcGIS Pro version: 3.0 or higher.
    See Also