Lines Matching refs:tgaHeader
49 deUint8 tgaHeader[18]; in deImage_loadTarga() local
51 bytesRead = (int)fread(&tgaHeader, 1, 18, file); in deImage_loadTarga()
53 DE_TEST_ASSERT(tgaHeader[2] == 2); /* truecolor, no encoding */ in deImage_loadTarga()
54 …DE_TEST_ASSERT(tgaHeader[17] == 0x00 || tgaHeader[17] == 0x20); /* both y-directions supported, no… in deImage_loadTarga()
56 yFlipped = (tgaHeader[17] & 0x20) == 0; in deImage_loadTarga()
59 width = (int)(tgaHeader[12]) | ((int)(tgaHeader[13]) << 8); in deImage_loadTarga()
60 height = (int)(tgaHeader[14]) | ((int)(tgaHeader[15]) << 8); in deImage_loadTarga()
61 bitsPerPixel = tgaHeader[16]; in deImage_loadTarga()
124 char tgaHeader[18]; in deImage_saveTarga() local
142 memset(tgaHeader, 0, sizeof(tgaHeader)); in deImage_saveTarga()
144 tgaHeader[1] = 0; /* no palette */ in deImage_saveTarga()
145 tgaHeader[2] = 2; /* uncompressed RGB */ in deImage_saveTarga()
147 tgaHeader[12] = (char)(width & 0xFF); in deImage_saveTarga()
148 tgaHeader[13] = (char)(width >> 8); in deImage_saveTarga()
149 tgaHeader[14] = (char)(height & 0xFF); in deImage_saveTarga()
150 tgaHeader[15] = (char)(height >> 8); in deImage_saveTarga()
151 tgaHeader[16] = 24; /* bytes per pixel */ in deImage_saveTarga()
152 tgaHeader[17] = 0x20; /* Top-down, non-interlaced */ in deImage_saveTarga()
154 fwrite(tgaHeader, 1, 18, file); in deImage_saveTarga()