-
Hi. Trying to make a background transparent. Modifying one of your samples with this: static void Main(string[] args)
{
System.IO.Directory.CreateDirectory("output");
using (Image image = Image.Load("fb.jpg"))
{
float threshold = 0.5F;
Color sourceColor = Color.FromRgb(106, 107, 99);
//Color sourceColor = Color.White;
Color targetColor = Color.Transparent;
RecolorBrush brush2 = new RecolorBrush(sourceColor, targetColor, threshold);
image.Mutate(x => x.Fill(brush2));
image.Save("output/fb.png");
}
} Not working as yet. Am I on the right track? Thanks. |
Beta Was this translation helpful? Give feedback.
Answered by
Surfrat
Jul 2, 2021
Replies: 1 comment 4 replies
-
Beta Was this translation helpful? Give feedback.
4 replies
Answer selected by
Surfrat
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I figured out a solution: