The OpenD Programming Language

readBmpIndirect

Reads using a delegate to read instead of assuming a direct file. View the source of readBmp's overloads for fairly simple examples of how you can use it

readBmpIndirect
(
scope void delegate
(
void*
,
size_t
)
fread
,
bool lookForFileHeader = true
,
bool hackAround64BitLongs = false
,
bool hasAndMask = false
)

Meta

History

The lookForFileHeader param was added in July 2020.

The hackAround64BitLongs param was added December 21, 2020. You should probably never use this unless you know for sure you have a file corrupted in this specific way. View the source to see a comment inside the file to describe it a bit more.

The hasAndMask param was added July 21, 2022. This is set to true if it is a bitmap from a .ico file or similar, where the top half of the file (by height) is the xor mask, then the bottom half is the and mask.