Transparency issue with composite #1721
-
My question is about the composite line. I'm trying to add a transparent png icon on top of a png image but I'm not getting transparency in the result. I also tried setting imageIcon.BackgroundColor to MagickColors.Transparent I admit I am guessing how to do it! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments
-
Next time please copy past the code and share your input images so I can reproduce it. I suspect that you will need to also include It might also be possible that you first need to enable the alpha channel with |
Beta Was this translation helpful? Give feedback.
-
Thanks for your help! Adding "CompositeOperator.Over" solved it for me. Also, I found I was able to delete the "imageIcon.BackgroundColor" assignment. I will follow your advice regarding posting guidelines next time for sure. Also, for anybody else reading I found this link helpful for concepts even though it is C++ rather than C# "https://www.imagemagick.org/Magick++/" |
Beta Was this translation helpful? Give feedback.
Next time please copy past the code and share your input images so I can reproduce it. I suspect that you will need to also include
CompositeOperator
in the arguments and find the one that works for you.It might also be possible that you first need to enable the alpha channel with
.Alpha(
in your first image.