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?".
exec("convert \( *-1.png +append -flatten \) \( *-2.png +append -flatten \) \( *-3.png +append -flatten \) +append output.png 2>&1", $output, $return);
//edit
//previous one was working.
//This one is causing problem.
//Approximately, about 70 images to be loaded. But throwing that negative number and there is no ouput.
exec("convert \( *-1.png +append -flatten \) \( *-2.png +append -flatten \) \( *-3.png +append -flatten \) +append output.png 2>&1", $output, $return);
This is the single command. It fails
convert \( *-1.png +append -flatten \) tmp_1.png
convert \( *-2.png +append -flatten \) tmp_2.png
convert \( *-3.png +append -flatten \) tmp_3.png
convert tmp_1.png tmp_2.png tmp_3.png + append output.png
Multiple command and It works.
This two method produce the same output. Is there any performance difference?
In the first command, the temp images are not stored in disk. Where are they stored?
\( *-1.png +append -flatten \) - where is the result of this line stored?
Your first command is run via PHP exec()? Did you run your separate commands via PHP exec(). If not, then PHP may have limits set on memory usage that you do not get otherwise.
Performance would be slower with separate commands since you have to write and then read the tmps.