% Read/Write Image from/to X11 Server. %
% %
% Software Design %
-% John Cristy %
+% Cristy %
% July 1992 %
% %
% %
-% Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2017 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 %
#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"
*/
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
MagickInfo
*entry;
- entry=SetMagickInfo("X");
+ entry=AcquireMagickInfo("X","X","X Image");
#if defined(MAGICKCORE_X11_DELEGATE)
entry->decoder=(DecodeImageHandler *) ReadXImage;
entry->encoder=(EncodeImageHandler *) WriteXImage;
#endif
entry->format_type=ImplicitFormatType;
- entry->description=ConstantString("X Image");
- entry->module=ConstantString("X");
(void) RegisterMagickInfo(entry);
return(MagickImageCoderSignature);
}
static MagickBooleanType WriteXImage(const ImageInfo *image_info,Image *image,
ExceptionInfo *exception)
{
- return(DisplayImages(image_info,image));
+ return(DisplayImages(image_info,image,exception));
}