Page 1 of 1

-composite with spacekey

Posted: 2015-07-02T05:18:29-07:00
by Darknet
I need the -composite command with space. How do I that?

Re: -composite with spacekey

Posted: 2015-07-02T06:59:38-07:00
by snibgo
I don't understand the question.

Re: -composite with spacekey

Posted: 2015-07-02T08:48:52-07:00
by Darknet
I use from imagemagicx these Command:

/usr/bin/convert converting/size-0.jpg -quality 100% converting/logosafe/" . $piclog . " -gravity SouthEast -geometry +" . $pos . "+" . $pos . " -composite " . $gallerie . "/'" . $pic . "'"



If in the String oft he Varaiable $gallerie a space blank –composite does not work.

If the space blank a _ it works. But it must work with a space blank.

Re: -composite with spacekey

Posted: 2015-07-02T08:51:49-07:00
by fmw42
What version of IM and platform are you using? What is the interface -- PHP exec()? Perhaps this is an interface issue with quoting.

Why must it work with a space in " -composite "?

In any case, I do not think a space should make any problems inside a quote when parsed to the IM command line.

Should you not have spaces between . and " rather than in the quotes?

Re: -composite with spacekey

Posted: 2015-07-02T09:01:17-07:00
by Darknet
Version: ImageMagick 6.8.9-9 Q16 i686 2014-11-05

I use PHP yes.

It copy the pics in a file. These file is a Galleryname. And the galleryname can have spaces.

Re: -composite with spacekey

Posted: 2015-07-02T09:02:38-07:00
by fmw42
Filenames with spaces in them should be enclosed in double quotes. Try using "$gallerie" rather than $gallerie. If that does not work, check your variable $gallery to see that it does have all of the filename and and not just the first word.

Re: -composite with spacekey

Posted: 2015-07-06T07:36:20-07:00
by canavan
If the gallery name is provided by the user in any way, this is a potential security problem. You may have to use escapeshellarg() on all arguments for which you are not absolutely certain that they don't contain characters that may be unsafe in the shell. Using imagick (http://php.net/manual/en/book.imagick.php) may be a better option.