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?".
This is a bash scripting problme in that quotes stored in variables are not parsed by the shell (quote parsing is already done when variables are substituted).
You will need to either use a bash array for each argument, or use and 'eval' to get the shell to parse the result a second time.
WARNING; using eval is dangerous as it provides many ways for crackers to break into your script if used publically (from the web). That does not mean you can not use it, it means you need a deep understanding of its use and dangers, and a through parsing of inputs into the program, though that is something that should be done for any online program regardless!!!
Of course as you are using display the web is not an option, but if it is for a public 'kiosk' terminal, then you still need to watch out.