I've found that when I am attempting to do a stroke on text, the stroke color overlaps the fill color and makes my text look choppy and ugly. Here is the command I am using:
convert -background none -fill black -font /usr/share/fonts/TrueType/times.ttf \
+pointsize +antialias -gravity center -size 800x100 \
-stroke white -undercolor none \
caption:'ImageMagick is free software delivered as a ready-to-run binary distribution or as source code that you may freely use, copy, modify, and distribute. Its license is compatible with the GPL. It runs on all major operating systems.' \
out.png
I would appreciate any help or suggestions you might be able to offer.
Thanks
Stroke overlaps the text
Re: Stroke overlaps the text
This works for me; I have used a different font, added a font size and changed the stroke colour so it stands out on my page
I think the problem was the +antialias
Code: Select all
convert -size 800x100 -background none -fill black -stroke blue -strokewidth 1 -pointsize 20 -font verdana.ttf -gravity center caption:"ImageMagick is free software delivered as a ready-to-run binary distribution or as source code that you may freely use, copy, modify, and distribute. Its license is compatible with the GPL. It runs on all major operating systems." out1.png
Re: Stroke overlaps the text
Yeah, the problem is I need the antialiasing off. My need is for a solid text without any of the dispersion or faded edges.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Stroke overlaps the text
The outside edge, or both edges of the stroke?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: Stroke overlaps the text
I'm wanting a solid inside with just a single pixel outline. I've been able to fake it by writing the text four times with an offset of 1 pixel in each direction and then writing the text once in the center. This works and does what I want but it takes a lot longer to process than I would think this feature should.
-Doug
-Doug
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: Stroke overlaps the text
You can draw the image twice, once with a stroke color and strokewidth of say 2, and again without those options.
It is a bit like http://imagemagick.org/Usage/fonts/#thick_stroke but using a thiner initial stroke width.
You ware talking about anti-aliasing before, do you want a smooth anti-aliased stroke, or a aliased (two color only) stroke?
You could try using the options
+antialias -fill white -stroke black -strokewidth .5
though the line does not look very smooth due to the aliasing (staircase) effects.
It is a bit like http://imagemagick.org/Usage/fonts/#thick_stroke but using a thiner initial stroke width.
You ware talking about anti-aliasing before, do you want a smooth anti-aliased stroke, or a aliased (two color only) stroke?
You could try using the options
+antialias -fill white -stroke black -strokewidth .5
though the line does not look very smooth due to the aliasing (staircase) effects.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/