Page 1 of 1

[Resolved]possible bug annotate with negative rotations

Posted: 2018-10-19T12:19:30-07:00
by fmw42
IM 6.9.10.12 Q16 Mac OSX Sierra

I tried using negative values for the rotation in -annnotate. It did the rotation but the text was offset badly.

-annotate -10x-10+${xoff}+"${off}

However, converting to positive rotations works fine as

-annotate 350x350+${xoff}+"${off}

Compare these two results:

Code: Select all

convert logo: -fill red -pointsize 64 -font arial -annotate 350x350+320+240 'testing' test1.jpg

Code: Select all

convert logo: -fill red -pointsize 64 -font arial -annotate -10x-10+320+240 'testing' test2.jpg

If this is not a bug, then the documentation for -annotate should be modified to say that negative rotations are not allowed.

The documentation says:
Using -annotate degrees or -annotate degreesxdegrees produces an unsheared rotation of the text. The direction of the rotation is positive, which means a clockwise rotation if degrees is positive. (This conforms to the usual mathematical convention once it is realized that the positive y–direction is conventionally considered to be downward for images.)
But it is not really clear if that means only positive values are allowed.

Re: possible bug annotate with negative rotations

Posted: 2018-12-28T13:45:43-07:00
by fmw42
In IM 6.9.10.20 Mac OSX Sierra, the first command above is working fine. But the second command, thought rotating properly now, is not offset properly. So there is still a bug here. The two commands should give exactly the same results and they do not.

Re: possible bug annotate with negative rotations

Posted: 2018-12-29T06:19:38-07:00
by magick
Thanks for the problem report. We can reproduce it and will have a patch to fix it in GIT master branch @ https://github.com/ImageMagick/ImageMagick later today. The patch will be available in the beta releases of ImageMagick @ https://www.imagemagick.org/download/beta/ by sometime tomorrow.

Re: possible bug annotate with negative rotations

Posted: 2018-12-29T17:21:25-07:00
by fmw42
Thanks. This seems to be fixed in IM 6.9.10.22 beta and IM 7.0.8.22 beta.