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)
{
}
else
{
- ChannelType
- channel_mask;
-
Image
*resize_alpha;
distort alpha channel separately
*/
- channel_mask=SetPixelChannelMask(tmp_image,AlphaChannel);
- (void) SeparateImage(tmp_image,exception);
- SetPixelChannelMapMask(tmp_image,channel_mask);
+ (void) SetImageAlphaChannel(tmp_image,ExtractAlphaChannel,exception);
(void) SetImageAlphaChannel(tmp_image,OpaqueAlphaChannel,exception);
resize_alpha=DistortImage(tmp_image,AffineDistortion,12,distort_args,
MagickTrue,exception),
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,CopyOpacityCompositeOp,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 ( IfMagickTrue(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 -----
UndefinedVirtualPixelMethod,MagickFalse,exception);
distort_view=AcquireCacheView(distort_image);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
- #pragma omp parallel for schedule(dynamic,4) shared(progress,status)
+ #pragma omp parallel for schedule(static,4) shared(progress,status)
#endif
for (j=0; j < (ssize_t) distort_image->rows; j++)
{
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);
+ if (IsGrayColorspace(image->colorspace) != MagickFalse)
+ (void) TransformImageColorspace(distort_image,sRGBColorspace,exception);
+ (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 ( IfMagickTrue(IsStringTrue(GetImageArtifact(image,"verbose"))) ) {
switch (sparse_method) {
case BarycentricColorInterpolate:
progress=0;
sparse_view=AcquireCacheView(sparse_image);
#if defined(MAGICKCORE_OPENMP_SUPPORT)
- #pragma omp parallel for schedule(dynamic,4) shared(progress,status)
+ #pragma omp parallel for schedule(static,4) shared(progress,status)
#endif
for (j=0; j < (ssize_t) sparse_image->rows; j++)
{