| 165 | } |
| 166 | |
| 167 | static boolean |
| 168 | ReadColorMap(FILE *fd, int number) |
| 169 | { |
| 170 | int i; |
| 171 | unsigned char rgb[3]; |
| 172 | |
| 173 | for (i = 0; i < number; ++i) { |
| 174 | if (!ReadOK(fd, rgb, sizeof(rgb))) { |
| 175 | return (FALSE); |
| 176 | } |
| 177 | |
| 178 | ColorMap[CM_RED][i] = rgb[0]; |
| 179 | ColorMap[CM_GREEN][i] = rgb[1]; |
| 180 | ColorMap[CM_BLUE][i] = rgb[2]; |
| 181 | } |
| 182 | colorsinmap = number; |
| 183 | return TRUE; |
| 184 | } |
| 185 | |
| 186 | /* |
| 187 | * Read gif header, including colormaps. We expect only one image per |