Class BmpImageFormatDetector
Detects bmp file headers.
Implements
Inherited Members
Namespace: SixLabors.ImageSharp.Formats.Bmp
Assembly: SixLabors.ImageSharp.dll
Syntax
public sealed class BmpImageFormatDetector : IImageFormatDetector
Properties
| Edit this page View SourceHeaderSize
Gets the size of the header for this image type.
Declaration
public int HeaderSize { get; }
Property Value
Type | Description |
---|---|
int | The size of the header. |
Methods
| Edit this page View SourceTryDetectFormat(ReadOnlySpan<byte>, out IImageFormat?)
Detect mimetype
Declaration
public bool TryDetectFormat(ReadOnlySpan<byte> header, out IImageFormat? format)
Parameters
Type | Name | Description |
---|---|---|
ReadOnlySpan<byte> | header | The byte[] containing the file header. |
IImageFormat | format | The mime type of detected otherwise returns null |
Returns
Type | Description |
---|---|
bool | returns true when format was detected otherwise false. |