Page 1 of 1

how i could combine this two command into one ?

Posted: 2019-04-30T11:31:49-07:00
by diegomage
im trying to combine this two command into one but i dont know
for generate one image instead of two image result

Code: Select all

convert fragresultc.png  -fill white   +opaque "$zv"  -negate  resuxxlt.png 
  convert  image2.png  -mask resuxxlt.png         -fill white   +opaque white +mask rose_blue.png

please help me

Re: how i could combine this two command into one ?

Posted: 2019-04-30T12:10:10-07:00
by GeeMack
diegomage wrote:
2019-04-30T11:31:49-07:00
im trying to combine this two command into one but i dont know for generate one image instead of two image result

Code: Select all

convert fragresultc.png  -fill white   +opaque "$zv"  -negate  resuxxlt.png 
  convert  image2.png  -mask resuxxlt.png         -fill white   +opaque white +mask rose_blue.png
At the place in the command where you save the first image to a file, you can write it to an ImageMagick memory register instead. Do that with "-write mpr:result". Then when you need it later in the command you bring it back in by the name of that MPR. Here's the general idea in *nix syntax...

Code: Select all

convert fragresultc.png -fill white +opaque "$zv" -negate \
   -write mpr:result +delete image2.png -mask mpr:result \
   -fill white +opaque white +mask rose_blue.png
After you write that first image to the MPR, it's in a memory location that exists only for the duration of the command. That way you can delete it from the ongoing command until you need it again. Then call it back in with "mpr:result" and continue just as if you're into the second command.

The MPR can have any name you want to give it like "mpr:stage1" or "mpr:opaque" or whatever. You can even write to and recall several MPR images within a single command.

Re: how i could combine this two command into one ?

Posted: 2019-04-30T12:21:35-07:00
by diegomage
works perfect , very thankyou for your help