diff --git a/magick/cache.c b/magick/cache.c
index 7d91f1f..028004b 100644
--- a/magick/cache.c
+++ b/magick/cache.c
@@ -2143,7 +2143,7 @@
         Ensure the image matches the pixel cache morphology.
       */
       image->taint=MagickTrue;
-      image->type=UndefinedColorType;
+      image->type=UndefinedType;
       if (image->colorspace == GRAYColorspace)
         image->colorspace=RGBColorspace;
       if (ValidatePixelCacheMorphology(image) == MagickFalse)