I'm trying add a copyright message to photographs I upload using convert. I'm having trouble with the syntax or quotes. Please help or have ideas?

exec("$magic/convert -font Arial -fill White -pointsize 10 -gravity SouthEast -draw 'text 10,10 © Copyright Mike Dantignac Photography' $full/$filename $full/$filename");

    Gives me

    Parse error: syntax error, unexpected T_STRING

      You're going to have to escape the double quotes since the whole string is in double quotes ala:

      $string = "this is my \"string\" with escaped double quotes";

      And I'm not so sure about that copyright symbol (in the string). I think legally this is all you need:

      Copyright <year> My Name. All Rights Reserved.

        This is what I got going on now. It returns a "1", and it doesn't save anything.

         exec("$magic/convert -font arial -fill white -pointsize 10 -gravity southeast -draw 'text 10,10 \"Copyright Mike Dantignac Photography\"' $full/$filename $full/$filename", $array, $status);

          Fun eh, that's why I like the GD funcs. If I use convert its on my local box and then I upload the images I created.

          Did you read http://us2.php.net/manual/en/function.exec.php to make sure there is no problem w/ 'safe mode' on your server?

          what does print_r($array) say after the exec()?

          What about naming the output file a different name than the input file (at least for testing).

            Write a Reply...