Hi! Using VB Web Express 2012 & thru NuGet, added Magick.NET-Q8-AnyCPU. I extracted the UsingColors() code from Magick.NET-master samples. I then commented out the sections for Q16 (Blue) and With transparency (Red)...they won't compile with Q8. That left the code for Q8 (Green). I then added an image.Write statement after the Q8 code to put the output to a png file. Everything ran just fine....except the output image looks just the same as the input image. I was expecting a green background...but no...still white. By the way...I am using the Snakeware.png as the input image also taken from the samples code. So...the only additional code I added was the image.write. What am I missing that prevents the code from working properly & changing the background to green??? Any assistance would be greatly appreciated. Thanks!
The added statement: image.Write(ip_Path + "Colors01.png");
From .NET Samples - UsingColors() - Not Expected Result
Re: From .NET Samples - UsingColors() - Not Expected Result
The code doesn't really do anything it just demonstrates the various ways you can use colors.
Re: From .NET Samples - UsingColors() - Not Expected Result
WOW...that was a quick answer/reply. Thank You!!!
But wait....is it possible to turn that png's background from white to green???
If so...could you give me a hint on what the code would look like??
But wait....is it possible to turn that png's background from white to green???
If so...could you give me a hint on what the code would look like??
Re: From .NET Samples - UsingColors() - Not Expected Result
You can use the `Opaque` method in combination with `ColorFuzz` to change colors in an image. But that won't really work with this image because the color that you think is white is actually transparent.
Re: From .NET Samples - UsingColors() - Not Expected Result
Again....a quick reply/answer.
I found a 2-line code/solution that accomplished the background color change:
image.ColorAlpha(new MagickColor("#0f0"));
image.Write(ip_Path + "Colors01.png");
The solution was provided by you in the Stack Overflow forum in Jul 2015:
https://stackoverflow.com/questions/315 ... magick-net
The key was knowing that the background was not white...but transparent.
Thanks for your assistance & patience!!!!
I found a 2-line code/solution that accomplished the background color change:
image.ColorAlpha(new MagickColor("#0f0"));
image.Write(ip_Path + "Colors01.png");
The solution was provided by you in the Stack Overflow forum in Jul 2015:
https://stackoverflow.com/questions/315 ... magick-net
The key was knowing that the background was not white...but transparent.
Thanks for your assistance & patience!!!!