# RasterImageFormat

Defines dependency-free raster export formats.

 Enum  

`ChartForgeX.Core`

**Namespace**

`ChartForgeX.Core`

**Assembly**

`ChartForgeX`

**Source**

[RasterImageFormat.cs:6](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/RasterImageFormat.cs#L6)

**Base**

`Enum`

**Implements**

 `IComparable` `ISpanFormattable` `IFormattable` `IConvertible` 

**Modifiers**

sealed

Defines dependency-free raster export formats.

## Inheritance

- Enum
- RasterImageFormat

## Usage

 Explore 49 API references to this type 

This type appears in these public API surfaces even when no hand-authored example is attached directly to the page.

### Returned or exposed by 7

- Field [RasterImageFormat.Bmp](/api/chartforgex-core-rasterimageformat/#field-bmp)
- Field [RasterImageFormat.Jpeg](/api/chartforgex-core-rasterimageformat/#field-jpeg)
- Field [RasterImageFormat.Png](/api/chartforgex-core-rasterimageformat/#field-png)
- Field [RasterImageFormat.Ppm](/api/chartforgex-core-rasterimageformat/#field-ppm)
- Field [RasterImageFormat.Tiff](/api/chartforgex-core-rasterimageformat/#field-tiff)
- Method [RasterImageFormatExtensions.FromFileExtension](/api/chartforgex-core-rasterimageformatextensions/#method-fromfileextension-string)
- Method [RasterImageFormatExtensions.GetSupportedFormats](/api/chartforgex-core-rasterimageformatextensions/#method-getsupportedformats)

### Accepted by parameters 42

- Method [ChartExtensions.SaveRasterImage](/api/chartforgex-chartextensions/#method-saverasterimage-chartforgex-core-chart-string-chartforgex-core-rasterimageformat-chartforgex-core-rasterimageoptions) parameter `format`
- Method [ChartExtensions.ToRasterImage](/api/chartforgex-chartextensions/#method-torasterimage-chartforgex-core-chart-chartforgex-core-rasterimageformat-chartforgex-core-rasterimageoptions) parameter `format`
- Method [ChartExtensions.WriteRasterImage](/api/chartforgex-chartextensions/#method-writerasterimage-chartforgex-core-chart-io-stream-chartforgex-core-rasterimageformat-chartforgex-core-rasterimageoptions) parameter `format`
- Method [ImageComposition.Save](/api/chartforgex-composition-imagecomposition/#method-save-string-chartforgex-core-rasterimageformat-chartforgex-core-rasterimageoptions) parameter `format`
- Method [ImageComposition.ToRasterImage](/api/chartforgex-composition-imagecomposition/#method-torasterimage-chartforgex-core-rasterimageformat-chartforgex-core-rasterimageoptions) parameter `format`
- Method [ImageComposition.Write](/api/chartforgex-composition-imagecomposition/#method-write-io-stream-chartforgex-core-rasterimageformat-chartforgex-core-rasterimageoptions) parameter `format`
- Extension method [VisualCanvas.SaveRasterImage](/api/chartforgex-composition-visualcanvas/#extension-saverasterimage-chartforgex-composition-visualcanvas-string-chartforgex-core-rasterimageformat-chartforgex-core-rasterimageoptions) parameter `format`
- Extension method [VisualCanvas.ToRasterImage](/api/chartforgex-composition-visualcanvas/#extension-torasterimage-chartforgex-composition-visualcanvas-chartforgex-core-rasterimageformat-chartforgex-core-rasterimageoptions) parameter `format`
- Extension method [VisualCanvas.WriteRasterImage](/api/chartforgex-composition-visualcanvas/#extension-writerasterimage-chartforgex-composition-visualcanvas-io-stream-chartforgex-core-rasterimageformat-chartforgex-core-rasterimageoptions) parameter `format`
- Extension method [Chart.SaveRasterImage](/api/chartforgex-core-chart/#extension-saverasterimage-chartforgex-core-chart-string-chartforgex-core-rasterimageformat-chartforgex-core-rasterimageoptions) parameter `format`
- Extension method [Chart.ToRasterImage](/api/chartforgex-core-chart/#extension-torasterimage-chartforgex-core-chart-chartforgex-core-rasterimageformat-chartforgex-core-rasterimageoptions) parameter `format`
- Extension method [Chart.WriteRasterImage](/api/chartforgex-core-chart/#extension-writerasterimage-chartforgex-core-chart-io-stream-chartforgex-core-rasterimageformat-chartforgex-core-rasterimageoptions) parameter `format`
- Extension method [ChartGrid.SaveRasterImage](/api/chartforgex-core-chartgrid/#extension-saverasterimage-chartforgex-core-chartgrid-string-chartforgex-core-rasterimageformat-chartforgex-core-rasterimageoptions) parameter `format`
- Extension method [ChartGrid.ToRasterImage](/api/chartforgex-core-chartgrid/#extension-torasterimage-chartforgex-core-chartgrid-chartforgex-core-rasterimageformat-chartforgex-core-rasterimageoptions) parameter `format`
- Extension method [ChartGrid.WriteRasterImage](/api/chartforgex-core-chartgrid/#extension-writerasterimage-chartforgex-core-chartgrid-io-stream-chartforgex-core-rasterimageformat-chartforgex-core-rasterimageoptions) parameter `format`
- Extension method [RasterImageFormat.GetFileExtension](/api/chartforgex-core-rasterimageformat/#extension-getfileextension-chartforgex-core-rasterimageformat) parameter `format`
- Extension method [RasterImageFormat.GetFileExtensions](/api/chartforgex-core-rasterimageformat/#extension-getfileextensions-chartforgex-core-rasterimageformat) parameter `format`
- Extension method [RasterImageFormat.GetMimeType](/api/chartforgex-core-rasterimageformat/#extension-getmimetype-chartforgex-core-rasterimageformat) parameter `format`
- Extension method [RasterImageFormat.IsSupported](/api/chartforgex-core-rasterimageformat/#extension-issupported-chartforgex-core-rasterimageformat) parameter `format`
- Method [RasterImageFormatExtensions.GetFileExtension](/api/chartforgex-core-rasterimageformatextensions/#method-getfileextension-chartforgex-core-rasterimageformat) parameter `format`
- Method [RasterImageFormatExtensions.GetFileExtensions](/api/chartforgex-core-rasterimageformatextensions/#method-getfileextensions-chartforgex-core-rasterimageformat) parameter `format`
- Method [RasterImageFormatExtensions.GetMimeType](/api/chartforgex-core-rasterimageformatextensions/#method-getmimetype-chartforgex-core-rasterimageformat) parameter `format`
- Method [RasterImageFormatExtensions.IsSupported](/api/chartforgex-core-rasterimageformatextensions/#method-issupported-chartforgex-core-rasterimageformat) parameter `format`
- Method [RasterImageFormatExtensions.TryFromFileExtension](/api/chartforgex-core-rasterimageformatextensions/#method-tryfromfileextension-string-chartforgex-core-rasterimageformat) parameter `format`
- Extension method [RgbaImage.SaveRasterImage](/api/chartforgex-raster-rgbaimage/#extension-saverasterimage-chartforgex-raster-rgbaimage-string-chartforgex-core-rasterimageformat-chartforgex-core-rasterimageoptions) parameter `format`
- Extension method [RgbaImage.ToRasterImage](/api/chartforgex-raster-rgbaimage/#extension-torasterimage-chartforgex-raster-rgbaimage-chartforgex-core-rasterimageformat-chartforgex-core-rasterimageoptions) parameter `format`
- Extension method [RgbaImage.WriteRasterImage](/api/chartforgex-raster-rgbaimage/#extension-writerasterimage-chartforgex-raster-rgbaimage-io-stream-chartforgex-core-rasterimageformat-chartforgex-core-rasterimageoptions) parameter `format`
- Extension method [TopologyChart.SaveRasterImage](/api/chartforgex-topology-topologychart/#extension-saverasterimage-chartforgex-topology-topologychart-string-chartforgex-core-rasterimageformat-chartforgex-topology-topologyrenderoptions-chartforgex-core-rasterimageoptions) parameter `format`
- Extension method [TopologyChart.ToRasterImage](/api/chartforgex-topology-topologychart/#extension-torasterimage-chartforgex-topology-topologychart-chartforgex-core-rasterimageformat-chartforgex-topology-topologyrenderoptions-chartforgex-core-rasterimageoptions) parameter `format`
- Extension method [TopologyChart.WriteRasterImage](/api/chartforgex-topology-topologychart/#extension-writerasterimage-chartforgex-topology-topologychart-io-stream-chartforgex-core-rasterimageformat-chartforgex-topology-topologyrenderoptions-chartforgex-core-rasterimageoptions) parameter `format`
- Method [TopologyChartExtensions.SaveRasterImage](/api/chartforgex-topology-topologychartextensions/#method-saverasterimage-chartforgex-topology-topologychart-string-chartforgex-core-rasterimageformat-chartforgex-topology-topologyrenderoptions-chartforgex-core-rasterimageoptions) parameter `format`
- Method [TopologyChartExtensions.ToRasterImage](/api/chartforgex-topology-topologychartextensions/#method-torasterimage-chartforgex-topology-topologychart-chartforgex-core-rasterimageformat-chartforgex-topology-topologyrenderoptions-chartforgex-core-rasterimageoptions) parameter `format`
- Method [TopologyChartExtensions.WriteRasterImage](/api/chartforgex-topology-topologychartextensions/#method-writerasterimage-chartforgex-topology-topologychart-io-stream-chartforgex-core-rasterimageformat-chartforgex-topology-topologyrenderoptions-chartforgex-core-rasterimageoptions) parameter `format`
- Extension method [IVisualBlock.SaveRasterImage](/api/chartforgex-visualblocks-ivisualblock/#extension-saverasterimage-chartforgex-visualblocks-ivisualblock-string-chartforgex-core-rasterimageformat-chartforgex-core-rasterimageoptions) parameter `format`
- Extension method [IVisualBlock.ToRasterImage](/api/chartforgex-visualblocks-ivisualblock/#extension-torasterimage-chartforgex-visualblocks-ivisualblock-chartforgex-core-rasterimageformat-chartforgex-core-rasterimageoptions) parameter `format`
- Extension method [IVisualBlock.WriteRasterImage](/api/chartforgex-visualblocks-ivisualblock/#extension-writerasterimage-chartforgex-visualblocks-ivisualblock-io-stream-chartforgex-core-rasterimageformat-chartforgex-core-rasterimageoptions) parameter `format`
- Extension method [VisualGrid.SaveRasterImage](/api/chartforgex-visualblocks-visualgrid/#extension-saverasterimage-chartforgex-visualblocks-visualgrid-string-chartforgex-core-rasterimageformat-chartforgex-core-rasterimageoptions) parameter `format`
- Extension method [VisualGrid.ToRasterImage](/api/chartforgex-visualblocks-visualgrid/#extension-torasterimage-chartforgex-visualblocks-visualgrid-chartforgex-core-rasterimageformat-chartforgex-core-rasterimageoptions) parameter `format`
- Extension method [VisualGrid.WriteRasterImage](/api/chartforgex-visualblocks-visualgrid/#extension-writerasterimage-chartforgex-visualblocks-visualgrid-io-stream-chartforgex-core-rasterimageformat-chartforgex-core-rasterimageoptions) parameter `format`
- Method [VisualsExtensions.SaveRasterImage](/api/chartforgex-visualsextensions/#method-saverasterimage-chartforgex-visualblocks-visualgrid-string-chartforgex-core-rasterimageformat-chartforgex-core-rasterimageoptions) parameter `format`
- Method [VisualsExtensions.ToRasterImage](/api/chartforgex-visualsextensions/#method-torasterimage-chartforgex-visualblocks-visualgrid-chartforgex-core-rasterimageformat-chartforgex-core-rasterimageoptions) parameter `format`
- Method [VisualsExtensions.WriteRasterImage](/api/chartforgex-visualsextensions/#method-writerasterimage-chartforgex-visualblocks-visualgrid-io-stream-chartforgex-core-rasterimageformat-chartforgex-core-rasterimageoptions) parameter `format`

 Filter members   

    Show inherited   

 

## Inherited Methods

 `public int CompareTo(object? target)` [#](#method-compareto-object) 

Inherited from Enum

Parameters

**target object? required**

Returns

 `int` 

 `public override bool Equals(object? obj)` [#](#method-equals-object) 

Inherited from Enum

Parameters

**obj object? required**

Returns

 `bool` 

 `public override int GetHashCode()` [#](#method-gethashcode) 

Inherited from Enum

Returns

 `int` 

 `public Type GetType()` [#](#method-gettype) 

Inherited from object

Returns

 `Type` 

 `public TypeCode GetTypeCode()` [#](#method-gettypecode) 

Inherited from Enum

Returns

 `TypeCode` 

 `public bool HasFlag(Enum flag)` [#](#method-hasflag-enum) 

Inherited from Enum

Parameters

**flag Enum required**

Returns

 `bool` 

 ToString 4 overloads 

 `public override string ToString()` [#](#method-tostring) 

Inherited from Enum

Returns

 `string` 

 `public string ToString(string? format)` [#](#method-tostring-string) 

Inherited from Enum

Parameters

**format string? required**

Returns

 `string` 

 `public string ToString(IFormatProvider? provider)` [#](#method-tostring-iformatprovider) 

Inherited from Enum

 `Obsolete("The provider argument is not used. Use ToString() instead.")` 

Parameters

**provider IFormatProvider? required**

Returns

 `string` 

 `public string ToString(string? format, IFormatProvider? provider)` [#](#method-tostring-string-iformatprovider) 

Inherited from Enum

 `Obsolete("The provider argument is not used. Use ToString(String) instead.")` 

Parameters

**format string? required**

**provider IFormatProvider? required**

Returns

 `string` 

## Values

 `public const RasterImageFormat Bmp` [#](#field-bmp) 

[RasterImageFormat.cs:10](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/RasterImageFormat.cs#L10)

Uncompressed 24-bit BMP.

Value: `0`

 `public const RasterImageFormat Ppm` [#](#field-ppm) 

[RasterImageFormat.cs:15](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/RasterImageFormat.cs#L15)

Binary P6 portable pixmap.

Value: `1`

 `public const RasterImageFormat Tiff` [#](#field-tiff) 

[RasterImageFormat.cs:20](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/RasterImageFormat.cs#L20)

Baseline uncompressed RGB TIFF.

Value: `2`

 `public const RasterImageFormat Png` [#](#field-png) 

[RasterImageFormat.cs:25](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/RasterImageFormat.cs#L25)

Portable Network Graphics with RGBA alpha.

Value: `3`

 `public const RasterImageFormat Jpeg` [#](#field-jpeg) 

[RasterImageFormat.cs:30](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/RasterImageFormat.cs#L30)

Baseline JPEG flattened against the configured raster background.

Value: `4`

## Extension Methods

 `public static string GetFileExtension(RasterImageFormat format)` [#](#extension-getfileextension-chartforgex-core-rasterimageformat) 

[RasterImageFormatExtensions.cs:102](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/RasterImageFormatExtensions.cs#L102)

Gets the conventional file extension for the raster image format.

Parameters

**format ChartForgeX.Core.RasterImageFormat required**

The raster image format.

Returns

 `string` The lowercase file extension, including the leading dot. 

 `public static string[] GetFileExtensions(RasterImageFormat format)` [#](#extension-getfileextensions-chartforgex-core-rasterimageformat) 

[RasterImageFormatExtensions.cs:124](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/RasterImageFormatExtensions.cs#L124)

Gets all recognized file extensions for the raster image format.

Parameters

**format ChartForgeX.Core.RasterImageFormat required**

The raster image format.

Returns

 `string[]` Lowercase file extensions, including leading dots, with the conventional extension first. 

 `public static string GetMimeType(RasterImageFormat format)` [#](#extension-getmimetype-chartforgex-core-rasterimageformat) 

[RasterImageFormatExtensions.cs:146](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/RasterImageFormatExtensions.cs#L146)

Gets the MIME type for the raster image format.

Parameters

**format ChartForgeX.Core.RasterImageFormat required**

The raster image format.

Returns

 `string` The MIME content type. 

 `public static bool IsSupported(RasterImageFormat format)` [#](#extension-issupported-chartforgex-core-rasterimageformat) 

[RasterImageFormatExtensions.cs:36](https://github.com/EvotecIT/ChartForgeX/blob/main/ChartForgeX/Core/RasterImageFormatExtensions.cs#L36)

Determines whether the raster image format is currently supported.

Parameters

**format ChartForgeX.Core.RasterImageFormat required**

The raster image format.

Returns

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

<!-- PowerForge markdown artifact sha256:0DF979405632A47719EF129D4F96295C30664A00FD563ACA19FCAACC28E7C498 -->
