mirror of
https://github.com/UglyToad/PdfPig.git
synced 2025-04-05 20:55:01 +08:00
Format ImageHeader
This commit is contained in:
parent
a68febfa95
commit
215e12543c
@ -8,17 +8,15 @@
|
||||
/// </summary>
|
||||
internal readonly struct ImageHeader
|
||||
{
|
||||
internal static ReadOnlySpan<byte> HeaderBytes => [
|
||||
73, 72, 68, 82
|
||||
];
|
||||
internal static ReadOnlySpan<byte> HeaderBytes => [73, 72, 68, 82];
|
||||
|
||||
private static readonly IReadOnlyDictionary<ColorType, HashSet<byte>> PermittedBitDepths = new Dictionary<ColorType, HashSet<byte>>
|
||||
{
|
||||
{ColorType.None, new HashSet<byte> {1, 2, 4, 8, 16}},
|
||||
{ColorType.ColorUsed, new HashSet<byte> {8, 16}},
|
||||
{ColorType.PaletteUsed | ColorType.ColorUsed, new HashSet<byte> {1, 2, 4, 8}},
|
||||
{ColorType.AlphaChannelUsed, new HashSet<byte> {8, 16}},
|
||||
{ColorType.AlphaChannelUsed | ColorType.ColorUsed, new HashSet<byte> {8, 16}},
|
||||
{ColorType.None, [1, 2, 4, 8, 16]},
|
||||
{ColorType.ColorUsed, [8, 16]},
|
||||
{ColorType.PaletteUsed | ColorType.ColorUsed, [1, 2, 4, 8]},
|
||||
{ColorType.AlphaChannelUsed, [8, 16]},
|
||||
{ColorType.AlphaChannelUsed | ColorType.ColorUsed, [8, 16]},
|
||||
};
|
||||
|
||||
/// <summary>
|
||||
|
Loading…
Reference in New Issue
Block a user