-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathBitmapInfoHeader.cs
42 lines (39 loc) · 951 Bytes
/
BitmapInfoHeader.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
namespace png2bmp32
{
/// <summary>
/// …
/// </summary>
[StructLayout(LayoutKind.Sequential, Pack = 1)]
internal struct BitmapInfoHeader
{
internal UInt32 biSize;
internal Int32 biWidth;
internal Int32 biHeight;
internal UInt16 biPlanes;
internal UInt16 biBitCount;
internal UInt32 biCompression;
internal UInt32 biSizeImage;
internal Int32 biXPelsPerMeter;
internal Int32 biYPelsPerMeter;
internal UInt32 biClrUsed;
internal UInt32 biClrImportant;
/// <summary>
/// …
/// </summary>
internal static uint Size
{
get { return (uint)Marshal.SizeOf(typeof(BitmapInfoHeader)); }
}
/// <summary>
/// …
/// </summary>
internal void Init()
{
biSize = Size;
}
}
}