If you're building a string using @ASSIGN then use @SQ and/or @DQ for
escaping the quotes



On Wed, Apr 18, 2012 at 4:48 AM, Wayne Irvine <[email protected]>wrote:

> I'm using ImageMagick to resize uploaded images through Terascript. I have
> a simple BASH script that accepts and argument which is a string that
> specifies the source file, what to do with it, and the target file. Works
> ok!
>
> Now I want to create images. This is to implement a 'biological detection'
> system, or CAPTCHA. So I will create a string, then create an image from
> the string complete with distortion and noise so that it requires a human
> to interpret it. To do this I need to use the ImageMagick Convert
> application and pass to it some arguments like -draw. Easy enough. But then
> I need to pass the string and some cartesian arguments. This is where the
> problems come in. The string and arguments need to be quoted, and it
> appears this is what I am having trouble with.
>
> The ImageMagick command to create and image of some text is:
>
> convert -size 320x85 canvas:none -font Helvetica -pointsize 72  -draw
> 'text 25,60 "It works"' -channel RGBA -blur 0x6 -fill darkred -stroke
> magenta  -draw 'text 20,55 "It works"' outputfile.jpg
>
> If I enter this into the Terminal it creates an image.
>
> However, if I pass this argument to my BASH script using the Command Line
> action it doesn't work. I expect this is to do with escaping the ' and "
> but can't seem to find any clues as to what to do.
>
> Any help would be appreciated.
>
> Wayne Irvine
>
> ----------------------------------------
>
> To unsubscribe from this list, please send an email to
> [email protected] with "unsubscribe terascript-talk" in the body.
>
>


----------------------------------------

To unsubscribe from this list, please send an email to [email protected] 
with "unsubscribe terascript-talk" in the body.

Reply via email to