]> granicus.if.org Git - imagemagick/blobdiff - coders/xc.c
(no commit message)
[imagemagick] / coders / xc.c
index 972043414c90981829ea1398fcbea4f16d05e3fd..5f748dfa53611ed3a28f24e221d80edea94b9db3 100644 (file)
@@ -17,7 +17,7 @@
 %                                 July 1992                                   %
 %                                                                             %
 %                                                                             %
-%  Copyright 1999-2010 ImageMagick Studio LLC, a non-profit organization      %
+%  Copyright 1999-2011 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  %
@@ -52,6 +52,7 @@
 #include "magick/list.h"
 #include "magick/magick.h"
 #include "magick/memory_.h"
+#include "magick/pixel.h"
 #include "magick/pixel-private.h"
 #include "magick/quantum-private.h"
 #include "magick/static.h"
@@ -102,9 +103,6 @@ static Image *ReadXCImage(const ImageInfo *image_info,ExceptionInfo *exception)
   MagickPixelPacket
     color;
 
-  ssize_t
-    y;
-
   PixelPacket
     pixel;
 
@@ -114,6 +112,9 @@ static Image *ReadXCImage(const ImageInfo *image_info,ExceptionInfo *exception)
   register PixelPacket
     *q;
 
+  ssize_t
+    y;
+
   /*
     Initialize Image structure.
   */
@@ -151,7 +152,7 @@ static Image *ReadXCImage(const ImageInfo *image_info,ExceptionInfo *exception)
       {
         indexes=GetAuthenticIndexQueue(image);
         for (x=0; x < (ssize_t) image->columns; x++)
-          indexes[x]=index;
+          SetIndexPixelComponent(indexes+x,index);
       }
     if (SyncAuthenticPixels(image,exception) == MagickFalse)
       break;
@@ -190,7 +191,16 @@ ModuleExport size_t RegisterXCImage(void)
   entry=SetMagickInfo("XC");
   entry->decoder=(DecodeImageHandler *) ReadXCImage;
   entry->adjoin=MagickFalse;
-  entry->format_type=ExplicitFormatType;
+  entry->format_type=ImplicitFormatType;
+  entry->raw=MagickTrue;
+  entry->endian_support=MagickTrue;
+  entry->description=ConstantString("Constant image uniform color");
+  entry->module=ConstantString("XC");
+  (void) RegisterMagickInfo(entry);
+  entry=SetMagickInfo("CANVAS");
+  entry->decoder=(DecodeImageHandler *) ReadXCImage;
+  entry->adjoin=MagickFalse;
+  entry->format_type=ImplicitFormatType;
   entry->raw=MagickTrue;
   entry->endian_support=MagickTrue;
   entry->description=ConstantString("Constant image uniform color");
@@ -220,5 +230,6 @@ ModuleExport size_t RegisterXCImage(void)
 */
 ModuleExport void UnregisterXCImage(void)
 {
+  (void) UnregisterMagickInfo("CANVAS");
   (void) UnregisterMagickInfo("XC");
 }