mirror of
https://github.com/ImageMagick/ImageMagick.git
synced 2026-05-31 11:18:42 +02:00
Change the colorspace to GrayScale when an exr image only has a single Y channel (#8305)
This commit is contained in:
@@ -281,6 +281,8 @@ static MagickBooleanType InitializeEXRChannels(Image *image,exr_context_t ctxt,
|
||||
status=SetPixelMetaChannels(image,number_meta_channels,exception);
|
||||
if (status == MagickFalse)
|
||||
return(status);
|
||||
if ((decoder.channel_count == 1) && (pixel_channels[0] == IndexPixelChannel))
|
||||
image->colorspace=GRAYColorspace;
|
||||
*data=(uint8_t *) AcquireQuantumMemory(*pixel_size,pixel_count);
|
||||
if (*data == (uint8_t*)NULL)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user