Which object should I use to invoke 'defineValue' method?
Posted: 2015-04-14T20:14:57-07:00
Here is the problem. I have a command:
As you can see, there is a 'define' option in this command. I wrote a C++ program which let me do the same thing, but I don't know how to specify the arguments of a blend composition operation. There is a method in Magick++ library which calls 'defineValue' and it seems like it does exactly what I want. The problem is that I don't know which Image object I should use for calling this method. Which variant is correct (1-st, 2-nd or 3-rd or ...)?
And also I'm not sure about the correctness of arguments that I pass to this method.
Code: Select all
convert background.jpg source.jpg mask.jpg -compose blend -define compose:args=50,50 - composite result.jpg
Code: Select all
//code C++
Magick::Image background("background.jpg");
Magick::Image source("source.jpg");
Magick::Image mask("mask.jpg");
...
background.defineValue("compose", "args", "50,50"); // 1-st variant
// or
source.defineValue("compose", "args", "50,50"); // 2-nd variant
// or
mask.defineValue("compose", "args", "50,50"); // 3-rd variant
...