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?".
I was able to solve the difference problem using pixel level values in C++, but after Anthony mentioned use of composite command for the same, I've been trying to figure out how I could do that in C++. I've tried the following :
But this places the difference btw backframe and inframe over backframe. I was looking at getting just the difference into a new image. Is there a way around this?
Thanks for that quick reply. Like you said, I tried making a clone of the backframe image. I was not able to do it using CloneImage(), so I instead copied the pixels of backframe into an image called cloneback. But how do I proceed from there?
Sorry to keep returning wih the same question again. But after cloning and using the new image, I still seem to get the esults into this new image. All I want is the difference between two images and the results as a new image by itself. The composite function seems to overwrite on the exsisting image pixels. I'm doing something wrong, and am not able to figure what.
the composite function will always overwrite the destination image, that is is job.
If you want to keep the original destination image, you have two choices, either make a clone of that image, or read/create that image again.
The result shows the original "image1.jpg". I was hoping it would be a "blank" image as the difference is "0". If that's not what Composite does, could you please tell me what will.