39 char * outfilename = NULL;
40 static int numrundata[4] = { 1, 1, 1, 1};
41 float top_inten = 1.0 , bot_inten = 0.1, delta = 0;
42 unsigned char a,
r,
g,
b;
50 "% s%-xsize!dysize!d l%- v%-top%fbottom%f o%-outfile!s \n\
51 red!d green!d blue!d alpha%d",
53 &top_inten, &bot_inten, &oflag, &outfilename,
54 &
red, &green, &blue, &alpha ) == 0 )
65 if ((top_inten < 0.0) || (top_inten > 1.0) || (bot_inten < 0.0) ||
68 fprintf(stderr,
"background: -v bounds must be 0.0 to 1.0");
72 if (no_alpha_given = (alpha == -1))
78 backrundata[
i].
xloc = 0;
90 delta = (top_inten - bot_inten) /
ysize;
93 rows[i] = &(backrundata[i]);
103 scale = (top_inten - bot_inten) / (
ysize *
ysize);
105 for (j = 0; j <
ysize; j++)
113 if (top_inten > bot_inten)
114 inten = scale * (float) (j * j) + bot_inten;
116 inten = top_inten - (scale * (float)
117 ((ysize - j) * (ysize - j)));
121 a = (
int) ((
float)alpha * inten);
123 r = (
int) ((
float)
red * inten);
124 g = (
int) ((
float)green * inten);
125 b = (
int) ((
float)blue * inten);
131 rle_putraw( &rows[1], &numrundata[1], &the_hdr );
#define RLE_SET_BIT(glob, bit)
int scanargs(int argc, char **argv, const char *format,...)
static unsigned char blue[256]
void rle_addhist(char *argv[], rle_hdr *in_hdr, rle_hdr *out_hdr)
void rle_puteof(rle_hdr *the_hdr)
void rle_names(rle_hdr *the_hdr, const char *pgmname, const char *fname, int img_num)
static unsigned char green[256]
FILE * rle_open_f(const char *prog_name, const char *f_name, const char *mode)
void rle_put_setup(rle_hdr *the_hdr)
char * cmd_name(char **argv)
static unsigned char red[256]
rle_hdr * rle_hdr_init(rle_hdr *the_hdr)