8#define ARGS(alist) alist
18#define put_byte(A) (*put_b)((byte)(A)); Nbyte++
63long GIFencode(Width, Height, Ncol,
R,
G, B, ScLine, get_scline, pb)
64 int Width, Height, Ncol;
65 byte R[],
G[], B[], ScLine[];
66 void (*get_scline)
ARGS((
int,
int,
byte *)), (*pb)
ARGS((
byte));
69 int ncol, i,
x,
y, disp, Code, K;
74 if (Width <= 0 || Width > 4096 || Height <= 0 || Height > 4096) {
76 "\nGIFencode: incorrect image size: %d x %d\n", Width, Height);
80 if (Ncol <= 0 || Ncol > 256) {
81 fprintf(stderr,
"\nGIFencode: wrong number of colors: %d\n", Ncol);
126 for (i=0; i<Ncol; i++) {
131 for (; i<ncol; i++) {
153 for (
y=0;
y<Height;
y++) {
154 (*get_scline)(
y, Width, ScLine);
171 if (i == 0) disp = 1;
211static unsigned long masks[] = { 0x0000,
212 0x0001, 0x0003, 0x0007, 0x000F,
213 0x001F, 0x003F, 0x007F, 0x00FF,
214 0x01FF, 0x03FF, 0x07FF, 0x0FFF,
215 0x1FFF, 0x3FFF, 0x7FFF, 0xFFFF };
typedef void((*Func_t)())
constexpr Double_t K()
Boltzmann's constant in .
static unsigned long masks[]
static void put_short(int word)
static long HashTab[HSIZE]
static unsigned long cur_accum
static void output(int code)
static void char_out(int c)
long GIFencode(void *int, void *int, void *int, R, G, B, ScLine, void *get_scline, pb)
static int CodeTab[HSIZE]