127 |
|
quiterr("out of memory in avs2ra"); |
128 |
|
/* convert image */ |
129 |
|
for (y = ymax-1; y >= 0; y--) { |
130 |
< |
(void)getc(stdin); /* toss alpha */ |
131 |
< |
scanout[x][RED] = getc(stdin); |
132 |
< |
scanout[x][GRN] = getc(stdin); |
133 |
< |
scanout[x][BLU] = getc(stdin); |
134 |
< |
if (feof(stdin) || ferror(stdin)) |
130 |
> |
for (x = 0; x < xmax; x++) { |
131 |
> |
(void)getc(stdin); /* toss alpha */ |
132 |
> |
scanout[x][RED] = getc(stdin); |
133 |
> |
scanout[x][GRN] = getc(stdin); |
134 |
> |
scanout[x][BLU] = getc(stdin); |
135 |
> |
} |
136 |
> |
if (feof(stdin) | ferror(stdin)) |
137 |
|
quiterr("error reading AVS image"); |
138 |
|
/* undo gamma */ |
139 |
|
gambs_colrs(scanout, xmax); |