Skip to content

How to Composite with mask.gif ? #782

Answered by dlemstra
liuhaitao827 asked this question in Help
Discussion options

You must be logged in to vote

I think you will need to use the following code. The composite command does some magic when there are 3 images involved.

using (var clone = tile_water.Clone())
{
    tile_water.Composite(tile_aqua, CompositeOperator.Undefined);
    tile_water.Composite(moon_mask, CompositeOperator.CopyAlpha);

    clone.Composite(tile_water, CompositeOperator.Over);

    clone.Write("mask_over.jpg");
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@liuhaitao827
Comment options

Answer selected by liuhaitao827
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Help
Labels
None yet
2 participants