diff --git a/MagickCore/display.c b/MagickCore/display.c
index 625771b..3f1c55f 100644
--- a/MagickCore/display.c
+++ b/MagickCore/display.c
@@ -8008,7 +8008,7 @@
*/
XSetCursorState(display,windows,MagickTrue);
XCheckRefreshWindows(display,windows);
- (void) SetImageType(*image,(*image)->alpha_trait != BlendPixelTrait ?
+ (void) SetImageType(*image,(*image)->alpha_trait == UndefinedPixelTrait ?
GrayscaleType : GrayscaleMatteType,exception);
XSetCursorState(display,windows,MagickFalse);
if (IfMagickTrue(windows->image.orphan) )
@@ -9163,7 +9163,7 @@
Image
*matte_image;
- if ((*image)->alpha_trait != BlendPixelTrait)
+ if ((*image)->alpha_trait == UndefinedPixelTrait)
{
XNoticeWidget(display,windows,
"Image does not have any matte information",(*image)->filename);
@@ -10096,7 +10096,7 @@
continue;
if (IfMagickFalse(SetImageStorageClass(*image,DirectClass,exception)) )
return(MagickFalse);
- if ((*image)->alpha_trait != BlendPixelTrait)
+ if ((*image)->alpha_trait == UndefinedPixelTrait)
(void) SetImageAlphaChannel(*image,OpaqueAlphaChannel,exception);
image_view=AcquireAuthenticCacheView(*image,exception);
switch (method)