Where is CopyOpacityCompositeOp composite operator?

The MagickWand interface is a new high-level C API interface to ImageMagick core methods. We discourage the use of the core methods and encourage the use of this API instead. Post MagickWand questions, bug reports, and suggestions to this forum.
Post Reply
rpatelob
Posts: 62
Joined: 2017-04-17T22:17:01-07:00
Authentication code: 1151

Where is CopyOpacityCompositeOp composite operator?

Post 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?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Where is CopyOpacityCompositeOp composite operator?

Post by snibgo »

"CompositeOperator" is defined in composite.h

In v6, that enum is called "CopyOpacityCompositeOp".

In v7, it is called "CopyAlphaCompositeOp".
snibgo's IM pages: im.snibgo.com
rpatelob
Posts: 62
Joined: 2017-04-17T22:17:01-07:00
Authentication code: 1151

Re: Where is CopyOpacityCompositeOp composite operator?

Post 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
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Where is CopyOpacityCompositeOp composite operator?

Post 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.
snibgo's IM pages: im.snibgo.com
Post Reply