[HELP] Strokewidth always thin with Label

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
redna379
Posts: 25
Joined: 2007-02-22T21:11:40-07:00

[HELP] Strokewidth always thin with Label

Post by redna379 »

Hello to everyone.
I'm writing here before going completely mad.

I'm using IM 6.3.0 11/22/06

This command:

convert -background none -font "/blabla/104.ttf" -pointsize 72 -strokewidth 10 -fill "rgba(0,0,0,1)" -stroke "rgba(255,0,0,1)" -gravity west label:"testing!" -trim +repage test.png

ALWAYS gives me a 1px stroke only.
But, if a thin red line is shown, then stroke IS understood by the label command.
I need to use label because this is part of a PHP generator, so i cannot set any size. I simply need the text to take all the space it needs, and for this label seems to be the only way.

But what am i doing wrong? Why strokewidth is completely ignored?

Plz help, 4:45 AM here and it's 5 hours i'm trying to find a solution.

Thanks in advance.
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: [HELP] Strokewidth always thin with Label

Post by anthony »

this was fixed with one of the recent point releases. Download the latest IM v3.2.0

WARNING: your stroke width is so large the 'filled' area is completely overwritten by the thick border. At least on the fonts I used. I have no idea if this will be the case with your '104' font, but it is likely.

Using a stroke on label does not provide you an opportunely to re-add the filled area on top of it as you can using -annotate or -draw.
For some examples of doing t properly see IM Examples, Compound Fonts, Thick Stroke... http://www.imagemagick.org/Usage/fonts/#thick_stroke
Also the later Doubled outline and Psychedelic Font.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
redna379
Posts: 25
Joined: 2007-02-22T21:11:40-07:00

Re: [HELP] Strokewidth always thin with Label

Post by redna379 »

Thank you very much, Anthony, problem solved!
BTW, thank you also for you great site, it's my primary source for IM!

Yes, i know my stroke width is so large in the example i posted, but i did that just to check.
About why i'm using lables, this is because i need to do many strange things that labels helps to do.
The project is nearly finished, when done i'll send you the link in some way.
It's an online designer, all based on IM powers.

Thank you again!
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Re: [HELP] Strokewidth always thin with Label

Post by anthony »

Your welcome.

Any particular ideas, methods or techniaues you would like to pass on to the IM community in way of thanks?
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
redna379
Posts: 25
Joined: 2007-02-22T21:11:40-07:00

Re: [HELP] Strokewidth always thin with Label

Post by redna379 »

Of course, there are many.
I plan to finish the bigger part of the project in some weeks.
Then i'll PM you to show what i did: as i used many different things/techs, something useful will surely be there.

Then, if you'll see some result that may look interesting for the community, i'll be glad to provide infos/tuts to be added somewhere (in this forum of on your site).

Will contact you soon, thank you once more!
Post Reply