Search code examples
asp.net-coreimagesharp

How to paint all non-transparent pixels in ASP.NET Core


How can I paint/mask/fill all non-transparent pixels in ASP.NET Core for png image?

Currently I am using ImageSharp so solution for ImageSharp is preferred, but any solution is better then none.

using (var image = Image.Load(fileName))
{
    image.Mutate(x =>
    {
        //What now? :)
    })
}

Edited:
Basically I am asking if there is a method (which I can't find) to do that?
If not is there a method to get all non-transparent or partial transparent pixels?
And if not can I do anything else then manually check all pixels?

foreach (x)
  forecah (y)
    CheckColorAndAct();

Solution

  • The pixel blenders bug was fixed in beta3 so you should be able to do this now using Fill()