62 |
|
putc(2, fp); |
63 |
|
putc(2, fp); |
64 |
|
putc(len>>8, fp); |
65 |
< |
putc(len&255, fp); |
65 |
> |
putc(len&0xff, fp); |
66 |
|
/* put components seperately */ |
67 |
|
for (i = 0; i < 4; i++) { |
68 |
|
for (j = 0; j < len; j += cnt) { /* find next run */ |
160 |
|
scanline[0][BLU] = getc(fp); |
161 |
|
if ((i = getc(fp)) == EOF) |
162 |
|
return(-1); |
163 |
< |
if (scanline[0][GRN] != 2 || scanline[0][BLU] & 128) { |
163 |
> |
if ((scanline[0][GRN] != 2) | ((scanline[0][BLU] & 0x80) != 0)) { |
164 |
|
scanline[0][RED] = 2; |
165 |
|
scanline[0][EXP] = i; |
166 |
|
return(oldreadcolrs(scanline+1, len-1, fp)); |
270 |
|
return; |
271 |
|
} |
272 |
|
|
273 |
< |
d = frexp(d, &e) * 255.9999 / d; |
273 |
> |
d = frexp(d, &e) * 256.0 / d; |
274 |
|
|
275 |
|
if (r > 0.0) |
276 |
|
clr[RED] = r * d; |