-}
-
-uns
-image_name_to_channels_format(byte *name)
-{
- if (!strcasecmp(name, "gray"))
- return COLOR_SPACE_GRAYSCALE;
- if (!strcasecmp(name, "grayscale"))
- return COLOR_SPACE_GRAYSCALE;
- if (!strcasecmp(name, "grayalpha"))
- return COLOR_SPACE_GRAYSCALE | IMAGE_ALPHA;
- if (!strcasecmp(name, "grayscalealpha"))
- return COLOR_SPACE_GRAYSCALE | IMAGE_ALPHA;
- if (!strcasecmp(name, "rgb"))
- return COLOR_SPACE_RGB;
- if (!strcasecmp(name, "rgbalpha"))
- return COLOR_SPACE_RGB | IMAGE_ALPHA;
- if (!strcasecmp(name, "rgba"))
- return COLOR_SPACE_RGB | IMAGE_ALPHA;