5 // applies gamma correction to RGB pixels, in can be the same as out
6 void Image_GammaRemapRGB(const qbyte *in, qbyte *out, int pixels, const qbyte *gammar, const qbyte *gammag, const qbyte *gammab);
8 // converts 8bit image data to RGBA, in can not be the same as out
9 void Image_Copy8bitRGBA(const qbyte *in, qbyte *out, int pixels, const unsigned int *pal);
11 // makes a RGBA mask from RGBA input, in can be the same as out
12 int image_makemask (const qbyte *in, qbyte *out, int size);
14 // loads a texture, as pixel data
15 qbyte *loadimagepixels (const char *filename, qboolean complain, int matchwidth, int matchheight);
17 // loads a texture, as a texture
18 rtexture_t *loadtextureimage (rtexturepool_t *pool, const char *filename, int matchwidth, int matchheight, qboolean complain, int flags);
20 // loads a texture's alpha mask, as pixel data
21 qbyte *loadimagepixelsmask (const char *filename, qboolean complain, int matchwidth, int matchheight);
23 // loads a texture's alpha mask, as a texture
24 rtexture_t *loadtextureimagemask (rtexturepool_t *pool, const char *filename, int matchwidth, int matchheight, qboolean complain, int flags);
26 // loads a texture and it's alpha mask at once (NULL if it has no translucent pixels)
27 rtexture_t *image_masktex;
28 rtexture_t *image_nmaptex;
29 rtexture_t *loadtextureimagewithmask (rtexturepool_t *pool, const char *filename, int matchwidth, int matchheight, qboolean complain, int flags);
30 rtexture_t *loadtextureimagewithmaskandnmap (rtexturepool_t *pool, const char *filename, int matchwidth, int matchheight, qboolean complain, int flags, float bumpscale);
31 rtexture_t *loadtextureimagebumpasnmap (rtexturepool_t *pool, const char *filename, int matchwidth, int matchheight, qboolean complain, int flags, float bumpscale);
33 // writes a RGB TGA that is already upside down (which TGA wants)
34 qboolean Image_WriteTGARGB_preflipped (const char *filename, int width, int height, const qbyte *data);
37 void Image_WriteTGARGB (const char *filename, int width, int height, const qbyte *data);
40 void Image_WriteTGARGBA (const char *filename, int width, int height, const qbyte *data);
42 // returns true if the image has some translucent pixels
43 qboolean Image_CheckAlpha(const qbyte *data, int size, qboolean rgba);
45 // resizes the image (in can not be the same as out)
46 void Image_Resample (const void *indata, int inwidth, int inheight, int indepth, void *outdata, int outwidth, int outheight, int outdepth, int bytesperpixel, int quality);
48 // scales the image down by a power of 2 (in can be the same as out)
49 void Image_MipReduce(const qbyte *in, qbyte *out, int *width, int *height, int *depth, int destwidth, int destheight, int destdepth, int bytesperpixel);
51 // only used by menuplyr coloring
52 qbyte *LoadLMPAs8Bit (const qbyte *f, int matchwidth, int matchheight);
54 void Image_HeightmapToNormalmap(const unsigned char *inpixels, unsigned char *outpixels, int width, int height, int clamp, float bumpscale);
56 typedef struct imageskin_s
58 qbyte *basepixels;int basepixels_width;int basepixels_height;
59 qbyte *nmappixels;int nmappixels_width;int nmappixels_height;
60 qbyte *glowpixels;int glowpixels_width;int glowpixels_height;
61 qbyte *glosspixels;int glosspixels_width;int glosspixels_height;
62 qbyte *pantspixels;int pantspixels_width;int pantspixels_height;
63 qbyte *shirtpixels;int shirtpixels_width;int shirtpixels_height;
64 qbyte *maskpixels;int maskpixels_width;int maskpixels_height;
68 int image_loadskin(imageskin_t *s, char *name);
69 void image_freeskin(imageskin_t *s);