Interface IImageFormatDetector
Used for detecting mime types from a file header
Namespace: SixLabors.ImageSharp.Formats
Assembly: SixLabors.ImageSharp.dll
Syntax
public interface IImageFormatDetector
Properties
| Improve this Doc View SourceHeaderSize
Gets the size of the header for this image type.
Declaration
int HeaderSize { get; }
Property Value
| Type | Description |
|---|---|
| Int32 | The size of the header. |
Methods
| Improve this Doc View SourceDetectFormat(ReadOnlySpan<Byte>)
Detect mimetype
Declaration
IImageFormat DetectFormat(ReadOnlySpan<byte> header)
Parameters
| Type | Name | Description |
|---|---|---|
| ReadOnlySpan<Byte> | header | The byte[] containing the file header. |
Returns
| Type | Description |
|---|---|
| IImageFormat | returns the mime type of detected otherwise returns null |