Keep proper byte layout in memory
BitmapFileHeader
01 Syntax
Microsoft.VisualBasic.Imaging.BitmapImage.FileStream.BitmapFileHeader
02 Methods
| Name | Overloads | Summary |
|---|---|---|
| .ctor | 2 | Create header and calculate file size depending on input data |
| GetHeaderFromBytes | 1 | Generate BitmapFileHeader from first 14 bytes |
03 Properties
| Name | Overloads | Summary |
|---|---|---|
| HeaderBytes | 1 | Get header bytes |
| FileSize | 1 |
04 Fields
| Name | Overloads | Summary |
|---|---|---|
| BitmapFileHeaderSizeInBytes | 2 | FileHeader headerSize in bytes (fist 14 bytes from start) |
| PixelDataOffset | 2 | The offset, i.e. starting address, of the byte where the bitmap image data (pixel array) can be found from the beggining of the file |
| ByteZero | 1 | |
| ByteOne | 1 |
05 Members
#ctor(
UInt32)Explicitly set file in size
Parameters
| Name | Type | Description |
|---|---|---|
fileSize | UInt32 | - |
#ctor(
Int32, Int32, BitsPerPixelEnum, Int32)Create header and calculate file size depending on input data
Parameters
| Name | Type | Description |
|---|---|---|
width | Int32 | - |
height | Int32 | - |
bitsPerPixel | BitsPerPixelEnum | - |
rawImageSize | Int32 | Depends on row padding and number of rows |
GetHeaderFromBytes(Byte())
Generate BitmapFileHeader from first 14 bytes
Parameters
| Name | Type | Description |
|---|---|---|
headerBytes | Byte() | - |
Returns
BitmapFileHeader or throws exception
HeaderBytes
Get header bytes
BitmapFileHeaderSizeInBytes
FileHeader headerSize in bytes (fist 14 bytes from start)
PixelDataOffset
The offset, i.e. starting address, of the byte where the bitmap image data (pixel array) can be found from the beggining of the file
PixelDataOffset
BitmapFileHeaderSizeInBytes
ByteZero
ByteOne
FileSize