-composite with spacekey
-composite with spacekey
I need the -composite command with space. How do I that?
Re: -composite with spacekey
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.
/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.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: -composite with spacekey
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?
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
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.
I use PHP yes.
It copy the pics in a file. These file is a Galleryname. And the galleryname can have spaces.
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: -composite with spacekey
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
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.