246246 wrote:chaoscarnage wrote:
Makes sense. Does that mean that there needs to be some parenthesis added to get the following to work
Because of your odd usage of parenthesis (of the first post), I cannot figure it out what you want to accomplish.
It looks you have 7 input files (img.png, img_1.png, img_2.png, img_3.png, out1_1.png, out_2.png, out_3.png) and want to get 1 output file. Or you have 4 input files and want 3 output files?
I suggest If you write your code with using temporary files so as to make your output clear.
So someone can rewrite it without using temporary files.
Thank you for your time and post.
I changed the names some and have added a list of goals and have added more details to try to make it clearer what I wish to accomplish
I am programmatically creating a string to call using PHP Exec() to combine a bunch of images together sometimes in a specific way.
I want to write to the disk as little as possible to keep the process quick.
The overall goal and basic premise was to be able to combine images onto a blank image, which thanks to the help of snibgo I was able to get working.
However, I need to go a step further and modify a couple of the images before they get added to the overall image. Snibgo reccommended using mpc files to do so and after reading about them seemed like the best fit for what I stated above.
As far as how to describe how I want the code to run:
I want to load source2.png, apply subsource1 and subsource2 ONLY to source2.png using Dst_Out algorithm and then store it in memory for the overall combine to come later.
I wish to do something similar with source3 but instead I only want to apply one subsource layer to it.
Then after Ive taken care of the above I wish to combine them together with a mix of mpc and images from disk onto the blank image.
Once combined, I wish to write the result to disk and do not wish to keep the mpc files in any way after the command.
Code: Select all
convert \
source2.png \
subsource1.png -compose Dst_Out -composite \
subsource2.png -compose Dst_Out -composite \
+write mpr:convert_result_1 \
+delete \
source3.png \
subsource1.png -compose Dst_Out -composite \
+write mpr:convert_result_2 \
+delete \
blank.png \
img_1.png -composite \
mpr:convert_result_1 -composite \
mpr:convert_result_2 -composite \
everything-combined.png \
Thanks again! I am welcome to any improvements and even a different direction altogether if it helps me accomplish what I've explained above.