7 |
|
* 9/19/88 |
8 |
|
*/ |
9 |
|
|
10 |
+ |
#include <string.h> |
11 |
+ |
|
12 |
|
#include "standard.h" |
13 |
|
#include "ciq.h" |
14 |
|
|
15 |
+ |
static void draw_grey(colormap ocm); |
16 |
|
|
17 |
< |
biq(dith,nw,synth,cm) |
18 |
< |
int dith; /* is dithering desired? 0=no, 1=yes */ |
19 |
< |
int nw; /* number of colors wanted in output image */ |
20 |
< |
int synth; /* synthesize colormap? 0=no, 1=yes */ |
21 |
< |
colormap cm; /* quantization colormap */ |
22 |
< |
/* read if synth=0; always written */ |
17 |
> |
|
18 |
> |
|
19 |
> |
void |
20 |
> |
biq( |
21 |
> |
int dith, /* is dithering desired? 0=no, 1=yes */ |
22 |
> |
int nw, /* number of colors wanted in output image */ |
23 |
> |
int synth, /* synthesize colormap? 0=no, 1=yes */ |
24 |
> |
colormap cm /* quantization colormap */ |
25 |
> |
) /* read if synth=0; always written */ |
26 |
|
{ |
27 |
|
colormap ocm; |
28 |
|
|
35 |
|
|
36 |
|
draw_grey(ocm); |
37 |
|
|
38 |
< |
bcopy((void *)color,(void *)cm,sizeof color); |
38 |
> |
memcpy((void *)cm,(void *)color,sizeof color); |
39 |
|
} |
40 |
|
|
41 |
|
/*----------------------------------------------------------------------*/ |
42 |
|
|
43 |
< |
draw_grey(ocm) |
44 |
< |
colormap ocm; |
43 |
> |
static void |
44 |
> |
draw_grey( |
45 |
> |
colormap ocm |
46 |
> |
) |
47 |
|
{ |
48 |
|
register rgbpixel *linin; |
49 |
|
register pixel *linout; |