|
|
|
@ -37,21 +37,6 @@ namespace SixLabors.ImageSharp.Formats.Png |
|
|
|
/// </summary>
|
|
|
|
public static readonly IEnumerable<string> FileExtensions = new[] { "png" }; |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the header bytes identifying a Png.
|
|
|
|
/// </summary>
|
|
|
|
public static ReadOnlySpan<byte> HeaderBytes => new byte[] |
|
|
|
{ |
|
|
|
0x89, // Set the high bit.
|
|
|
|
0x50, // P
|
|
|
|
0x4E, // N
|
|
|
|
0x47, // G
|
|
|
|
0x0D, // Line ending CRLF
|
|
|
|
0x0A, // Line ending CRLF
|
|
|
|
0x1A, // EOF
|
|
|
|
0x0A // LF
|
|
|
|
}; |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// The header bytes as a big-endian coded ulong.
|
|
|
|
/// </summary>
|
|
|
|
@ -78,5 +63,20 @@ namespace SixLabors.ImageSharp.Formats.Png |
|
|
|
/// The minimum length of a keyword in a text chunk is 1 byte.
|
|
|
|
/// </summary>
|
|
|
|
public const int MinTextKeywordLength = 1; |
|
|
|
|
|
|
|
/// <summary>
|
|
|
|
/// Gets the header bytes identifying a Png.
|
|
|
|
/// </summary>
|
|
|
|
public static ReadOnlySpan<byte> HeaderBytes => new byte[] |
|
|
|
{ |
|
|
|
0x89, // Set the high bit.
|
|
|
|
0x50, // P
|
|
|
|
0x4E, // N
|
|
|
|
0x47, // G
|
|
|
|
0x0D, // Line ending CRLF
|
|
|
|
0x0A, // Line ending CRLF
|
|
|
|
0x1A, // EOF
|
|
|
|
0x0A // LF
|
|
|
|
}; |
|
|
|
} |
|
|
|
} |
|
|
|
|