% Methods to Interactively Animate an Image Sequence %
% %
% Software Design %
-% John Cristy %
+% Cristy %
% July 1992 %
% %
% %
-% Copyright 1999-2012 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2015 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/studio.h"
#include "MagickCore/animate.h"
#include "MagickCore/animate-private.h"
+#include "MagickCore/attribute.h"
#include "MagickCore/client.h"
#include "MagickCore/color.h"
#include "MagickCore/color-private.h"
#include "MagickCore/colorspace.h"
+#include "MagickCore/colorspace-private.h"
#include "MagickCore/constitute.h"
#include "MagickCore/delegate.h"
#include "MagickCore/exception.h"
resource_info.immutable=MagickTrue;
argv[0]=AcquireString(GetClientName());
(void) XAnimateImages(display,&resource_info,argv,1,images,exception);
- SetErrorHandler((ErrorHandler) NULL);
- SetWarningHandler((WarningHandler) NULL);
- SetErrorHandler((ErrorHandler) NULL);
- SetWarningHandler((WarningHandler) NULL);
+ (void) SetErrorHandler((ErrorHandler) NULL);
+ (void) SetWarningHandler((WarningHandler) NULL);
argv[0]=DestroyString(argv[0]);
(void) XCloseDisplay(display);
XDestroyResourceInfo(&resource_info);
*/
map_info=XAllocStandardColormap();
if (map_info == (XStandardColormap *) NULL)
- ThrowXWindowFatalException(ResourceLimitError,"MemoryAllocationFailed",
- images->filename);
+ ThrowXWindowFatalException(ResourceLimitFatalError,
+ "MemoryAllocationFailed",images->filename);
map_info->colormap=(Colormap) NULL;
pixel.pixels=(unsigned long *) NULL;
/*
XDestroyWindowColors(display,root_window);
coalesce_image=CoalesceImages(images,exception);
if (coalesce_image == (Image *) NULL)
- ThrowXWindowFatalException(ResourceLimitError,"MemoryAllocationFailed",
+ ThrowXWindowFatalException(ResourceLimitFatalError,"MemoryAllocationFailed",
images->filename);
images=coalesce_image;
if (resources.map_type == (char *) NULL)
*/
for (next=images; next != (Image *) NULL; )
{
- next->matte=MagickFalse;
+ next->alpha_trait=UndefinedPixelTrait;
if ((next->storage_class == DirectClass) ||
(next->colors != images->colors) ||
(next->colors > (size_t) visual_info->colormap_size))
if ((resource_info->map_type != (char *) NULL) ||
(visual_info->klass == TrueColor) ||
(visual_info->klass == DirectColor))
- (void) SetImageType(image_list[scene],image_list[scene]->matte ==
- MagickFalse ? TrueColorType : TrueColorMatteType,exception);
+ (void) SetImageType(image_list[scene],image_list[scene]->alpha_trait ==
+ BlendPixelTrait ? TrueColorType : TrueColorMatteType,exception);
if ((display_image->columns < image_list[scene]->columns) &&
(display_image->rows < image_list[scene]->rows))
display_image=image_list[scene];
}
if ((resource_info->map_type != (char *) NULL) ||
(visual_info->klass == TrueColor) || (visual_info->klass == DirectColor))
- (void) SetImageType(display_image,display_image->matte == MagickFalse ?
- TrueColorType : TrueColorMatteType,exception);
+ (void) SetImageType(display_image,display_image->alpha_trait !=
+ BlendPixelTrait ? TrueColorType : TrueColorMatteType,exception);
XMakeStandardColormap(display,visual_info,&resources,display_image,map_info,
&pixel,exception);
/*
(void) XClearWindow(display,window_info.id);
window_info.pixmaps[scene]=window_info.pixmap;
window_info.matte_pixmaps[scene]=window_info.matte_pixmap;
- if (image_list[scene]->matte)
+ if (image_list[scene]->alpha_trait)
(void) XClearWindow(display,window_info.id);
delay=1000*image_list[scene]->delay/MagickMax(
image_list[scene]->ticks_per_second,1L);
int
status;
+ if (*working_directory == '\0')
+ (void) CopyMagickString(working_directory,".",MaxTextExtent);
status=chdir(working_directory);
if (status == -1)
(void) ThrowMagickException(exception,GetMagickModule(),FileOpenError,
*/
for (next=images; next != (Image *) NULL; )
{
- next->matte=MagickFalse;
+ next->alpha_trait=UndefinedPixelTrait;
if ((next->storage_class == DirectClass) ||
(next->colors != images->colors) ||
(next->colors > (size_t) visual_info->colormap_size))
if ((resource_info->map_type != (char *) NULL) ||
(visual_info->klass == TrueColor) ||
(visual_info->klass == DirectColor))
- (void) SetImageType(image_list[scene],image_list[scene]->matte ==
- MagickFalse ? TrueColorType : TrueColorMatteType,exception);
+ (void) SetImageType(image_list[scene],image_list[scene]->alpha_trait ==
+ BlendPixelTrait ? TrueColorType : TrueColorMatteType,exception);
if ((display_image->columns < image_list[scene]->columns) &&
(display_image->rows < image_list[scene]->rows))
display_image=image_list[scene];
/*
Create X image.
*/
- (void) TransformImageColorspace(image_list[scene],RGBColorspace,exception);
windows->image.pixmap=(Pixmap) NULL;
windows->image.matte_pixmap=(Pixmap) NULL;
if ((resource_info->map_type != (char *) NULL) ||
Free X resources.
*/
if (windows->image.mapped != MagickFalse)
- (void) XWithdrawWindow(display,windows->image.id,windows->image.screen); XDelay(display,SuspendTime);
+ (void) XWithdrawWindow(display,windows->image.id,windows->image.screen);
+ XDelay(display,SuspendTime);
(void) XFreeStandardColormap(display,icon_visual,icon_map,icon_pixel);
if (resource_info->map_type == (char *) NULL)
(void) XFreeStandardColormap(display,visual_info,map_info,pixel);
*/
directory=getcwd(working_directory,MaxTextExtent);
(void) directory;
+ if (*resource_info->home_directory == '\0')
+ (void) CopyMagickString(resource_info->home_directory,".",MaxTextExtent);
status=chdir(resource_info->home_directory);
if (status == -1)
(void) ThrowMagickException(exception,GetMagickModule(),FileOpenError,
GetPathComponent(image->filename,HeadPath,path);
GetPathComponent(image->filename,TailPath,filename);
+ if (*path == '\0')
+ (void) CopyMagickString(path,".",MaxTextExtent);
status=chdir(path);
if (status == -1)
(void) ThrowMagickException(exception,GetMagickModule(),FileOpenError,
{
assert(image_info != (const ImageInfo *) NULL);
assert(image_info->signature == MagickSignature);
+ (void) image_info;
assert(image != (Image *) NULL);
assert(image->signature == MagickSignature);
if (image->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
(void) ThrowMagickException(exception,GetMagickModule(),MissingDelegateError,
- "DelegateLibrarySupportNotBuiltIn","`%s' (X11)",image->filename);
+ "DelegateLibrarySupportNotBuiltIn","'%s' (X11)",image->filename);
return(MagickFalse);
}
#endif