% August 2003 %
% %
% %
-% Copyright 1999-2011 ImageMagick Studio LLC, a non-profit organization %
+% Copyright 1999-2012 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 %
clone_wand->exception=AcquireExceptionInfo();
InheritException(clone_wand->exception,wand->exception);
clone_wand->image_info=CloneImageInfo(wand->image_info);
- clone_wand->quantize_info=CloneQuantizeInfo(wand->quantize_info);
clone_wand->images=images;
clone_wand->debug=IsEventLogging();
if (clone_wand->debug != MagickFalse)
% triangulation.
%
% MagickBooleanType MagickAdaptiveResizeImage(MagickWand *wand,
-% const size_t columns,const size_t rows,
-% const PixelInterpolateMethod method)
+% const size_t columns,const size_t rows)
%
% A description of each parameter follows:
%
%
% o rows: the number of rows in the scaled image.
%
-% o interpolate: the pixel interpolation method.
-%
*/
WandExport MagickBooleanType MagickAdaptiveResizeImage(MagickWand *wand,
- const size_t columns,const size_t rows,const PixelInterpolateMethod method)
+ const size_t columns,const size_t rows)
{
Image
*resize_image;
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- resize_image=AdaptiveResizeImage(wand->images,columns,rows,method,
- wand->exception);
+ resize_image=AdaptiveResizeImage(wand->images,columns,rows,wand->exception);
if (resize_image == (Image *) NULL)
return(MagickFalse);
ReplaceImageInList(&wand->images,resize_image);
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% MagickAddImage() adds the specified images at the current image location.
+% MagickAddImage() adds a clone of the images in the second wand and
+% inserts them into the first wand, at the current image location.
+%
+% Use MagickSetFirstIterator(), to insert new images before all the current
+% images in the wand, otherwise image is placed after the current image.
%
% The format of the MagickAddImage method is:
%
Image *images)
{
Image
- *sentinel;
+ *current;
+
+ current=wand->images; /* note the current image */
- sentinel=wand->images;
- if (sentinel == (Image *) NULL)
+ /* if no images in wand, just add them and set first image as current */
+ if (current == (Image *) NULL)
{
wand->images=GetFirstImageInList(images);
return(MagickTrue);
}
- if (wand->active == MagickFalse)
+
+ /* user jumped to first image, so prepend new images - remain active */
+ if ((wand->set_first != MagickFalse) &&
+ (current->previous == (Image *) NULL) )
+ {
+ PrependImageToList(¤t,images);
+ wand->images=GetFirstImageInList(images);
+ return(MagickTrue);
+ }
+ wand->set_first = MagickFalse; /* flag no longer valid */
+
+ /* Current image was flagged as 'pending' iterative processing. */
+ if (wand->image_pending != MagickFalse)
{
- if ((wand->pend != MagickFalse) && (sentinel->next == (Image *) NULL))
+ /* current pending image is the last, append new images */
+ if (current->next == (Image *) NULL)
{
- AppendImageToList(&sentinel,images);
+ AppendImageToList(¤t,images);
wand->images=GetLastImageInList(images);
return(MagickTrue);
}
- if ((wand->pend != MagickFalse) && (sentinel->previous == (Image *) NULL))
+ /* current pending image is the first image, prepend it */
+ if (current->previous == (Image *) NULL)
{
- PrependImageToList(&sentinel,images);
+ PrependImageToList(¤t,images);
wand->images=GetFirstImageInList(images);
return(MagickTrue);
}
}
- if (sentinel->next == (Image *) NULL)
+
+ /* if at last image append new images */
+ if (current->next == (Image *) NULL)
{
- InsertImageInList(&sentinel,images);
+ InsertImageInList(¤t,images);
wand->images=GetLastImageInList(images);
return(MagickTrue);
}
- InsertImageInList(&sentinel,images);
+ /* otherwise just insert image, just after the current image */
+ InsertImageInList(¤t,images);
wand->images=GetFirstImageInList(images);
return(MagickTrue);
}
assert(add_wand->signature == WandSignature);
if (add_wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",add_wand->name);
+
+ /* clone images in second wand, and insert into first */
images=CloneImageList(add_wand->images,wand->exception);
if (images == (Image *) NULL)
return(MagickFalse);
% The format of the MagickAddNoiseImage method is:
%
% MagickBooleanType MagickAddNoiseImage(MagickWand *wand,
-% const NoiseType noise_type)
+% const NoiseType noise_type,const double attenuate)
%
% A description of each parameter follows:
%
% o noise_type: The type of noise: Uniform, Gaussian, Multiplicative,
% Impulse, Laplacian, or Poisson.
%
+% o attenuate: attenuate the random distribution.
+%
*/
WandExport MagickBooleanType MagickAddNoiseImage(MagickWand *wand,
- const NoiseType noise_type)
+ const NoiseType noise_type,const double attenuate)
{
Image
*noise_image;
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- noise_image=AddNoiseImage(wand->images,noise_type,wand->exception);
+ noise_image=AddNoiseImage(wand->images,noise_type,attenuate,wand->exception);
if (noise_image == (Image *) NULL)
return(MagickFalse);
ReplaceImageInList(&wand->images,noise_image);
draw_info->affine.ry=(-sin((double) DegreesToRadians(fmod(angle,360.0))));
draw_info->affine.sy=cos((double) DegreesToRadians(fmod(angle,360.0)));
(void) CloneString(&draw_info->geometry,geometry);
- status=AnnotateImage(wand->images,draw_info,&wand->images->exception);
+ status=AnnotateImage(wand->images,draw_info,wand->exception);
draw_info=DestroyDrawInfo(draw_info);
return(status);
}
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
(void) CloneString(&wand->image_info->server_name,server_name);
- status=AnimateImages(wand->image_info,wand->images,&wand->images->exception);
+ status=AnimateImages(wand->image_info,wand->images,wand->exception);
return(status);
}
\f
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- status=AutoGammaImage(wand->images,&wand->images->exception);
+ status=AutoGammaImage(wand->images,wand->exception);
return(status);
}
\f
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- status=AutoLevelImage(wand->images,&wand->images->exception);
+ status=AutoLevelImage(wand->images,wand->exception);
return(status);
}
\f
QuantumFormat "," QuantumFormat "," QuantumFormat "," QuantumFormat,
PixelGetRedQuantum(threshold),PixelGetGreenQuantum(threshold),
PixelGetBlueQuantum(threshold),PixelGetAlphaQuantum(threshold));
- status=BlackThresholdImage(wand->images,thresholds,&wand->images->exception);
- if (status == MagickFalse)
- InheritException(wand->exception,&wand->images->exception);
+ status=BlackThresholdImage(wand->images,thresholds,wand->exception);
return(status);
}
\f
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
status=BrightnessContrastImage(wand->images,brightness,contrast,
- &wand->images->exception);
+ wand->exception);
return(status);
}
\f
*/
WandExport MagickBooleanType MagickClampImage(MagickWand *wand)
{
- MagickBooleanType
- status;
-
assert(wand != (MagickWand *) NULL);
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- status=ClampImage(wand->images);
- if (status == MagickFalse)
- InheritException(wand->exception,&wand->images->exception);
- return(status);
+ return(ClampImage(wand->images,wand->exception));
}
\f
/*
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
status=ColorDecisionListImage(wand->images,color_correction_collection,
- &wand->images->exception);
+ wand->exception);
return(status);
}
\f
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
+ GetPixelInfo(wand->images,&target);
if (target.colorspace != CMYKColorspace)
(void) FormatLocaleString(percent_blend,MaxTextExtent,
"%g,%g,%g,%g",(double) (100.0*QuantumScale*
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- status=SetImageProperty(wand->images,"comment",comment);
- if (status == MagickFalse)
- InheritException(wand->exception,&wand->images->exception);
+ status=SetImageProperty(wand->images,"comment",comment,wand->exception);
return(status);
}
\f
return((MagickWand *) NULL);
}
compare_image=CompareImages(wand->images,reference->images,metric,distortion,
- &wand->images->exception);
+ wand->exception);
if (compare_image == (Image *) NULL)
return((MagickWand *) NULL);
return(CloneMagickWandFromImages(wand,compare_image));
if ((wand->images == (Image *) NULL) ||
(composite_wand->images == (Image *) NULL))
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- status=CompositeImage(wand->images,compose,composite_wand->images,x,y);
- if (status == MagickFalse)
- InheritException(wand->exception,&wand->images->exception);
+ status=CompositeImage(wand->images,compose,composite_wand->images,x,y,
+ wand->exception);
return(status);
}
\f
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- status=ContrastImage(wand->images,sharpen,&wand->images->exception);
+ status=ContrastImage(wand->images,sharpen,wand->exception);
return(status);
}
\f
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
status=ContrastStretchImage(wand->images,black_point,white_point,
- &wand->images->exception);
+ wand->exception);
return(status);
}
\f
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- return(DecipherImage(wand->images,passphrase,&wand->images->exception));
+ return(DecipherImage(wand->images,passphrase,wand->exception));
}
\f
/*
if (image == (Image *) NULL)
return(MagickFalse);
(void) CloneString(&wand->image_info->server_name,server_name);
- status=DisplayImages(wand->image_info,image,&image->exception);
+ status=DisplayImages(wand->image_info,image,wand->exception);
image=DestroyImage(image);
return(status);
}
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
(void) CloneString(&wand->image_info->server_name,server_name);
- status=DisplayImages(wand->image_info,wand->images,&wand->images->exception);
+ status=DisplayImages(wand->image_info,wand->images,wand->exception);
return(status);
}
\f
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- return(EncipherImage(wand->images,passphrase,&wand->images->exception));
+ return(EncipherImage(wand->images,passphrase,wand->exception));
}
\f
/*
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- status=EqualizeImage(wand->images,&wand->images->exception);
+ status=EqualizeImage(wand->images,wand->exception);
return(status);
}
\f
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- status=EvaluateImage(wand->images,op,value,&wand->images->exception);
+ status=EvaluateImage(wand->images,op,value,wand->exception);
return(status);
}
\f
ThrowWandException(WandError,"ContainsNoImages",wand->name);
status=ExportImagePixels(wand->images,x,y,columns,rows,map,
storage,pixels,wand->exception);
- if (status == MagickFalse)
- InheritException(wand->exception,&wand->images->exception);
return(status);
}
\f
%
% The format of the MagickExtentImage method is:
%
-% MagickBooleanType MagickExtentImage(MagickWand *wand,
-% const size_t width,const size_t height,const ssize_t x,
-% const ssize_t y)
+% MagickBooleanType MagickExtentImage(MagickWand *wand,const size_t width,
+% const size_t height,const ssize_t x,const ssize_t y)
%
% A description of each parameter follows:
%
%
*/
WandExport MagickBooleanType MagickExtentImage(MagickWand *wand,
- const size_t width,const size_t height,const ssize_t x,
- const ssize_t y)
+ const size_t width,const size_t height,const ssize_t x,const ssize_t y)
{
Image
*extent_image;
ThrowWandException(WandError,"ContainsNoImages",wand->name);
draw_info=CloneDrawInfo(wand->image_info,(DrawInfo *) NULL);
PixelGetQuantumPacket(fill,&draw_info->fill);
- (void) GetOneVirtualMagickPixel(wand->images,x % wand->images->columns,
- y % wand->images->rows,&target,wand->exception);
+ (void) GetOneVirtualPixelInfo(wand->images,TileVirtualPixelMethod,x %
+ wand->images->columns,y % wand->images->rows,&target,wand->exception);
if (bordercolor != (PixelWand *) NULL)
PixelGetMagickColor(bordercolor,&target);
wand->images->fuzz=fuzz;
status=FloodfillPaintImage(wand->images,draw_info,&target,x,y,invert,
- &wand->images->exception);
+ wand->exception);
draw_info=DestroyDrawInfo(draw_info);
return(status);
}
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
status=FunctionImage(wand->images,function,number_arguments,arguments,
- &wand->images->exception);
+ wand->exception);
return(status);
}
\f
% The format of the MagickGaussianBlurImage method is:
%
% MagickBooleanType MagickGaussianBlurImage(MagickWand *wand,
-% const double radius,const double sigma,const double bias)
+% const double radius,const double sigma)
%
% A description of each parameter follows:
%
%
% o sigma: the standard deviation of the Gaussian, in pixels.
%
-% o bias: the bias.
-%
*/
WandExport MagickBooleanType MagickGaussianBlurImage(MagickWand *wand,
- const double radius,const double sigma,const double bias)
+ const double radius,const double sigma)
{
Image
*blur_image;
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- blur_image=GaussianBlurImage(wand->images,radius,sigma,bias,wand->exception);
+ blur_image=GaussianBlurImage(wand->images,radius,sigma,wand->exception);
if (blur_image == (Image *) NULL)
return(MagickFalse);
ReplaceImageInList(&wand->images,blur_image);
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% MagickGetImageClipMask() gets the image clip mask at the current image index.
+% MagickGetImageMask() gets the image clip mask at the current image index.
%
-% The format of the MagickGetImageClipMask method is:
+% The format of the MagickGetImageMask method is:
%
-% MagickWand *MagickGetImageClipMask(MagickWand *wand)
+% MagickWand *MagickGetImageMask(MagickWand *wand)
%
% A description of each parameter follows:
%
% o wand: the magick wand.
%
*/
-WandExport MagickWand *MagickGetImageClipMask(MagickWand *wand)
+WandExport MagickWand *MagickGetImageMask(MagickWand *wand)
{
Image
*image;
"ContainsNoImages","`%s'",wand->name);
return((MagickWand *) NULL);
}
- image=GetImageClipMask(wand->images,wand->exception);
+ image=GetImageMask(wand->images,wand->exception);
if (image == (Image *) NULL)
return((MagickWand *) NULL);
return(CloneMagickWandFromImages(wand,image));
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- PixelSetQuantumPacket(background_color,&wand->images->background_color);
+ PixelSetPixelColor(background_color,&wand->images->background_color);
return(MagickTrue);
}
\f
%
% MagickGetImageBlob() implements direct to memory image formats. It returns
% the image as a blob (a formatted "file" in memory) and its length, starting
-% from the current position in the image sequence. Use MagickSetImageFormat()
+% from the current position in the image sequence. Use MagickSetImageFormat()
% to set the format to write to the blob (GIF, JPEG, PNG, etc.).
%
% Utilize MagickResetIterator() to ensure the write is from the beginning of
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- PixelSetQuantumPacket(border_color,&wand->images->border_color);
+ PixelSetPixelColor(border_color,&wand->images->border_color);
return(MagickTrue);
}
\f
% example, like this:
%
% channel_features=MagickGetImageFeatures(wand,1);
-% contrast=channel_features[RedChannel].contrast[0];
+% contrast=channel_features[RedPixelChannel].contrast[0];
%
% Use MagickRelinquishMemory() to free the statistics buffer.
%
% You can access the red channel mean, for example, like this:
%
% channel_statistics=MagickGetImageStatistics(wand);
-% red_mean=channel_statistics[RedChannel].mean;
+% red_mean=channel_statistics[RedPixelChannel].mean;
%
% Use MagickRelinquishMemory() to free the statistics buffer.
%
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- if ((wand->images->colormap == (PixelPacket *) NULL) ||
+ if ((wand->images->colormap == (PixelInfo *) NULL) ||
(index >= wand->images->colors))
{
(void) ThrowMagickException(wand->exception,GetMagickModule(),WandError,
"InvalidColormapIndex","`%s'",wand->name);
return(MagickFalse);
}
- PixelSetQuantumPacket(color,wand->images->colormap+index);
+ PixelSetPixelColor(color,wand->images->colormap+index);
return(MagickTrue);
}
\f
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- return(GetImageDepth(wand->images,wand->exception));
+ return(wand->images->depth);
}
\f
/*
if ((wand->images == (Image *) NULL) || (reference->images == (Image *) NULL))
ThrowWandException(WandError,"ContainsNoImages",wand->name);
status=GetImageDistortion(wand->images,reference->images,metric,distortion,
- &wand->images->exception);
+ wand->exception);
return(status);
}
\f
return((double *) NULL);
}
channel_distortion=GetImageDistortions(wand->images,reference->images,
- metric,&wand->images->exception);
+ metric,wand->exception);
return(channel_distortion);
}
\f
WandExport PixelWand **MagickGetImageHistogram(MagickWand *wand,
size_t *number_colors)
{
- PixelPacket
+ PixelInfo
*histogram;
PixelWand
return((PixelWand **) NULL);
}
histogram=GetImageHistogram(wand->images,number_colors,wand->exception);
- if (histogram == (PixelPacket *) NULL)
+ if (histogram == (PixelInfo *) NULL)
return((PixelWand **) NULL);
pixel_wands=NewPixelWands(*number_colors);
for (i=0; i < (ssize_t) *number_colors; i++)
{
- PixelSetQuantumPacket(pixel_wands[i],&histogram[i]);
+ PixelSetPixelColor(pixel_wands[i],&histogram[i]);
PixelSetColorCount(pixel_wands[i],(size_t) histogram[i].count);
}
- histogram=(PixelPacket *) RelinquishMagickMemory(histogram);
+ histogram=(PixelInfo *) RelinquishMagickMemory(histogram);
return(pixel_wands);
}
\f
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- PixelSetQuantumPacket(matte_color,&wand->images->matte_color);
+ PixelSetPixelColor(matte_color,&wand->images->matte_color);
return(MagickTrue);
}
\f
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- *x=wand->images->x_resolution;
- *y=wand->images->y_resolution;
+ *x=wand->images->resolution.x;
+ *y=wand->images->resolution.y;
return(MagickTrue);
}
\f
status=SignatureImage(wand->images,wand->exception);
if (status == MagickFalse)
return((char *) NULL);
- value=GetImageProperty(wand->images,"signature");
+ value=GetImageProperty(wand->images,"signature",wand->exception);
if (value == (const char *) NULL)
return((char *) NULL);
return(AcquireString(value));
"ContainsNoImages","`%s'",wand->name);
return(0.0);
}
- return(GetImageTotalInkDensity(wand->images));
+ return(GetImageTotalInkDensity(wand->images,wand->exception));
}
\f
/*
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if ((wand->images == (Image *) NULL) || (hald_wand->images == (Image *) NULL))
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- status=HaldClutImage(wand->images,hald_wand->images,&wand->images->exception);
+ status=HaldClutImage(wand->images,hald_wand->images,wand->exception);
return(status);
}
\f
% %
% %
% %
+% M a g i c k I n t e r p o l a t i v e R e s i z e I m a g e %
+% %
+% %
+% %
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+%
+% MagickInterpolativeResizeImage() resize image using a interpolative
+% method.
+%
+% MagickBooleanType MagickInterpolativeResizeImage(MagickWand *wand,
+% const size_t columns,const size_t rows,
+% const PixelInterpolateMethod method)
+%
+% A description of each parameter follows:
+%
+% o wand: the magick wand.
+%
+% o columns: the number of columns in the scaled image.
+%
+% o rows: the number of rows in the scaled image.
+%
+% o interpolate: the pixel interpolation method.
+%
+*/
+WandExport MagickBooleanType MagickInterpolativeResizeImage(MagickWand *wand,
+ const size_t columns,const size_t rows,const PixelInterpolateMethod method)
+{
+ Image
+ *resize_image;
+
+ assert(wand != (MagickWand *) NULL);
+ assert(wand->signature == WandSignature);
+ if (wand->debug != MagickFalse)
+ (void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
+ if (wand->images == (Image *) NULL)
+ ThrowWandException(WandError,"ContainsNoImages",wand->name);
+ resize_image=InterpolativeResizeImage(wand->images,columns,rows,method,
+ wand->exception);
+ if (resize_image == (Image *) NULL)
+ return(MagickFalse);
+ ReplaceImageInList(&wand->images,resize_image);
+ return(MagickTrue);
+}
+\f
+/*
+%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
+% %
+% %
+% %
% M a g i c k I n v e r s e F o u r i e r T r a n s f o r m I m a g e %
% %
% %
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- status=SetImageProperty(wand->images,"label",label);
- if (status == MagickFalse)
- InheritException(wand->exception,&wand->images->exception);
+ status=SetImageProperty(wand->images,"label",label,wand->exception);
return(status);
}
\f
%
% o wand: the magick wand.
%
-% o channel: Identify which channel to level: RedChannel, GreenChannel,
+% o channel: Identify which channel to level: RedPixelChannel,
+% GreenPixelChannel, etc.
%
% o black_point: the black point.
%
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
status=LevelImage(wand->images,black_point,white_point,gamma,
- &wand->images->exception);
+ wand->exception);
return(status);
}
\f
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
status=LinearStretchImage(wand->images,black_point,white_point,
- &wand->images->exception);
+ wand->exception);
return(status);
}
\f
ThrowWandException(WandError,"ContainsNoImages",wand->name);
(void) FormatLocaleString(modulate,MaxTextExtent,"%g,%g,%g",
brightness,saturation,hue);
- status=ModulateImage(wand->images,modulate,&wand->images->exception);
+ status=ModulateImage(wand->images,modulate,wand->exception);
return(status);
}
\f
% o background: the image color.
%
*/
-WandExport MagickBooleanType MagickNewImage(MagickWand *wand,
- const size_t width,const size_t height,
- const PixelWand *background)
+WandExport MagickBooleanType MagickNewImage(MagickWand *wand,const size_t width,
+ const size_t height,const PixelWand *background)
{
Image
*images;
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
PixelGetMagickColor(background,&pixel);
- images=NewMagickImage(wand->image_info,width,height,&pixel);
+ images=NewMagickImage(wand->image_info,width,height,&pixel,wand->exception);
if (images == (Image *) NULL)
return(MagickFalse);
- if (images->exception.severity != UndefinedException)
- InheritException(wand->exception,&images->exception);
return(InsertImageInWand(wand,images));
}
\f
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MagickNextImage() associates the next image in the image list with a magick
-% wand.
+% wand. It returns true if the it succeeds, meaning the current image is the
+% next image to be iterated over.
%
% The format of the MagickNextImage method is:
%
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- if (wand->pend != MagickFalse)
+ /* If current image is 'pending' just return true. */
+ if (wand->image_pending != MagickFalse)
{
- wand->pend=MagickFalse;
+ wand->image_pending=MagickFalse;
return(MagickTrue);
}
+ /* If there is no next image, (Iterator is finished) */
if (GetNextImageInList(wand->images) == (Image *) NULL)
- {
- wand->pend=MagickTrue;
return(MagickFalse);
- }
+ /* just move to next image - current image is not 'pending' */
wand->images=GetNextImageInList(wand->images);
return(MagickTrue);
}
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- status=NormalizeImage(wand->images,&wand->images->exception);
+ status=NormalizeImage(wand->images,wand->exception);
return(status);
}
\f
PixelGetMagickColor(fill,&fill_pixel);
wand->images->fuzz=fuzz;
status=OpaquePaintImage(wand->images,&target_pixel,&fill_pixel,invert,
- &wand->images->exception);
+ wand->exception);
return(status);
}
\f
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% MagickPingImage() is like MagickReadImage() except the only valid
+% MagickPingImage() is the same as MagickReadImage() except the only valid
% information returned is the image width, height, size, and format. It
% is designed to efficiently obtain this information from a file without
% reading the entire image sequence into memory.
% The format of the MagickPolaroidImage method is:
%
% MagickBooleanType MagickPolaroidImage(MagickWand *wand,
-% const DrawingWand *drawing_wand,const double angle,
+% const DrawingWand *drawing_wand,const char *caption,const double angle,
% const PixelInterpolateMethod method)
%
% A description of each parameter follows:
%
% o drawing_wand: the draw wand.
%
+% o caption: the Polaroid caption.
+%
% o angle: Apply the effect along this angle.
%
% o method: the pixel interpolation method.
%
*/
WandExport MagickBooleanType MagickPolaroidImage(MagickWand *wand,
- const DrawingWand *drawing_wand,const double angle,
+ const DrawingWand *drawing_wand,const char *caption,const double angle,
const PixelInterpolateMethod method)
{
DrawInfo
draw_info=PeekDrawingWand(drawing_wand);
if (draw_info == (DrawInfo *) NULL)
return(MagickFalse);
- polaroid_image=PolaroidImage(wand->images,draw_info,angle,method,
+ polaroid_image=PolaroidImage(wand->images,draw_info,caption,angle,method,
wand->exception);
if (polaroid_image == (Image *) NULL)
return(MagickFalse);
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- if (wand->pend != MagickFalse)
- {
- wand->pend=MagickFalse;
- return(MagickTrue);
- }
+
+ wand->image_pending=MagickFalse; /* pending status has no meaning */
+ /* If there is no prev image, return false (Iterator is finished) */
if (GetPreviousImageInList(wand->images) == (Image *) NULL)
- {
- wand->pend=MagickTrue;
return(MagickFalse);
- }
+ /* just do it - current image is not 'pending' */
wand->images=GetPreviousImageInList(wand->images);
return(MagickTrue);
}
raise_info.height=height;
raise_info.x=x;
raise_info.y=y;
- status=RaiseImage(wand->images,&raise_info,raise,&wand->images->exception);
+ status=RaiseImage(wand->images,&raise_info,raise,wand->exception);
return(status);
}
\f
char
threshold[MaxTextExtent];
- MagickBooleanType
- status;
-
assert(wand != (MagickWand *) NULL);
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
(void) FormatLocaleString(threshold,MaxTextExtent,"%gx%g",low,high);
- status=RandomThresholdImage(wand->images,threshold,wand->exception);
- if (status == MagickFalse)
- InheritException(wand->exception,&wand->images->exception);
- return(status);
+ return(RandomThresholdImage(wand->images,threshold,wand->exception));
}
\f
/*
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MagickReadImage() reads an image or image sequence. The images are inserted
-% at the current image pointer position. Use MagickSetFirstIterator(),
-% MagickSetLastIterator, or MagickSetImageIndex() to specify the current
-% image pointer position at the beginning of the image list, the end, or
-% anywhere in-between respectively.
+% jjust before the current image pointer position.
+%
+% Use MagickSetFirstIterator(), to insert new images before all the current
+% images in the wand, MagickSetLastIterator() to append add to the end,
+% MagickSetImageIndex() to place images just after the given index.
%
% The format of the MagickReadImage method is:
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
% MagickReadImageBlob() reads an image or image sequence from a blob.
+% In all other respects it is like MagickReadImage().
%
% The format of the MagickReadImageBlob method is:
%
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% MagickReadImageFile() reads an image or image sequence from an open file
-% descriptor.
+% MagickReadImageFile() reads an image or image sequence from an already
+% opened file descriptor. Otherwise it is like MagickReadImage().
%
% The format of the MagickReadImageFile method is:
%
%
% The format of the MagickSeparateImage method is:
%
-% MagickBooleanType MagickSeparateImage(MagickWand *wand)
+% MagickBooleanType MagickSeparateImage(MagickWand *wand,
+% const ChannelType channel)
%
% A description of each parameter follows:
%
% o wand: the magick wand.
%
+% o channel: the channel.
+%
*/
-WandExport MagickBooleanType MagickSeparateImage(MagickWand *wand)
+WandExport MagickBooleanType MagickSeparateImage(MagickWand *wand,
+ const ChannelType channel)
{
- MagickBooleanType
- status;
+ Image
+ *separate_image;
assert(wand != (MagickWand *) NULL);
assert(wand->signature == WandSignature);
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- status=SeparateImage(wand->images);
- if (status == MagickFalse)
- InheritException(wand->exception,&wand->images->exception);
- return(status);
+ separate_image=SeparateImage(wand->images,channel,wand->exception);
+ if (separate_image == (Image *) NULL)
+ return(MagickFalse);
+ ReplaceImageInList(&wand->images,separate_image);
+ return(MagickTrue);
}
\f
/*
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- return(SetImageAlphaChannel(wand->images,alpha_type,&wand->images->exception));
+ return(SetImageAlphaChannel(wand->images,alpha_type,wand->exception));
}
\f
/*
% %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%
-% MagickSetImageClipMask() sets image clip mask.
+% MagickSetImageMask() sets image clip mask.
%
-% The format of the MagickSetImageClipMask method is:
+% The format of the MagickSetImageMask method is:
%
-% MagickBooleanType MagickSetImageClipMask(MagickWand *wand,
+% MagickBooleanType MagickSetImageMask(MagickWand *wand,
% const MagickWand *clip_mask)
%
% A description of each parameter follows:
% o clip_mask: the clip_mask wand.
%
*/
-WandExport MagickBooleanType MagickSetImageClipMask(MagickWand *wand,
+WandExport MagickBooleanType MagickSetImageMask(MagickWand *wand,
const MagickWand *clip_mask)
{
assert(wand != (MagickWand *) NULL);
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
assert(clip_mask != (MagickWand *) NULL);
assert(clip_mask->signature == WandSignature);
- if (wand->debug != MagickFalse)
+ if (clip_mask->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",clip_mask->name);
if (clip_mask->images == (Image *) NULL)
- ThrowWandException(WandError,"ContainsNoImages",wand->name);
- return(SetImageClipMask(wand->images,clip_mask->images,wand->exception));
+ ThrowWandException(WandError,"ContainsNoImages",clip_mask->name);
+ return(SetImageMask(wand->images,clip_mask->images,wand->exception));
}
\f
/*
WandExport MagickBooleanType MagickSetImageColor(MagickWand *wand,
const PixelWand *color)
{
- MagickBooleanType
- status;
-
PixelInfo
pixel;
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
PixelGetMagickColor(color,&pixel);
- status=SetImageColor(wand->images,&pixel);
- if (status == MagickFalse)
- InheritException(wand->exception,&wand->images->exception);
- return(status);
+ return(SetImageColor(wand->images,&pixel,wand->exception));
}
\f
/*
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- if ((wand->images->colormap == (PixelPacket *) NULL) ||
+ if ((wand->images->colormap == (PixelInfo *) NULL) ||
(index >= wand->images->colors))
ThrowWandException(WandError,"InvalidColormapIndex",wand->name);
PixelGetQuantumPacket(color,wand->images->colormap+index);
- return(SyncImage(wand->images));
+ return(SyncImage(wand->images,wand->exception));
}
\f
/*
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- return(SetImageColorspace(wand->images,colorspace,&wand->images->exception));
+ return(SetImageColorspace(wand->images,colorspace,wand->exception));
}
\f
/*
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- return(SetImageDepth(wand->images,depth));
+ return(SetImageDepth(wand->images,depth,wand->exception));
}
\f
/*
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- return(SetImageExtent(wand->images,columns,rows,&wand->images->exception));
+ return(SetImageExtent(wand->images,columns,rows,wand->exception));
}
\f
/*
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
if ((wand->images->matte == MagickFalse) && (matte != MagickFalse))
- (void) SetImageAlpha(wand->images,OpaqueAlpha);
+ (void) SetImageAlpha(wand->images,OpaqueAlpha,wand->exception);
wand->images->matte=matte;
return(MagickTrue);
}
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- status=SetImageAlpha(wand->images,ClampToQuantum(QuantumRange*alpha));
- if (status == MagickFalse)
- InheritException(wand->exception,&wand->images->exception);
+ status=SetImageAlpha(wand->images,ClampToQuantum(QuantumRange*alpha),
+ wand->exception);
return(status);
}
\f
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- wand->images->x_resolution=x_resolution;
- wand->images->y_resolution=y_resolution;
+ wand->images->resolution.x=x_resolution;
+ wand->images->resolution.y=y_resolution;
return(MagickTrue);
}
\f
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
return(UndefinedVirtualPixelMethod);
- return(SetImageVirtualPixelMethod(wand->images,method));
+ return(SetImageVirtualPixelMethod(wand->images,method,wand->exception));
}
\f
/*
% The format of the MagickShadowImage method is:
%
% MagickBooleanType MagickShadowImage(MagickWand *wand,
-% const double alpha,const double sigma,const ssize_t x,const ssize_t y)
+% const double alpha,const double sigma,const double bias,
+% const ssize_t x,const ssize_t y)
%
% A description of each parameter follows:
%
%
% o sigma: the standard deviation of the Gaussian, in pixels.
%
+% o bias: the bias.
+%
% o x: the shadow x-offset.
%
% o y: the shadow y-offset.
%
*/
WandExport MagickBooleanType MagickShadowImage(MagickWand *wand,
- const double alpha,const double sigma,const ssize_t x,const ssize_t y)
+ const double alpha,const double sigma,const double bias,const ssize_t x,
+ const ssize_t y)
{
Image
*shadow_image;
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- shadow_image=ShadowImage(wand->images,alpha,sigma,x,y,wand->exception);
+ shadow_image=ShadowImage(wand->images,alpha,sigma,bias,x,y,wand->exception);
if (shadow_image == (Image *) NULL)
return(MagickFalse);
ReplaceImageInList(&wand->images,shadow_image);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
status=SigmoidalContrastImage(wand->images,sharpen,alpha,beta,
- &wand->images->exception);
+ wand->exception);
return(status);
}
\f
% The format of the MagickSimilarityImage method is:
%
% MagickWand *MagickSimilarityImage(MagickWand *wand,
-% const MagickWand *reference,RectangeInfo *offset,double *similarity)
+% const MagickWand *reference,const MetricType metric,
+% RectangeInfo *offset,double *similarity)
%
% A description of each parameter follows:
%
%
% o reference: the reference wand.
%
+% o metric: the metric.
+%
% o offset: the best match offset of the reference image within the image.
%
% o similarity: the computed similarity between the images.
%
*/
WandExport MagickWand *MagickSimilarityImage(MagickWand *wand,
- const MagickWand *reference,RectangleInfo *offset,double *similarity)
+ const MagickWand *reference,const MetricType metric,RectangleInfo *offset,
+ double *similarity)
{
Image
*similarity_image;
"ContainsNoImages","`%s'",wand->name);
return((MagickWand *) NULL);
}
- similarity_image=SimilarityImage(wand->images,reference->images,offset,
- similarity,&wand->images->exception);
+ similarity_image=SimilarityImage(wand->images,reference->images,metric,offset,
+ similarity,wand->exception);
if (similarity_image == (Image *) NULL)
return((MagickWand *) NULL);
return(CloneMagickWandFromImages(wand,similarity_image));
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- status=SolarizeImage(wand->images,threshold,&wand->images->exception);
+ status=SolarizeImage(wand->images,threshold,wand->exception);
return(status);
}
\f
*/
WandExport MagickBooleanType MagickStripImage(MagickWand *wand)
{
- MagickBooleanType
- status;
-
assert(wand != (MagickWand *) NULL);
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- status=StripImage(wand->images);
- if (status == MagickFalse)
- InheritException(wand->exception,&wand->images->exception);
- return(status);
+ return(StripImage(wand->images,wand->exception));
}
\f
/*
texture_image=CloneImage(wand->images,0,0,MagickTrue,wand->exception);
if (texture_image == (Image *) NULL)
return((MagickWand *) NULL);
- status=TextureImage(texture_image,texture_wand->images);
+ status=TextureImage(texture_image,texture_wand->images,wand->exception);
if (status == MagickFalse)
{
- InheritException(wand->exception,&texture_image->exception);
texture_image=DestroyImage(texture_image);
return((MagickWand *) NULL);
}
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- status=BilevelImage(wand->images,threshold);
- if (status == MagickFalse)
- InheritException(wand->exception,&wand->images->exception);
+ status=BilevelImage(wand->images,threshold,wand->exception);
return(status);
}
\f
transform_image=CloneImage(wand->images,0,0,MagickTrue,wand->exception);
if (transform_image == (Image *) NULL)
return((MagickWand *) NULL);
- status=TransformImage(&transform_image,crop,geometry);
+ status=TransformImage(&transform_image,crop,geometry,wand->exception);
if (status == MagickFalse)
{
- InheritException(wand->exception,&transform_image->exception);
transform_image=DestroyImage(transform_image);
return((MagickWand *) NULL);
}
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- return(TransformImageColorspace(wand->images,colorspace));
+ return(TransformImageColorspace(wand->images,colorspace,wand->exception));
}
\f
/*
PixelGetMagickColor(target,&target_pixel);
wand->images->fuzz=fuzz;
status=TransparentPaintImage(wand->images,&target_pixel,ClampToQuantum(
- QuantumRange*alpha),invert,&wand->images->exception);
+ QuantumRange*alpha),invert,wand->exception);
return(status);
}
\f
% The format of the MagickVignetteImage method is:
%
% MagickBooleanType MagickVignetteImage(MagickWand *wand,
-% const double black_point,const double white_point,const ssize_t x,
-% const ssize_t y)
+% const double radius,const double sigma,const double bias,
+% const ssize_t x,const ssize_t y)
%
% A description of each parameter follows:
%
% o wand: the magick wand.
%
-% o black_point: the black point.
+% o radius: the radius.
%
-% o white_point: the white point.
+% o sigma: the sigma.
+%
+% o bias: the bias.
%
% o x, y: Define the x and y ellipse offset.
%
*/
WandExport MagickBooleanType MagickVignetteImage(MagickWand *wand,
- const double black_point,const double white_point,const ssize_t x,const ssize_t y)
+ const double radius,const double sigma,const double bias,const ssize_t x,
+ const ssize_t y)
{
Image
*vignette_image;
(void) LogMagickEvent(WandEvent,GetMagickModule(),"%s",wand->name);
if (wand->images == (Image *) NULL)
ThrowWandException(WandError,"ContainsNoImages",wand->name);
- vignette_image=VignetteImage(wand->images,black_point,white_point,x,y,
+ vignette_image=VignetteImage(wand->images,radius,sigma,bias,x,y,
wand->exception);
if (vignette_image == (Image *) NULL)
return(MagickFalse);
char
thresholds[MaxTextExtent];
- MagickBooleanType
- status;
-
assert(wand != (MagickWand *) NULL);
assert(wand->signature == WandSignature);
if (wand->debug != MagickFalse)
QuantumFormat "," QuantumFormat "," QuantumFormat "," QuantumFormat,
PixelGetRedQuantum(threshold),PixelGetGreenQuantum(threshold),
PixelGetBlueQuantum(threshold),PixelGetAlphaQuantum(threshold));
- status=WhiteThresholdImage(wand->images,thresholds,&wand->images->exception);
- if (status == MagickFalse)
- InheritException(wand->exception,&wand->images->exception);
- return(status);
+ return(WhiteThresholdImage(wand->images,thresholds,wand->exception));
}
\f
/*
return(MagickFalse);
write_info=CloneImageInfo(wand->image_info);
write_info->adjoin=MagickTrue;
- status=WriteImage(write_info,image,&image->exception);
+ status=WriteImage(write_info,image,wand->exception);
image=DestroyImage(image);
write_info=DestroyImageInfo(write_info);
return(status);
write_info=CloneImageInfo(wand->image_info);
SetImageInfoFile(write_info,file);
write_info->adjoin=MagickTrue;
- status=WriteImage(write_info,image,&image->exception);
+ status=WriteImage(write_info,image,wand->exception);
write_info=DestroyImageInfo(write_info);
image=DestroyImage(image);
return(status);
write_info=CloneImageInfo(wand->image_info);
write_info->adjoin=adjoin;
status=WriteImages(write_info,wand->images,filename,wand->exception);
- if (status == MagickFalse)
- InheritException(wand->exception,&wand->images->exception);
write_info=DestroyImageInfo(write_info);
return(status);
}
status=WriteImages(write_info,wand->images,(const char *) NULL,
wand->exception);
write_info=DestroyImageInfo(write_info);
- if (status == MagickFalse)
- InheritException(wand->exception,&wand->images->exception);
return(status);
}