home *** CD-ROM | disk | FTP | other *** search
- /************************************************************************
- * *
- * process.h *
- * ========= *
- * *
- * RISCOS sprite style bitmap processing library *
- * Uses spr_info generic bitmap interface from sprite.c library *
- * *
- * Version 1.25 (03-May-1994) *
- * *
- * (C) 1993/1994 DEEJ Technology PLC *
- * *
- ************************************************************************/
-
- #ifndef __process_h
- #define __process_h
-
- #include "sprite.h"
- #include "colours.h"
-
- /********************************* Structures ********************************/
-
- typedef struct
- {
- int matrix[3][3]; /* 3 x 3 matrix of inensity mults */
- int mul; /* overall multiplier */
- int div; /* overall divisor */
- int add; /* overall addition (-255 to 255) */
- int diff; /* difference filter (0 to 255) */
- } filter_str;
-
- typedef struct /* selects processing options */
- {
- spr_info_str *in; /* source sprite */
- spr_info_str *out; /* destination sprite */
- FILE *outf; /* handle of file for write line */
- /* zero to make whole output sprite */
-
- /* pre-processing options */
- BOOL nodither; /* do not dither */
- BOOL nointerp; /* do not interpolate */
- BOOL invert; /* invert source */
- BOOL expand; /* expand source */
- BOOL gamma; /* use gamma correction */
- BOOL palette_opt; /* optimise palette after preprocess*/
- BOOL filter; /* filter image */
-
- struct /* preprocessing data */
- {
- float gamma; /* gamma correction value */
- filter_str filter; /* filter data */
- } data;
- } process_str;
-
-
- /**************************** Function prototypes ****************************/
-
- uint intensity(uint);
- void excess_rgb(pix_str*);
- void invert(spr_info_str*);
- void expand(spr_info_str*);
- void gamma_cr(spr_info_str*, float);
- void table_lookup(spr_info_str*, uchar*);
- void process(process_str*);
- pix_str pix_sum(spr_info_str*, int, int, int, int);
- void err_diff(pix_str*, pix_str*, int);
-
- #endif
-