diff options
author | Karl Berry <karl@freefriends.org> | 2021-02-25 19:22:25 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2021-02-25 19:22:25 +0000 |
commit | ad547a6b5986815fda458221149728d9d9ab1d87 (patch) | |
tree | 16296910eb3eca724371474ea9aea3994dc69614 /Build/source/libs/gd/libgd-src/src/gd_tga.h | |
parent | 947b43de3dd21d58ccc2ffadefc4441ea1c2a813 (diff) |
restore Build,TODO from r57911
git-svn-id: svn://tug.org/texlive/trunk@57915 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build/source/libs/gd/libgd-src/src/gd_tga.h')
-rw-r--r-- | Build/source/libs/gd/libgd-src/src/gd_tga.h | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/Build/source/libs/gd/libgd-src/src/gd_tga.h b/Build/source/libs/gd/libgd-src/src/gd_tga.h new file mode 100644 index 00000000000..297f3dc99d6 --- /dev/null +++ b/Build/source/libs/gd/libgd-src/src/gd_tga.h @@ -0,0 +1,52 @@ +#ifndef __TGA_H +#define __TGA_H 1 + +#include "gd.h" +#include "gdhelpers.h" + +#include "gd_intern.h" + +typedef struct oTga_ { + uint8_t identsize; // size of ID field that follows 18 uint8_t header (0 usually) + uint8_t colormaptype; // type of colour map 0=none, 1=has palette [IGNORED] Adrian requested no support + uint8_t imagetype; // type of image 0=none,1=indexed,2=rgb,3=grey,+8=rle packed + + int colormapstart; // first colour map entry in palette [IGNORED] Adrian requested no support + int colormaplength; // number of colours in palette [IGNORED] Adrian requested no support + uint8_t colormapbits; // number of bits per palette entry 15,16,24,32 [IGNORED] Adrian requested no support + + int xstart; // image x origin + int ystart; // image y origin + int width; // image width in pixels + int height; // image height in pixels + uint8_t bits; // image bits per pixel 8,16,24,32 + uint8_t alphabits; // alpha bits (low 4bits of header 17) + uint8_t fliph; // horizontal or vertical + uint8_t flipv; // flip + char *ident; // identifcation tag string + int *bitmap; // bitmap data + +} oTga; + +#define TGA_TYPE_NO_IMAGE 0 +#define TGA_TYPE_INDEXED 1 +#define TGA_TYPE_RGB 2 +#define TGA_TYPE_GREYSCALE 3 +#define TGA_TYPE_INDEXED_RLE 9 +#define TGA_TYPE_RGB_RLE 10 +#define TGA_TYPE_GREYSCALE_RLE 11 +#define TGA_TYPE_INDEXED_HUFFMAN_DELTA_RLE 32 +#define TGA_TYPE_RGB_HUFFMAN_DELTA_QUADTREE_RLE 33 + +#define TGA_BPP_8 8 +#define TGA_BPP_16 16 +#define TGA_BPP_24 24 +#define TGA_BPP_32 32 + +#define TGA_RLE_FLAG 128 + +int read_header_tga(gdIOCtx *ctx, oTga *tga); +int read_image_tga(gdIOCtx *ctx, oTga *tga); +void free_tga(oTga *tga); + +#endif //__TGA_H |