0

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();
Makla
  • 9,899
  • 16
  • 72
  • 142
  • What have you tried? What have you researched so far? Take a look at the following page for pointers on which details you might want to add to your question (https://stackoverflow.com/help/how-to-ask) as it seems a little lacking, to me – Jamie Taylor Jan 09 '18 at 09:51
  • @JamieTaylor I download source code and check anything that smells right. Special all methods with Fill keyword. – Makla Jan 09 '18 at 10:37
  • Have you checked the documentation for the library that you are using? – Jamie Taylor Jan 09 '18 at 13:38
  • It should be possible with pixel blenders after bug is fixed. More [here](https://github.com/SixLabors/ImageSharp/issues/429). – Makla Jan 14 '18 at 16:15
  • 1
    The pixel blenders bug was fixed in beta3 so you should be able to do this now using `Fill()` – James South May 02 '18 at 05:42

1 Answers1

1

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

James South
  • 10,147
  • 4
  • 59
  • 115