API Reference
RasterImageFormatExtensions
Provides metadata helpers for opaque raster image formats.
Inheritance
- Object
- RasterImageFormatExtensions
Methods
public static RasterImageFormat FromFileExtension(String pathOrExtension) #RasterImageFormatResolves 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.
public static String GetFileExtension(RasterImageFormat format) #StringGets 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.
public static String[] GetFileExtensions(RasterImageFormat format) #String[]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.
public static String GetMimeType(RasterImageFormat format) #StringGets the MIME type for the raster image format.
Parameters
- format ChartForgeX.Core.RasterImageFormat
- The raster image format.
Returns
The MIME content type.
public static RasterImageFormat[] GetSupportedFormats() #RasterImageFormat[]Gets the supported opaque raster image formats in a stable display order.
Returns
A new array containing the supported raster image formats.
public static Boolean IsSupported(RasterImageFormat format) #BooleanDetermines 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.
public static Boolean TryFromFileExtension(String? pathOrExtension, out RasterImageFormat format) #BooleanAttempts 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.
Inherited Methods
public virtual Boolean Equals(Object? obj) #BooleanParameters
- obj Object?