1 # Write a TGA file with Zig
2
3 This program demonstrates writing TGA "targa" image files by writing a pretty
4 gradient.
5
6 <img src="raw/foo.tga.png" alt="Pretty gradient made by this program">
7
8 TGA is easy to write and has wonderfully software support, but there are a
9 couple "gotchas" in the header and image data, namely:
10
11 * An image "origin" is specified in two places in the header -
12 get it wrong and you'll be scratching your head at the mess on the screen.
13 * Pixels are in Blue Green Red order, not RGB.
14
15 https://en.wikipedia.org/wiki/Truevision_TGA