Class BmpDecoder
Image decoder for generating an image out of a Windows bitmap stream.
Inherited Members
Namespace: SixLabors.ImageSharp.Formats.Bmp
Assembly: SixLabors.ImageSharp.dll
Syntax
public sealed class BmpDecoder : IImageDecoder, IImageInfoDetectorRemarks
Does not support the following formats at the moment:
- JPG
- PNG
- Some OS/2 specific subtypes like: Bitmap Array, Color Icon, Color Pointer, Icon, Pointer.
Properties
| Improve this Doc View SourceRleSkippedPixelHandling
Gets or sets a value indicating how to deal with skipped pixels, which can occur during decoding run length encoded bitmaps.
Declaration
public RleSkippedPixelHandling RleSkippedPixelHandling { get; set; }Property Value
| Type | Description | 
|---|---|
| RleSkippedPixelHandling | 
Methods
| Improve this Doc View SourceDecode(Configuration, Stream, CancellationToken)
Decodes the image from the specified stream to an Image.
Declaration
public Image Decode(Configuration configuration, Stream stream, CancellationToken cancellationToken)Parameters
| Type | Name | Description | 
|---|---|---|
| Configuration | configuration | The configuration for the image. | 
| Stream | stream | The Stream containing image data. | 
| CancellationToken | cancellationToken | The token to monitor for cancellation requests. | 
Returns
| Type | Description | 
|---|---|
| Image | The Image. | 
Decode<TPixel>(Configuration, Stream, CancellationToken)
Decodes the image from the specified stream to an Image<TPixel> of a specific pixel type.
Declaration
public Image<TPixel> Decode<TPixel>(Configuration configuration, Stream stream, CancellationToken cancellationToken)
    where TPixel : struct, IPixel<TPixel>Parameters
| Type | Name | Description | 
|---|---|---|
| Configuration | configuration | The configuration for the image. | 
| Stream | stream | The Stream containing image data. | 
| CancellationToken | cancellationToken | The token to monitor for cancellation requests. | 
Returns
| Type | Description | 
|---|---|
| Image<TPixel> | The Image<TPixel>. | 
Type Parameters
| Name | Description | 
|---|---|
| TPixel | The pixel format. | 
Identify(Configuration, Stream, CancellationToken)
Reads the raw image information from the specified stream.
Declaration
public IImageInfo Identify(Configuration configuration, Stream stream, CancellationToken cancellationToken)Parameters
| Type | Name | Description | 
|---|---|---|
| Configuration | configuration | The configuration for the image. | 
| Stream | stream | The Stream containing image data. | 
| CancellationToken | cancellationToken | The token to monitor for cancellation requests. | 
Returns
| Type | Description | 
|---|---|
| IImageInfo | The PixelTypeInfo object |