Caption text printing with quotes

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
almighty
Posts: 2
Joined: 2019-01-25T04:25:31-07:00
Authentication code: 1152

Caption text printing with quotes

Post by almighty »

Hi,

I'm on a RedHat 7.5 Linux server.

The use of caption while composing an image is working well, except that I have a weird behaviour:
- caption: 'My caption text'
is printing on the image -> 'My caption text' (Note the surrounding quotes)
- caption: "My caption text"
is printing on the image -> "My caption text"
- caption: My caption text
is printing on the image -> My

(I successfully had the right behaviour with the last option by replacing all whitespaces by '\u00A0' unicode char, but with losing the caption capability of breaking string between words for multilines)

I googled this problem for hours to know if someone else had the same behaviour, with no success.

Do someone have an idea for getting rid of this unwanted resulting quotes?
Thanks!
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Caption text printing with quotes

Post by snibgo »

What version of IM? What is your exact command? You seem to have a space after the colon, which would create problems.

I assume you are using bash.

"caption:" works fine for me. If your version of IM is old, try an upgrade.
snibgo's IM pages: im.snibgo.com
almighty
Posts: 2
Joined: 2019-01-25T04:25:31-07:00
Authentication code: 1152

Re: Caption text printing with quotes

Post by almighty »

Thanks for your reply.

By command line, the problem was that the parenthesis had to be in the following format -> "(" instead of (

I already got problem executing it with java. For those who have the same problem:
Process p = Runtime.getRuntime().exec(command); //not working
replaced by
ProcessBuilder pb = new ProcessBuilder(commandArray); pb.start();
with proper separation of the command parameters. Ex of the array: "convert", "-size", "120x120, etc.

This post is [SOLVED] (but I don't now how to set it properly)
Post Reply