*/
image->columns=tga_info.width;
image->rows=tga_info.height;
- alpha_bits=(tga_info.attributes & 0x0FU);
- image->alpha_trait=(alpha_bits > 0) || (tga_info.bits_per_pixel == 32) ||
- (tga_info.colormap_size == 32) ? BlendPixelTrait : UndefinedPixelTrait;
+ if ((tga_info.image_type != TGAMonochrome) &&
+ (tga_info.image_type != TGARLEMonochrome))
+ {
+ alpha_bits=(tga_info.attributes & 0x0FU);
+ image->alpha_trait=(alpha_bits > 0) || (tga_info.bits_per_pixel == 32) ||
+ (tga_info.colormap_size == 32) ? BlendPixelTrait : UndefinedPixelTrait;
+ }
if ((tga_info.image_type != TGAColormap) &&
(tga_info.image_type != TGARLEColormap))
image->depth=(size_t) ((tga_info.bits_per_pixel <= 8) ? 8 :
image->depth=(size_t) ((tga_info.colormap_size <= 8) ? 8 :
(tga_info.colormap_size <= 16) ? 5 : 8);
if ((tga_info.image_type == TGAColormap) ||
- (tga_info.image_type == TGAMonochrome) ||
- (tga_info.image_type == TGARLEColormap) ||
- (tga_info.image_type == TGARLEMonochrome))
+ (tga_info.image_type == TGARLEColormap))
image->storage_class=PseudoClass;
+ if ((tga_info.image_type == TGAMonochrome) ||
+ (tga_info.image_type == TGARLEMonochrome))
+ {
+ image->type=GrayscaleType;
+ image->colorspace=GRAYColorspace;
+ }
image->compression=NoCompression;
if ((tga_info.image_type == TGARLEColormap) ||
(tga_info.image_type == TGARLEMonochrome) ||