Draw rotate bug

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
assk

Draw rotate bug

Post by assk »

steps to reproduce:

Code: Select all

convert -size 100x100 xc:white -draw "translate 50,50 rotate 90 image over 0,0 10,10 'test.jpg'" out.jpg
"Rotate" command doesn't work, and test.jpg unchanged

Cause:

Code: Select all

      if ((draw_info->compose == OverCompositeOp) &&
          (ExpandAffine(&affine) != 1.0))
        (void) DrawAffineImage(image,composite_image,&affine);
      else
        (void) CompositeImage(image,draw_info->compose,composite_image,
          geometry.x,geometry.y);
but

Code: Select all

MagickExport double ExpandAffine(const AffineMatrix *affine)
{
  assert(affine != (const AffineMatrix *) NULL);
  return(sqrt(fabs(affine->sx*affine->sy-affine->rx*affine->ry)));
}
returns 1, so DrawAffineImage is ignored
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Draw rotate bug

Post by magick »

Thanks for the problem report. We can reproduce the problem and will have a patch in ImageMagick 6.4.1-4 Beta by tomorrow.
Post Reply