Specials characters under MS windows

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
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

See http://www.cit.gu.edu.au/~anthony/graph ... k/#windows
When you have an example it would be useful to send it to me so I can include it in that section. I am NOT a windows user so have to relay on others for this part.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
el_supremo
Posts: 1015
Joined: 2005-03-21T21:16:57-07:00

Post by el_supremo »

I couldn't get %f to work with the text subcommand of "draw" (even when I added a coordinate after the text subcommand). But I could get it to work with the annotate command. You also have to put two percents in the string so that DOS doesn't interpret %f as a variable name.

Try a command like this:

Code: Select all

mogrify -size 600x400 -font Arial -pointsize 20 -gravity east -fill black -annotate +0+0 "Name of the file : %%f" logo1.jpg
You'll have to play with the coordinates +0+0 to put the text where you want it.

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

Post by anthony »

Escapes and newlines are no longer usable from -draw text, as it interfers with IM's handling of SVG images. Annotate is the correct way of 'drawing' these complexities.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
User avatar
anthony
Posts: 8883
Joined: 2004-05-31T19:27:03-07:00
Authentication code: 8675308
Location: Brisbane, Australia

Post by anthony »

I am glad it is now working for you..

Just to recap..
Escapes and newlines are no longer usable from -draw text, as it interfers with IM's handling of SVG images. Annotate is the correct way of 'drawing' these complexities.


Also from Im Examples, Text to Image, Draw...
As of IM version 6.2.4, the "-draw text" operation no longer understands the use of '\n' as meaning newline, or the use of percent '%' image information escapes. (See Drawing a Percent Bug).
These abilities, and problems, however remain available in the new IM v6 operator "-annotate". See the Annotate Text Drawing Operator below.


I also meantion this in the 'Percent Bug' page, and in other places in IM examples. Look for the special '!' warning notes for version differences and additions.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
Post Reply