3 ms·
Agree about TGA, it is trivially easy to write. Example in C# for grayscale version, a single page of code: https://github.com/Const-me/Vrmac/blob/1.2/VrmacInte
by Const-me 5y ago
Agree about TGA, it is trivially easy to write. Example in C# for grayscale version, a single page of code: https://github.com/Const-me/Vrmac/blob/1.2/VrmacInterop/Utils/TrueVision.cs#L40-L82 https://github.com/Const-me/Vrmac/blob/1.2/VrmacInterop/Util...
BMP is more complicated, unfortunately. The header structure is more complex. And then there’s a requirement for rows to be 4-bytes aligned, might need to insert padding bytes between the rows.
- mark-r 5y agoThe code for BMP isn't very complicated, the hard part is knowing all the rules and corner cases. Like the 4-byte alignment you mentioned, or the fact that the rows are in reverse order of what you'd expect (bottom up).
- coldacid 5y agoI think the row order in BMP is OS/2 related. Windows, X, etc. all put 0,0 in the top-left corner, but OS/2 puts it in the bottom-left instead.