Syntax problem

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
Posts: 12
Joined: 2017-11-02T22:53:16-07:00
Authentication code: 1152

Syntax problem

Post by pchun » 2018-02-01T07:47:03-07:00

I am playing a bit with different examples from IM documentation and keep encountering a problem with all examples where this style of syntax is present (example directly copied from documentation)

Code: Select all

convert zelda_text.jpg   \( zelda_text_mask.gif -background white -alpha shape \) -flatten zelda_mask_overlay.jpg
Such commands always fail with unable to open image "\("
Where am I wrong?
My IM is 7.0.3 Q16

Posts: 79
Joined: 2013-02-07T08:22:57-07:00
Authentication code: 6789

Re: Syntax problem

Post by holden » 2018-02-01T07:55:07-07:00

IM generally doesn't like extra spaces, try something like this:
convert zelda_text.jpg \(zelda_text_mask.gif -background white -alpha shape \) -flatten zelda_mask_overlay.jpg

could be the backslashes too, not sure though since I don't use them like this

Posts: 2911
Joined: 2006-05-20T08:08:19-07:00
Location: Cambridge, England

Re: Syntax problem

Post by Bonzo » 2018-02-01T08:47:48-07:00

Are you using windows or Linux?

You do not need to escape the ( ) on windows and it will fail if you do.

Also replace convert with magick in version 7

Post Reply