Text with stroke Anti-aliasing (shadow) problem

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
badabou
Posts: 54
Joined: 2008-06-23T06:12:24-07:00

Text with stroke Anti-aliasing (shadow) problem

Post by badabou » 2015-02-20T03:32:55-07:00

Hi,

I have a problem when a text is generated with an stroke.

The command :

Code: Select all

convert -background "#ff0000" -fill white -strokewidth 3 -stroke "#00ff00" -size 500x100 caption:"A small test" text.png
We can see that the result is not clear :

Image

Here is the same image with a zoom :

Image

We see that the edges of text are not clean.

Looks like there was like a black shadow.

I used the last Imagemagick version.

snibgo
Posts: 10954
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Text with stroke Anti-aliasing (shadow) problem

Post by snibgo » 2015-02-20T04:30:51-07:00

That is anti-aliasing. If you don't want it, turn it off:

Code: Select all

convert -background "#ff0000" -fill white -strokewidth 3 -stroke "#00ff00" -size 500x100 +antialias caption:"A small test" text.png
snibgo's IM pages: im.snibgo.com

badabou
Posts: 54
Joined: 2008-06-23T06:12:24-07:00

Re: Text with stroke Anti-aliasing (shadow) problem

Post by badabou » 2015-02-20T06:14:21-07:00

There is a bug in Imagemagick for sure.

Here is an example with two different versions of Imagemagick with a transparent background:

Code: Select all

convert -background transparent -fill "#00ff00" -size 500x100 caption:"A small test" text.png
- The old version 6-5-9-2 (the result is good) :
Image
- With the new version 6-9-0-5 (the result is not clean) :
Image
We see that there is a problem with the text edges.

snibgo
Posts: 10954
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Text with stroke Anti-aliasing (shadow) problem

Post by snibgo » 2015-02-20T06:33:49-07:00

I can't reproduce that problem, but I'm using 6.9.0-0. Someone else might test with a newer version.
snibgo's IM pages: im.snibgo.com

badabou
Posts: 54
Joined: 2008-06-23T06:12:24-07:00

Re: Text with stroke Anti-aliasing (shadow) problem

Post by badabou » 2015-02-20T08:35:02-07:00

I just tested with version 6.9.0-0 dans there no problem.

Ultimately, it is the 6.9.0-5 version where there is a problem.

User avatar
fmw42
Posts: 24126
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Text with stroke Anti-aliasing (shadow) problem

Post by fmw42 » 2015-02-20T10:45:07-07:00

I have tested and it seems fixed in IM 6.9.0.7beta (Mac OSX SnowLeopard)

badabou
Posts: 54
Joined: 2008-06-23T06:12:24-07:00

Re: Text with stroke Anti-aliasing (shadow) problem

Post by badabou » 2015-02-21T00:32:56-07:00

Same problem with ImageMagick 6.9.0-6.

badabou
Posts: 54
Joined: 2008-06-23T06:12:24-07:00

Re: Text with stroke Anti-aliasing (shadow) problem

Post by badabou » 2015-02-21T01:11:20-07:00

Indeed, ImageMagick-6.9.0-7 beta (linux) there is no problem.

doctor_regtools
Posts: 2
Joined: 2018-06-14T09:50:02-07:00
Authentication code: 1152

Re: Text with stroke Anti-aliasing (shadow) problem

Post by doctor_regtools » 2018-06-14T09:57:01-07:00

I am getting this problem on imagemagick 6.9.7-4 (on Ubuntu)

Same test case as before

running

Code: Select all

convert -background "#ff0000" -fill white -strokewidth 3 -stroke "#00ff00" -size 500x100 caption:"A small test" text.png
gives me

Image

As you can see the 'S' and the 'a' are lower than the other letters.

User avatar
fmw42
Posts: 24126
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Text with stroke Anti-aliasing (shadow) problem

Post by fmw42 » 2018-06-14T10:09:45-07:00

I do not see this issue in IM 6.9.10.0 Q16 Mac OSX. I suggest you upgrade. 6.9.7.4 is over 200 versions old.

doctor_regtools
Posts: 2
Joined: 2018-06-14T09:50:02-07:00
Authentication code: 1152

Re: Text with stroke Anti-aliasing (shadow) problem

Post by doctor_regtools » 2018-06-15T02:05:40-07:00

OK I installed from source - so I am now running 7.0.8-1

Same issue though. Wonder if it's OS related rather than version related?

User avatar
fmw42
Posts: 24126
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Text with stroke Anti-aliasing (shadow) problem

Post by fmw42 » 2018-06-15T09:45:53-07:00

Which issue do you question? There are two above. I tried 7.0.8.0 on my Mac and the last one above about uneven baseline and it seems fixed. IM 7.0.8.1 is beta and could be undergoing some changes. So I would not trust that, yet.

Post Reply