Project

ChartForgeX

Render deterministic charts, dashboards, topology, hierarchy, and report visuals directly from .NET.

Stars 47
Forks 2
NuGet downloads 75,067
Release ChartForgeX-v2.0.0
Language: HTML Updated: 2026-10-12

API Reference

Class

RasterImageFormatExtensions

Namespace ChartForgeX.Core
Assembly ChartForgeX
Modifiers static

Provides metadata helpers for opaque raster image formats.

Inheritance

  • Object
  • RasterImageFormatExtensions

Methods

public static RasterImageFormat FromFileExtension(String pathOrExtension) #
Returns: RasterImageFormat

Resolves a raster image format from a file extension or file path.

Parameters

pathOrExtension System.String requiredposition: 0
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) #
Returns: String

Gets the conventional file extension for the raster image format.

Parameters

format ChartForgeX.Core.RasterImageFormat requiredposition: 0
The raster image format.

Returns

The lowercase file extension, including the leading dot.

public static String[] GetFileExtensions(RasterImageFormat format) #
Returns: String[]

Gets all recognized file extensions for the raster image format.

Parameters

format ChartForgeX.Core.RasterImageFormat requiredposition: 0
The raster image format.

Returns

Lowercase file extensions, including leading dots, with the conventional extension first.

public static String GetMimeType(RasterImageFormat format) #
Returns: String

Gets the MIME type for the raster image format.

Parameters

format ChartForgeX.Core.RasterImageFormat requiredposition: 0
The raster image format.

Returns

The MIME content type.

public static RasterImageFormat[] GetSupportedFormats() #
Returns: 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) #
Returns: Boolean

Determines whether the raster image format is currently supported.

Parameters

format ChartForgeX.Core.RasterImageFormat requiredposition: 0
The raster image format.

Returns

True when the format can be encoded; otherwise, false.

public static Boolean TryFromFileExtension(String? pathOrExtension, out RasterImageFormat format) #
Returns: Boolean

Attempts to resolve a raster image format from a file extension or file path.

Parameters

pathOrExtension System.String? requiredposition: 0
A file extension such as ".bmp" or "bmp", or a file path ending in a supported extension.
format ChartForgeX.Core.RasterImageFormat requiredposition: 1
The resolved raster image format when the method returns true.

Returns

True when the extension is supported; otherwise, false.