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, IImageInfoDetector
Remarks
Does not support the following formats at the moment:
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)
Decodes the image from the specified stream to an Image.
Declaration
public Image Decode(Configuration configuration, Stream stream)
Parameters
Type | Name | Description |
---|---|---|
Configuration | configuration | The configuration for the image. |
Stream | stream | The Stream containing image data. |
Returns
Type | Description |
---|---|
Image | The Image. |
Decode<TPixel>(Configuration, Stream)
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)
where TPixel : struct, IPixel<TPixel>
Parameters
Type | Name | Description |
---|---|---|
Configuration | configuration | The configuration for the image. |
Stream | stream | The Stream containing image data. |
Returns
Type | Description |
---|---|
Image<TPixel> | The Image<TPixel>. |
Type Parameters
Name | Description |
---|---|
TPixel | The pixel format. |
DecodeAsync(Configuration, Stream, CancellationToken)
Decodes the image from the specified stream to an Image.
Declaration
public async Task<Image> DecodeAsync(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 |
---|---|
Task<Image> | The Image. |
DecodeAsync<TPixel>(Configuration, Stream, CancellationToken)
Decodes the image from the specified stream to an Image<TPixel> of a specific pixel type.
Declaration
public Task<Image<TPixel>> DecodeAsync<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 |
---|---|
Task<Image<TPixel>> | The Image<TPixel>. |
Type Parameters
Name | Description |
---|---|
TPixel | The pixel format. |
Identify(Configuration, Stream)
Reads the raw image information from the specified stream.
Declaration
public IImageInfo Identify(Configuration configuration, Stream stream)
Parameters
Type | Name | Description |
---|---|---|
Configuration | configuration | The configuration for the image. |
Stream | stream | The Stream containing image data. |
Returns
Type | Description |
---|---|
IImageInfo | The PixelTypeInfo object |
IdentifyAsync(Configuration, Stream, CancellationToken)
Reads the raw image information from the specified stream.
Declaration
public Task<IImageInfo> IdentifyAsync(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 |
---|---|
Task<IImageInfo> | The PixelTypeInfo object |