-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathTGALoader.h
More file actions
31 lines (21 loc) · 715 Bytes
/
TGALoader.h
File metadata and controls
31 lines (21 loc) · 715 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#ifndef __TGALOADER_H
#define __TGALOADER_H
#pragma once
//*******************************************************************************
typedef enum
{
PIXELFORMAT_R8G8B8 = 0, // 3*8 bits RGB
PIXELFORMAT_R8G8B8A8, // 4*8 bits RGBA
PIXELFORMAT_MAXCOUNT
} PIXEL_FORMAT;
typedef struct IMAGE_DATAstr
{
PIXEL_FORMAT PixelFormat; // Image pixel format
unsigned char *pu8Pixels; // Image pixels
unsigned int u32Width, u32Height; // Image dimensions
void *pUserData; // User data - free to use
} IMAGE_DATA;
//*******************************************************************************
IMAGE_DATA *ReadTGA(const char *sFileName);
void ReleaseTGA(IMAGE_DATA *pContext);
#endif