(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
if ((image->channels & WriteMaskChannel) == 0)
return(MagickTrue);
+ if ((nexus_info->region.width == 0) || (nexus_info->region.height == 0))
+ return(MagickTrue);
cache_info=(CacheInfo *) image->cache;
if (cache_info == (Cache) NULL)
return(MagickFalse);
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s",image->filename);
if ((image->channels & CompositeMaskChannel) == 0)
return(MagickTrue);
+ if ((nexus_info->region.width == 0) || (nexus_info->region.height == 0))
+ return(MagickTrue);
cache_info=(CacheInfo *) image->cache;
if (cache_info == (Cache) NULL)
return(MagickFalse);
assert(cache_info->signature == MagickCoreSignature);
if (cache_info->type == UndefinedCache)
return((Quantum *) NULL);
- (void) memset(&nexus_info->region,0,sizeof(nexus_info->region));
assert(nexus_info->signature == MagickCoreSignature);
+ (void) memset(&nexus_info->region,0,sizeof(nexus_info->region));
+ if ((width == 0) || (height == 0))
+ {
+ (void) ThrowMagickException(exception,GetMagickModule(),CacheError,
+ "NoPixelsDefinedInCache","`%s'",cache_info->filename);
+ return((Quantum *) NULL);
+ }
if (((cache_info->type == MemoryCache) || (cache_info->type == MapCache)) &&
(buffered == MagickFalse))
{
% The format of the CompareImagesBounds method is:
%
% RectangleInfo *CompareImagesBounds(const LayerMethod method,
-% const Image *image1, const Image *image2, ExceptionInfo *exception)
+% const Image *image1,const Image *image2,ExceptionInfo *exception)
%
% A description of each parameter follows:
%
*/
MagickExport Image *CompareImagesLayers(const Image *image,
- const LayerMethod method, ExceptionInfo *exception)
+ const LayerMethod method,ExceptionInfo *exception)
{
Image
*image_a,
% The format of the OptimizeLayerFrames method is:
%
% Image *OptimizeLayerFrames(const Image *image,
-% const LayerMethod method, ExceptionInfo *exception)
+% const LayerMethod method,ExceptionInfo *exception)
%
% A description of each parameter follows:
%
#define DEBUG_OPT_FRAME 0
-static Image *OptimizeLayerFrames(const Image *image,
- const LayerMethod method, ExceptionInfo *exception)
+static Image *OptimizeLayerFrames(const Image *image,const LayerMethod method,
+ ExceptionInfo *exception)
{
ExceptionInfo
*sans_exception;
*/
#if DEBUG_OPT_FRAME
i=0;
- (void) FormatLocaleFile(stderr, "frame %.20g :-\n", (double) i);
+ (void) FormatLocaleFile(stderr,"frame %.20g :-\n",(double) i);
#endif
disposals[0]=NoneDispose;
bounds[0]=CompareImagesBounds(prev_image,curr,CompareAnyLayer,exception);
for ( ; curr != (const Image *) NULL; curr=GetNextImageInList(curr))
{
#if DEBUG_OPT_FRAME
- (void) FormatLocaleFile(stderr, "frame %.20g :-\n", (double) i);
+ (void) FormatLocaleFile(stderr,"frame %.20g :-\n",(double) i);
#endif
/*
Assume none disposal is the best
bounds[i]=try_bounds;
disposals[i-1]=PreviousDispose;
#if DEBUG_OPT_FRAME
- (void) FormatLocaleFile(stderr, "previous: accepted\n");
+ (void) FormatLocaleFile(stderr,"previous: accepted\n");
} else {
- (void) FormatLocaleFile(stderr, "previous: rejected\n");
+ (void) FormatLocaleFile(stderr,"previous: rejected\n");
#endif
}
dup_image=DestroyImage(dup_image);
disposals[i-1]=BackgroundDispose;
#if DEBUG_OPT_FRAME
- (void) FormatLocaleFile(stderr, "expand_bgnd: accepted\n");
+ (void) FormatLocaleFile(stderr,"expand_bgnd: accepted\n");
} else {
- (void) FormatLocaleFile(stderr, "expand_bgnd: reject\n");
+ (void) FormatLocaleFile(stderr,"expand_bgnd: reject\n");
#endif
}
}
if ( disposals[i-1] != PreviousDispose )
prev_image=DestroyImage(prev_image);
if ( disposals[i-1] == BackgroundDispose )
- prev_image=bgnd_image, bgnd_image=(Image *) NULL;
+ prev_image=bgnd_image, bgnd_image=(Image *) NULL;
if (bgnd_image != (Image *) NULL)
bgnd_image=DestroyImage(bgnd_image);
if ( disposals[i-1] == NoneDispose )
#if DEBUG_OPT_FRAME
(void) FormatLocaleFile(stderr, "final %.20g : %s %.20gx%.20g%+.20g%+.20g\n",
(double) i-1,
- CommandOptionToMnemonic(MagickDisposeOptions, disposals[i-1]),
- (double) bounds[i-1].width, (double) bounds[i-1].height,
- (double) bounds[i-1].x, (double) bounds[i-1].y );
+ CommandOptionToMnemonic(MagickDisposeOptions,disposals[i-1]),
+ (double) bounds[i-1].width,(double) bounds[i-1].height,
+ (double) bounds[i-1].x,(double) bounds[i-1].y );
#endif
#if DEBUG_OPT_FRAME
(void) FormatLocaleFile(stderr, "interum %.20g : %s %.20gx%.20g%+.20g%+.20g\n",
(double) i,
- CommandOptionToMnemonic(MagickDisposeOptions, disposals[i]),
- (double) bounds[i].width, (double) bounds[i].height,
- (double) bounds[i].x, (double) bounds[i].y );
- (void) FormatLocaleFile(stderr, "\n");
+ CommandOptionToMnemonic(MagickDisposeOptions,disposals[i]),
+ (double) bounds[i].width,(double) bounds[i].height,
+ (double) bounds[i].x,(double) bounds[i].y );
+ (void) FormatLocaleFile(stderr,"\n");
#endif
i++;
}
MagickExport Image *OptimizePlusImageLayers(const Image *image,
ExceptionInfo *exception)
{
- return OptimizeLayerFrames(image, OptimizePlusLayer, exception);
+ return OptimizeLayerFrames(image,OptimizePlusLayer,exception);
}
\f
/*
}
if ((ssize_t) (bounds.y+bounds.height) > (ssize_t) current_image->rows)
bounds.height=current_image->rows-bounds.y;
- ClearBounds(current_image, &bounds,exception);
+ ClearBounds(current_image,&bounds,exception);
}
if (next->dispose != PreviousDispose)
{
%
% The format of the RemoveDuplicateLayers method is:
%
-% void RemoveDuplicateLayers(Image **image, ExceptionInfo *exception)
+% void RemoveDuplicateLayers(Image **image,ExceptionInfo *exception)
%
% A description of each parameter follows:
%
%
% The format of the RemoveZeroDelayLayers method is:
%
-% void RemoveZeroDelayLayers(Image **image, ExceptionInfo *exception)
+% void RemoveZeroDelayLayers(Image **image,ExceptionInfo *exception)
%
% A description of each parameter follows:
%
assert(exception->signature == MagickCoreSignature);
if (source->debug != MagickFalse || destination->debug != MagickFalse)
(void) LogMagickEvent(TraceEvent,GetMagickModule(),"%s - %s",
- source->filename, destination->filename);
+ source->filename,destination->filename);
/*
Overlay single source image over destation image/list