% MagickCore X11 Utility Methods %
% %
% Software Design %
-% John Cristy %
+% Cristy %
% July 1992 %
% %
% %
-% Copyright 1999-2013 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 %
*/
root_window=XRootWindow(display,XDefaultScreen(display));
status=False;
+ number_maps=0;
if (LocaleCompare(map_type,"list") != 0)
{
/*
{
pixel=XGetPixel(ximage,x,y);
color=(pixel >> red_shift) & red_mask;
- color=(65535UL*color)/red_mask;
- SetPixelRed(composite_image,
- ScaleShortToQuantum((unsigned short) color),q);
+ if (red_mask != 0)
+ color=(65535UL*color)/red_mask;
+ SetPixelRed(composite_image,ScaleShortToQuantum(
+ (unsigned short) color),q);
color=(pixel >> green_shift) & green_mask;
- color=(65535UL*color)/green_mask;
- SetPixelGreen(composite_image,
- ScaleShortToQuantum((unsigned short) color),q);
+ if (green_mask != 0)
+ color=(65535UL*color)/green_mask;
+ SetPixelGreen(composite_image,ScaleShortToQuantum(
+ (unsigned short) color),q);
color=(pixel >> blue_shift) & blue_mask;
- color=(65535UL*color)/blue_mask;
- SetPixelBlue(composite_image,
- ScaleShortToQuantum((unsigned short) color),q);
+ if (blue_mask != 0)
+ color=(65535UL*color)/blue_mask;
+ SetPixelBlue(composite_image,ScaleShortToQuantum(
+ (unsigned short) color),q);
q+=GetPixelChannels(composite_image);
}
status=SyncCacheViewAuthenticPixels(composite_view,exception);
/*
Select window by ID or name.
*/
- if (isdigit((unsigned char) *image_info->filename) != 0)
+ if (isdigit((int) ((unsigned char) *image_info->filename)) != 0)
target=XWindowByID(display,root,(Window)
strtol(image_info->filename,(char **) NULL,0));
if (target == (Window) NULL)
windows->group_leader.id=(Window) NULL;
if (resource_info->window_group != (char *) NULL)
{
- if (isdigit((unsigned char) *resource_info->window_group) != 0)
+ if (isdigit((int) ((unsigned char) *resource_info->window_group)) != 0)
windows->group_leader.id=XWindowByID(display,root_window,(Window)
strtol((char *) resource_info->window_group,(char **) NULL,0));
if (windows->group_leader.id == (Window) NULL)
/*
Search window hierarchy and identify any clients by name or ID.
*/
- if (isdigit((unsigned char) *window) != 0)
+ if (isdigit((int) ((unsigned char) *window)) != 0)
remote_window=XWindowByID(display,root_window,(Window)
strtol((char *) window,(char **) NULL,0));
if (remote_window == (Window) NULL)