#include "MagickCore/resource_.h"
#include "MagickCore/string_.h"
#include "MagickCore/utility.h"
+#include "MagickCore/utility-private.h"
#include "MagickCore/version.h"
\f
/*
geometry,
extract_info;
-
size_t
bevel_width,
border_width,
draw_info->stroke=montage_info->stroke;
draw_info->fill=montage_info->fill;
draw_info->text=AcquireString("");
- (void) GetTypeMetrics(image_list[0],draw_info,&metrics);
+ (void) GetTypeMetrics(image_list[0],draw_info,&metrics,exception);
texture=NewImageList();
if (montage_info->texture != (char *) NULL)
{
/*
Determine the number of lines in an next label.
*/
- title=InterpretImageProperties(clone_info,image_list[0],montage_info->title);
+ title=InterpretImageProperties(clone_info,image_list[0],montage_info->title,
+ exception);
title_offset=0;
if (montage_info->title != (char *) NULL)
title_offset=(size_t) (2*(metrics.ascent-metrics.descent)*
/*
Allocate next structure.
*/
- tile_image=AcquireImage(NULL);
- montage=AcquireImage(clone_info);
+ tile_image=AcquireImage((ImageInfo *) NULL,exception);
+ montage=AcquireImage(clone_info,exception);
montage->background_color=montage_info->background_color;
montage->scene=0;
images_per_page=(number_images-1)/(tiles_per_row*tiles_per_column)+1;
*/
(void) CopyMagickString(montage->filename,montage_info->filename,
MaxTextExtent);
- montage->columns=bounds.width;
- montage->rows=bounds.height;
+ montage->columns=MagickMax(bounds.width,1);
+ montage->rows=MagickMax(bounds.height,1);
(void) SetImageBackgroundColor(montage);
/*
Set montage geometry.
clone_info=CloneDrawInfo(image_info,draw_info);
clone_info->gravity=CenterGravity;
clone_info->pointsize*=2.0;
- (void) GetTypeMetrics(image_list[0],clone_info,&metrics);
+ (void) GetTypeMetrics(image_list[0],clone_info,&metrics,exception);
(void) FormatLocaleString(geometry,MaxTextExtent,
"%.20gx%.20g%+.20g%+.20g",(double) montage->columns,(double)
(metrics.ascent-metrics.descent),0.0,(double) extract_info.y+4);
(void) CloneString(&clone_info->geometry,geometry);
(void) CloneString(&clone_info->text,title);
- (void) AnnotateImage(montage,clone_info);
+ (void) AnnotateImage(montage,clone_info,exception);
clone_info=DestroyDrawInfo(clone_info);
}
(void) SetImageProgressMonitor(montage,progress_monitor,
border_info.width=(width-image->columns+1)/2;
border_info.height=(height-image->rows+1)/2;
}
- border_image=BorderImage(image,&border_info,exception);
+ border_image=BorderImage(image,&border_info,image->compose,exception);
if (border_image != (Image *) NULL)
{
image=DestroyImage(image);
if ((montage_info->frame != (char *) NULL) &&
(image->compose == DstOutCompositeOp))
{
- SetPixelComponentMap(image,AlphaChannel);
- (void) NegateImage(image,MagickFalse);
- SetPixelComponentMap(image,DefaultChannels);
+ SetPixelChannelMap(image,AlphaChannel);
+ (void) NegateImage(image,MagickFalse,exception);
+ SetPixelChannelMap(image,DefaultChannels);
}
}
/*
if (value != (const char *) NULL)
extract_info.height+=(size_t) ((metrics.ascent-
metrics.descent+4)*MultilineCensus(value));
- frame_image=FrameImage(image,&extract_info,exception);
+ frame_image=FrameImage(image,&extract_info,image->compose,exception);
if (frame_image != (Image *) NULL)
{
image=DestroyImage(image);
/*
Shadow image.
*/
- (void) QueryColorDatabase("#00000000",&image->background_color,
- exception);
+ (void) QueryColorCompliance("#00000000",AllCompliance,
+ &image->background_color,exception);
shadow_image=ShadowImage(image,80.0,2.0,5,5,exception);
if (shadow_image != (Image *) NULL)
{
(montage_info->shadow != MagickFalse ? 4 : 0))+bevel_width));
(void) CloneString(&draw_info->geometry,geometry);
(void) CloneString(&draw_info->text,value);
- (void) AnnotateImage(montage,draw_info);
+ (void) AnnotateImage(montage,draw_info,exception);
}
}
x_offset+=(ssize_t) (width+2*(extract_info.x+border_width));
/*
Allocate next image structure.
*/
- AcquireNextImage(clone_info,montage);
+ AcquireNextImage(clone_info,montage,exception);
if (GetNextImageInList(montage) == (Image *) NULL)
{
montage=DestroyImageList(montage);