API Reference
RasterImageFormatExtensions
Provides metadata helpers for opaque raster image formats.
Inheritance
- Object
- RasterImageFormatExtensions
Methods
FromFileExtension(System.String pathOrExtension) #Resolves a raster image format from a file extension or file path.
Parameters
- pathOrExtension System.String
- A file extension such as ".bmp" or "bmp", or a file path ending in a supported extension.
Returns
The resolved raster image format.
GetFileExtension(ChartForgeX.Core.RasterImageFormat format) #Gets the conventional file extension for the raster image format.
Parameters
- format ChartForgeX.Core.RasterImageFormat
- The raster image format.
Returns
The lowercase file extension, including the leading dot.
GetFileExtensions(ChartForgeX.Core.RasterImageFormat format) #Gets all recognized file extensions for the raster image format.
Parameters
- format ChartForgeX.Core.RasterImageFormat
- The raster image format.
Returns
Lowercase file extensions, including leading dots, with the conventional extension first.
GetMimeType(ChartForgeX.Core.RasterImageFormat format) #Gets the MIME type for the raster image format.
Parameters
- format ChartForgeX.Core.RasterImageFormat
- The raster image format.
Returns
The MIME content type.
GetSupportedFormats() #Gets the supported opaque raster image formats in a stable display order.
Returns
A new array containing the supported raster image formats.
IsSupported(ChartForgeX.Core.RasterImageFormat format) #Determines whether the raster image format is currently supported.
Parameters
- format ChartForgeX.Core.RasterImageFormat
- The raster image format.
Returns
True when the format can be encoded; otherwise, false.
TryFromFileExtension(System.String pathOrExtension, ChartForgeX.Core.RasterImageFormat@ format) #Attempts to resolve a raster image format from a file extension or file path.
Parameters
- pathOrExtension System.String
- A file extension such as ".bmp" or "bmp", or a file path ending in a supported extension.
- format ChartForgeX.Core.RasterImageFormat@
- The resolved raster image format when the method returns true.
Returns
True when the extension is supported; otherwise, false.