]> granicus.if.org Git - imagemagick/blobdiff - coders/x.c
(no commit message)
[imagemagick] / coders / x.c
index 2e276548e104cbb969054b3246a96cd109847061..8e6e601575f4535171d297f8091f60fe326bf66f 100644 (file)
@@ -17,7 +17,7 @@
 %                                 July 1992                                   %
 %                                                                             %
 %                                                                             %
-%  Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization      %
+%  Copyright 1999-2012 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  %
@@ -56,6 +56,7 @@
 #include "MagickCore/static.h"
 #include "MagickCore/string_.h"
 #include "MagickCore/module.h"
+#include "MagickCore/token.h"
 #include "MagickCore/utility.h"
 #include "MagickCore/xwindow.h"
 #include "MagickCore/xwindow-private.h"
@@ -95,21 +96,14 @@ static MagickBooleanType
 */
 static Image *ReadXImage(const ImageInfo *image_info,ExceptionInfo *exception)
 {
-  const char
-    *option;
-
   XImportInfo
     ximage_info;
 
   (void) exception;
   XGetImportInfo(&ximage_info);
-  option=GetImageOption(image_info,"x:screen");
-  if (option != (const char *) NULL)
-    ximage_info.screen=IsMagickTrue(option);
-  option=GetImageOption(image_info,"x:silent");
-  if (option != (const char *) NULL)
-    ximage_info.silent=IsMagickTrue(option);
-  return(XImportImage(image_info,&ximage_info));
+  ximage_info.screen=IsStringTrue(GetImageOption(image_info,"x:screen"));
+  ximage_info.silent=IsStringTrue(GetImageOption(image_info,"x:silent"));
+  return(XImportImage(image_info,&ximage_info,exception));
 }
 #endif
 \f