]> granicus.if.org Git - imagemagick/blobdiff - coders/uil.c
(no commit message)
[imagemagick] / coders / uil.c
index 9f71ac3c54ddf0e910a454134f95c85fb3f0c24b..555b531d37a6120c7cdc27c57108dd03af45e3d3 100644 (file)
@@ -98,7 +98,7 @@ ModuleExport size_t RegisterUILImage(void)
 
   entry=SetMagickInfo("UIL");
   entry->encoder=(EncodeImageHandler *) WriteUILImage;
-  entry->adjoin=MagickFalse;
+  entry->flags^=CoderAdjoinFlag;
   entry->description=ConstantString("X-Motif UIL table");
   entry->module=ConstantString("UIL");
   (void) RegisterMagickInfo(entry);
@@ -328,8 +328,8 @@ static MagickBooleanType WriteUILImage(const ImageInfo *image_info,Image *image,
     else
       (void) FormatLocaleString(buffer,MaxTextExtent,
         "    color('%s',%s) = '%s'",name,
-        GetPixelInfoIntensity(image->colormap+i) <
-        (QuantumRange/2) ? "background" : "foreground",symbol);
+        GetPixelInfoIntensity(image,image->colormap+i) <
+        (QuantumRange/2.0) ? "background" : "foreground",symbol);
     (void) WriteBlobString(image,buffer);
     (void) FormatLocaleString(buffer,MaxTextExtent,"%s",
       (i == (ssize_t) (colors-1) ? ");\n" : ",\n"));