This looks to be why it wasn't working. A million thank yous!snibgo wrote: At the end, you have "-composite" with no "-compose" setting, so this will also be "Dst_Out".
The default setting of "-compose" is "Over".
Convert inside convert, want to use result of inner converts without writing to disk
-
- Posts: 93
- Joined: 2012-12-31T15:56:29-07:00
- Authentication code: 6789
Re: Convert inside convert, want to use result of inner converts without writing to disk
-
- Posts: 93
- Joined: 2012-12-31T15:56:29-07:00
- Authentication code: 6789
Re: Convert inside convert, want to use result of inner converts without writing to disk
Also can I just casually call -compose in between overall calls like so?
Code: Select all
convert \
-compose Dst_Out \
source2.png \
subsource1.png -composite \
subsource2.png -composite \
+write mpr:convert_result_1 \
+delete \
source3.png \
subsource1.png -composite \
+write mpr:convert_result_2 \
+delete \
-compose Over \
blank.png \
....\
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: Convert inside convert, want to use result of inner converts without writing to disk
Yes. You set compose to Dst_Out at the start. It remains at that setting until you change it with "-compose Over".chaoscarnage wrote:Also can I just casually call -compose in between overall calls like so?
snibgo's IM pages: im.snibgo.com
Re: Convert inside convert, want to use result of inner converts without writing to disk
OK. Then consider about your first simple case.chaoscarnage wrote: I am programmatically creating a string to call using PHP Exec() to combine a bunch of images together sometimes in a specific way.
If you just want to compose n file to background,
Code: Select all
convert background src_1 -compose over -composite tmp_1
convert tmp_1 src_2 -compose over -composite tmp_2
...
convert tmp_n-1 src_n -compose over -composite target
To remove temporary file using correct syntax. If input is 2 file,
Code: Select all
convert
\( background src_1 -compose over -composite \)
src_2
-compose over -composite
target
Code: Select all
convert
background
src_1
-compose over -composite
src_2
-compose over -composite
[...]
src_n
-compose over -composite
target
If you want to do something special for src2, your code would be like the following.chaoscarnage wrote: However, I need to go a step further and modify a couple of the images before they get added to the overall image.
Code: Select all
convert
background
src_1
-compose over -composite
\( [do something special to src_2] \)
-compose over -composite
[...]
src_n
-compose over -composite
target
Code: Select all
convert
background
src_1
-compose over -composite
\( sub2_1 sub2_2 -compose dst_over -composite \)
-compose over -composite
[...]
src_n
-compose over -composite
target