#include "tgafiles.h" #include int main () { char *fn = "sierp.tga"; FILE *file = NULL; int x, y, width = 128, height = 64; if ((file = newTGA(fn, width, height, TGA_ORIGIN_TOP)) == NULL) return -1; for (y = 0; y < height; ++y) for (x = 0; x < width; ++ x) { BYTE c; c = x & y ? 255 : 0; writeTGA(file, c, c, c); } closeTGA(file); return 0; }