]> granicus.if.org Git - imagemagick/blobdiff - coders/tile.c
(no commit message)
[imagemagick] / coders / tile.c
index fc7a1c737c2e430f0dec30b75acc64ce60b1aadd..6a9f6d5f26019631f4c4230fe264c43ab7d31e5d 100644 (file)
 %                     Return A Tiled Image Using Texture.                     %
 %                                                                             %
 %                              Software Design                                %
-%                                John Cristy                                  %
+%                                   Cristy                                    %
 %                                 July 1992                                   %
 %                                                                             %
 %                                                                             %
-%  Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization      %
+%  Copyright 1999-2014 ImageMagick Studio LLC, a non-profit organization      %
 %  dedicated to making software imaging solutions freely available.           %
 %                                                                             %
 %  You may not use this file except in compliance with the License.  You may  %
@@ -116,9 +116,10 @@ static Image *ReadTILEImage(const ImageInfo *image_info,
     ThrowReaderException(OptionError,"MustSpecifyImageSize");
   if (*image_info->filename == '\0')
     ThrowReaderException(OptionError,"MustSpecifyAnImageName");
-  image->matte=tile_image->matte;
-  if (image->matte != MagickFalse)
-    (void) SetImageBackgroundColor(image);
+  image->colorspace=tile_image->colorspace;
+  image->alpha_trait=tile_image->alpha_trait;
+  if (image->alpha_trait == BlendPixelTrait)
+    (void) SetImageBackgroundColor(image,exception);
   (void) CopyMagickString(image->filename,image_info->filename,MaxTextExtent);
   if (LocaleCompare(tile_image->magick,"PATTERN") == 0)
     {
@@ -127,6 +128,8 @@ static Image *ReadTILEImage(const ImageInfo *image_info,
     }
   (void) TextureImage(image,tile_image,exception);
   tile_image=DestroyImage(tile_image);
+  if (image->colorspace == GRAYColorspace)
+    image->type=GrayscaleType;
   return(GetFirstImageInList(image));
 }
 \f