[Solved] Annotation suddenly looks weird without change of command

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
Post Reply
Sinaf
Posts: 4
Joined: 2017-07-23T14:02:38-07:00
Authentication code: 1151

[Solved] Annotation suddenly looks weird without change of command

Post by Sinaf »

First things first: ImageMagick 6.8.9-9 Q16 arm 2017-07-15 on ARMBIAN 5.31

I have been running the following command to annotate a webcam picture that gets pulled every 10 minutes. This has been working fine for more than a year.

Code: Select all

convert webcam0.jpg -font 'Inconsolata' -pointsize 28 -gravity SouthWest -stroke black -strokewidth 3 -annotate +35+5 'www.websitename.de' -stroke none \
-fill white -annotate +35+5 'www.websitename.de' -gravity South -stroke black -strokewidth 3 -annotate +0+5 "$TIME" -stroke none -fill white \
-annotate +0+5 "$TIME" -gravity SouthEast -stroke black -strokewidth 3 -annotate +35+5 "ca. $TEMP°C | $HUM%" \
-stroke none -fill white -annotate +35+5 "ca. $TEMP°C | $HUM%" webcam1.jpg
Since a couple of days, however, this is how the annotation is displayed:
Image

It might have something to do with the last update (15.07.), but I'm not completely sure.
Can someone point me in the right direction on how to solve this mess. Thanks in advance.
Last edited by Sinaf on 2017-07-27T14:27:32-07:00, edited 1 time in total.
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Annotation suddenly looks weird without change of command

Post by snibgo »

I can't see an obvious problem. But you are annotating an image webcam0.jpg that you haven't shown us, with variables you haven't shown. Please provide a reproducible example.
snibgo's IM pages: im.snibgo.com
Sinaf
Posts: 4
Joined: 2017-07-23T14:02:38-07:00
Authentication code: 1151

Re: Annotation suddenly looks weird without change of command

Post by Sinaf »

For the sake of testing I have set the TEMP and HUM variables manually.

Code: Select all

TIME=$(date +"%H:%M:%S am %d.%m.%y")

TEMP="30.0"
HUM="50.0"
Also for testing purposes I have used this grey image, so it is easier to spot the "error".

This is the complete image after the command from my first post:
Image
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: Annotation suddenly looks weird without change of command

Post by magick »

It must be related to the upgrade. We're using ImageMagick 7.0.6-4 and getting expected results.
Sinaf
Posts: 4
Joined: 2017-07-23T14:02:38-07:00
Authentication code: 1151

Re: Annotation suddenly looks weird without change of command

Post by Sinaf »

This is no "angry customer story". I have used ImageMagick for a long time and I have been very happy with it. I tried to upgrade through backports, but there wasn't a newer version available. In hindsight, I should have tried downgrading to the previous version. Oh well, I eventually ended up trying GM and made it work this way.

Thanks for your help, and should the occasion arise, I'll definitely give IM another try.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: [Solved] Annotation suddenly looks weird without change of command

Post by fmw42 »

I tested your command with IM 6.9.9.3 Q16 Mac OSX and changed fonts to Arial. I did not have your font. It works fine for me. So perhaps all you need to do is upgrade to a more current version of Imagemagick. Your version of ImageMagick (6.8.9.9) is nearly 100 versions old.
Sinaf
Posts: 4
Joined: 2017-07-23T14:02:38-07:00
Authentication code: 1151

Re: [Solved] Annotation suddenly looks weird without change of command

Post by Sinaf »

Well, that's the thing with Debian. Sure, I could compile the latest release from source, and it would probably work again. The downside is that I then have to make sure to keep it up-to-date separately. By sticking to the (old) versions in my package manager I don't have worry about that.

I appreciate your help, though.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: [Solved] Annotation suddenly looks weird without change of command

Post by fmw42 »

It looks like this user has the same issue. viewtopic.php?f=3&t=32406

My guess is that your Linux distribution may be patched with a buggy version of ImageMagick or was not patched properly.
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: [Solved] Annotation suddenly looks weird without change of command

Post by fmw42 »

I tested your command on IM 6.8.9.9 Q16 Mac OSX with your font and it works fine for me.
Post Reply