return((Image *) NULL);
/* Do not short-circuit this resize if final image size is unchanged */
- (void) SetImageVirtualPixelMethod(image,TransparentVirtualPixelMethod);
(void) ResetMagickMemory(distort_args,0,12*sizeof(double));
distort_args[4]=(double) image->columns;
tmp_image=CloneImage(image,0,0,MagickTrue,exception);
if ( tmp_image == (Image *) NULL )
return((Image *) NULL);
- (void) SetImageVirtualPixelMethod(tmp_image,TransparentVirtualPixelMethod);
+ (void) SetImageVirtualPixelMethod(tmp_image,TransparentVirtualPixelMethod,
+ exception);
if (image->matte == MagickFalse)
{
if ( tmp_image == (Image *) NULL )
return((Image *) NULL);
(void) SetImageVirtualPixelMethod(tmp_image,
- TransparentVirtualPixelMethod);
+ TransparentVirtualPixelMethod,exception);
resize_image=DistortImage(tmp_image,AffineDistortion,12,distort_args,
MagickTrue,exception),
tmp_image=DestroyImage(tmp_image);
exception);
(void) SetImageAlphaChannel(resize_alpha,DeactivateAlphaChannel,
exception);
- (void) CompositeImage(resize_image,CopyAlphaCompositeOp,resize_alpha,
- 0,0,exception);
+ (void) CompositeImage(resize_image,resize_alpha,CopyAlphaCompositeOp,
+ MagickTrue,0,0,exception);
resize_alpha=DestroyImage(resize_alpha);
}
- (void) SetImageVirtualPixelMethod(resize_image,vp_save);
+ (void) SetImageVirtualPixelMethod(resize_image,vp_save,exception);
/*
Clean up the results of the Distortion
}
/* Verbose output */
- if ( GetImageArtifact(image,"verbose") != (const char *) NULL ) {
+ if ( IfTrue(IsStringTrue(GetImageArtifact(image,"verbose"))) ) {
register ssize_t
i;
char image_gen[MaxTextExtent];
}
distort_image->page.x=geometry.x;
distort_image->page.y=geometry.y;
- if (distort_image->background_color.alpha != OpaqueAlpha)
+ if (distort_image->background_color.matte != MagickFalse)
distort_image->matte=MagickTrue;
{ /* ----- MAIN CODE -----
ExceptionInfo *exception)
{
Image
+ *distort_image,
*rotate_image;
MagickRealType
size_t
rotations;
- VirtualPixelMethod
- method;
-
/*
Adjust rotation angle.
*/
shear.y=sin((double) DegreesToRadians(angle));
if ((fabs(shear.x) < MagickEpsilon) && (fabs(shear.y) < MagickEpsilon))
return(IntegralRotateImage(image,rotations,exception));
- method=SetImageVirtualPixelMethod(image,BackgroundVirtualPixelMethod);
- rotate_image=DistortImage(image,ScaleRotateTranslateDistortion,1,°rees,
- MagickTrue,exception);
- method=SetImageVirtualPixelMethod(image,method);
+ distort_image=CloneImage(image,0,0,MagickTrue,exception);
+ if (distort_image == (Image *) NULL)
+ return((Image *) NULL);
+ (void) SetImageVirtualPixelMethod(distort_image,BackgroundVirtualPixelMethod,
+ exception);
+ rotate_image=DistortImage(distort_image,ScaleRotateTranslateDistortion,1,
+ °rees,MagickTrue,exception);
+ distort_image=DestroyImage(distort_image);
return(rotate_image);
}
\f
}
/* Verbose output */
- if ( GetImageArtifact(image,"verbose") != (const char *) NULL ) {
+ if ( IfTrue(IsStringTrue(GetImageArtifact(image,"verbose"))) ) {
switch (sparse_method) {
case BarycentricColorInterpolate: