public enum JPEGColorMode : System.Enum, System.IComparable, System.IConvertible, System.IFormattable
Public Enum JPEGColorMode Inherits System.Enum Implements System.IComparable, System.IConvertible, System.IFormattable
public enum JPEGColorMode : System.Enum, System.IComparable, System.IConvertible, System.IFormattable
Public Enum JPEGColorMode Inherits System.Enum Implements System.IComparable, System.IConvertible, System.IFormattable
Member | Description |
---|---|
EightBitGrayScale | 8-bit Grayscale. |
TwentyFourBitTrueColor | 24-bit True Color. |
//Export a map frame to JPG. //Create JPEG format with appropriate settings //BMP, EMF, EPS, GIF, PDF, PNG, SVG, TGA, and TFF formats are also available for export //at 2.x - JPEGFormat JPG = new JPEGFormat() //{ // HasWorldFile = true, // Resolution = 300, // OutputFileName = filePath, // JPEGColorMode = JPEGColorMode.TwentyFourBitTrueColor, // Height = 800, // Width = 1200 //}; JPEGFormat JPG = new JPEGFormat() { HasWorldFile = true, Resolution = 300, OutputFileName = filePath, ColorMode = JPEGColorMode.TwentyFourBitTrueColor, Height = 800, Width = 1200 }; //Reference the map frame MapFrame mf = layout.FindElement("MyMapFrame") as MapFrame; //Export on the worker thread await QueuedTask.Run(() => { //Check to see if the path is valid and export if (JPG.ValidateOutputFilePath()) { mf.Export(JPG); //Export the map frame to JPG } });
System.Object
System.ValueType
System.Enum
ArcGIS.Desktop.Mapping.JPEGColorMode
Target Platforms: Windows 11, Windows 10