-annotate rotating text (IM 7.0.0-0)

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
User avatar
GeeMack
Posts: 718
Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA

-annotate rotating text (IM 7.0.0-0)

Post by GeeMack »

I've been using ImageMagick for several years now, and I'm migrating all my scripts to work with IM7. I installed the "ImageMagick 7.0.0-0 Q16 x64 2015-11-22" on "Windows 7 Pro 64bit" and run all my commands as command line or batch scripts in a cmd.exe window. I've noticed a change in behavior from previous versions of IM and wonder if it's a bug or a feature. Previously when I used this command...

Code: Select all

magick -size 240x240 xc:white -pointsize 24 -gravity north -annotate +60+80 "testing text" output.jpg
... the result would be the words "testing text" printed horizontally, and centered 60 pixels to the right and 80 pixels down from the top. With this newest IM7 version I enter that same command and the line of text is located north +60+80 and also rotated 60°.

So this command will rotate the text 60 degrees..

Code: Select all

magick -size 240x240 xc:white -pointsize 24 -gravity northwest -annotate +60+80 "testing text" rotated.jpg
But this command, adding the 0x0 to the annotate geometry, applies the text properly...

Code: Select all

magick -size 240x240 xc:white -pointsize 24 -gravity northwest -annotate 0x0+60+80 "testing test" straight.jpg
Is this rotating text behavior intentional, and should I modify all my "-annotate" commands in my scripts? Or is this a bug that might be repaired at some point?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: -annotate rotating text (IM 7.0.0-0)

Post by fmw42 »

I tested on IM 7 as of Nov 6, 2015 Mac OSX and get no rotation and the offsets are correct for -gravity north. This is the same result I am getting on IM 6.9.2.7 Q16 Mac OSX.

Code: Select all

im7 magick -size 240x240 xc:white -pointsize 24 -gravity north -annotate +60+80 "testing text" output.jpg
Note your first line uses -gravity north, but your other command lines use -gravity northwest. But I also get correct results from IM 6.9.2.7 using -gravity northwest.

I am compiling IM 7 from Nov 26 right now and will let you know shortly what that produces.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: -annotate rotating text (IM 7.0.0-0)

Post by fmw42 »

Are you using the default Q16 HDRI compile of IM or without HDRI?
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: -annotate rotating text (IM 7.0.0-0)

Post by fmw42 »

OK. On the IM 7 as of Nov 26, I am getting rotated test. So I confirm that there does seem to be a bug introduced since Nov 6. Right now I cannot get to http://magick.imagemagick.org/download/beta/ to see if there is a more current version of IM 7 for me to test.
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: -annotate rotating text (IM 7.0.0-0)

Post by dlemstra »

I can confirm this is a bug in ImageMagick 7. I just pushed a patch to our GIT repository to fix this.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
User avatar
GeeMack
Posts: 718
Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA

Re: -annotate rotating text (IM 7.0.0-0)

Post by GeeMack »

fmw42 wrote:Are you using the default Q16 HDRI compile of IM or without HDRI?
I occasionally update my installation of IM7 using files from this URL...

http://www.imagemagick.org/ImageMagick- ... load/beta/

... and I don't use the HDRI issue. I download and install the one that looks like this...

ImageMagick-7.0.0-0~beta20151201-Q16-x64-static.exe

Thanks to all the developers who make this stuff happen!

ETA: I see the posts where this issue has been addressed and will be resolved, but just as a note, I just installed the HDRI version, "ImageMagick-7.0.0-0~beta20151201-Q16-HDRI-x64-static.exe", and it also exhibits the same rotating text behavior.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: -annotate rotating text (IM 7.0.0-0)

Post by magick »

The source patch will be available tomorrow @ http://www.imagemagick.org/ImageMagick- ... load/beta/. The Windows 7.0.0-0 binaries will be available late this weekend.
User avatar
GeeMack
Posts: 718
Joined: 2015-12-01T22:09:46-07:00
Authentication code: 1151
Location: Central Illinois, USA

Re: -annotate rotating text (IM 7.0.0-0)

Post by GeeMack »

magick wrote:The source patch will be available tomorrow @ http://www.imagemagick.org/ImageMagick- ... load/beta/. The Windows 7.0.0-0 binaries will be available late this weekend.
I just installed "ImageMagick-7.0.0-0~beta20151205-Q16-HDRI-x64-static.exe" on the same Windows 7 Pro 64 machine, and the issue appears to be resolved. Thanks! :)
Post Reply