Page 1 of 1

Draw rotate bug

Posted: 2008-05-20T10:13:20-07:00
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

Re: Draw rotate bug

Posted: 2008-05-20T10:20:10-07:00
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.