Page 1 of 1

Where is CopyOpacityCompositeOp composite operator?

Posted: 2017-04-28T06:45:43-07:00
by rpatelob
I have been using ImageMagick 7.0.5-5 Q16 x86_64 2017-04-26 http://www.imagemagick.org.
I think in previous version there is a CopyOpacityCompositeOp CompositeOperator present. But now in the latest version it's not there. check out this link. https://www.imagemagick.org/api/MagickC ... 2375b987fb

Code: Select all

// This is for version 7, it gives an error because the 3rd argument is not present.
MagickCompositeImage(wand2, wand0, CopyOpacityCompositeOp, MagickFalse, 0, 0);
// In the older version it works
MagickCompositeImage(wand2,wand0,CopyOpacityCompositeOp,0,0);
So I want to know that, is there any alternate option for this?

Re: Where is CopyOpacityCompositeOp composite operator?

Posted: 2017-04-28T07:29:44-07:00
by snibgo
"CompositeOperator" is defined in composite.h

In v6, that enum is called "CopyOpacityCompositeOp".

In v7, it is called "CopyAlphaCompositeOp".

Re: Where is CopyOpacityCompositeOp composite operator?

Posted: 2017-04-28T07:40:28-07:00
by rpatelob
snibgo wrote: 2017-04-28T07:29:44-07:00 "CompositeOperator" is defined in composite.h

In v6, that enum is called "CopyOpacityCompositeOp".

In v7, it is called "CopyAlphaCompositeOp".
Thank you snibgo, I did not know that they both are same. :D

Re: Where is CopyOpacityCompositeOp composite operator?

Posted: 2017-04-28T07:52:52-07:00
by snibgo
A good clue that they are the same is the position in the list of typedef "CompositeOperator". The v6 name is in the same position as the v7 name.

In addition: a grep search in the v6 source code finds only the v6 name, and in the v7 source code finds only the v7 name, and the names are used in corresponding places in the code.