Image
*image,
- *next,
- *region_image;
+ *next;
MagickBooleanType
status;
exception=AcquireExceptionInfo();
perl_exception=newSVpv("",0);
reference_vector=NULL;
- region_image=NULL;
number_images=0;
base=2;
if (sv_isobject(ST(0)) == 0)
region_info.height=0;
region_info.x=0;
region_info.y=0;
- region_image=(Image *) NULL;
image=SetupList(aTHX_ reference,&info,&reference_vector,exception);
if (ix && (ix != 666))
{
image=next;
SetGeometry(image,&geometry);
if ((region_info.width*region_info.height) != 0)
- {
- region_image=image;
- image=CropImage(image,®ion_info,exception);
- }
+ (void) SetImageRegionMask(image,WritePixelMask,®ion_info,exception);
switch (ix)
{
default:
}
if (next != (Image *) NULL)
(void) CatchImageException(next);
- if (region_image != (Image *) NULL)
- {
- /*
- Composite region.
- */
- status=CompositeImage(region_image,image,CopyCompositeOp,MagickTrue,
- region_info.x,region_info.y,exception);
- (void) status;
- (void) CatchImageException(region_image);
- image=DestroyImage(image);
- image=region_image;
- }
+ if ((region_info.width*region_info.height) != 0)
+ (void) SetImageRegionMask(image,WritePixelMask,
+ (const RectangleInfo *) NULL,exception);
if (image != (Image *) NULL)
{
number_images++;
{ "CopyPixels", { {"image", ImageReference}, {"geometry", StringReference},
{"width", IntegerReference}, {"height", IntegerReference},
{"x", IntegerReference}, {"y", IntegerReference},
- {"gravity", MagickGravityOptions}, {"offset", StringReference},
+ {"gravity", MagickGravityOptions}, {"offset", StringReference},
{"dx", IntegerReference}, {"dy", IntegerReference} } },
{ "Color", { {"color", StringReference} } },
{ "WaveletDenoise", { {"geometry", StringReference},
- {"threshold", RealReference}, {"softness", RealReference},
+ {"threshold", RealReference}, {"softness", RealReference},
{"channel", MagickChannelOptions} } },
{ "Colorspace", { {"colorspace", MagickColorspaceOptions} } },
{ "AutoThreshold", { {"method", MagickAutoThresholdOptions} } }
Image
*image,
- *next,
- *region_image;
+ *next;
MagickBooleanType
status;
exception=AcquireExceptionInfo();
perl_exception=newSVpv("",0);
reference_vector=NULL;
- region_image=NULL;
number_images=0;
base=2;
if (sv_isobject(ST(0)) == 0)
region_info.height=0;
region_info.x=0;
region_info.y=0;
- region_image=(Image *) NULL;
image=SetupList(aTHX_ reference,&info,&reference_vector,exception);
if (ix && (ix != 666))
{
image=next;
SetGeometry(image,&geometry);
if ((region_info.width*region_info.height) != 0)
- {
- region_image=image;
- image=CropImage(image,®ion_info,exception);
- }
+ (void) SetImageRegionMask(image,WritePixelMask,®ion_info,exception);
switch (ix)
{
default:
flags=ParsePageGeometry(image,argument_list[0].string_reference,
&geometry,exception);
if ((flags & PercentValue) != 0)
- {
+ {
geometry.x*=(double) image->columns/100.0;
geometry.y*=(double) image->rows/100.0;
}
}
if (next != (Image *) NULL)
(void) CatchImageException(next);
- if (region_image != (Image *) NULL)
- {
- /*
- Composite region.
- */
- status=CompositeImage(region_image,image,CopyCompositeOp,MagickTrue,
- region_info.x,region_info.y,exception);
- (void) status;
- (void) CatchImageException(region_image);
- image=DestroyImage(image);
- image=region_image;
- }
+ if ((region_info.width*region_info.height) != 0)
+ (void) SetImageRegionMask(image,WritePixelMask,
+ (const RectangleInfo *) NULL,exception);
if (image != (Image *) NULL)
{
number_images++;