Replies: 1 comment 1 reply
-
You could do something like this to access individual pixels: using (var image = new MagickImage(fileName))
{
// or use image.GetPixelsUnsafe() that is faster but has no bounds checking
using (var pixels = image.GetPixels())
{
for (var y = 0; y < image.Height; y++)
{
for (var x = 0; x < image.Width; x++)
{
var pixel = pixels.GetPixel(x, y);
// Change pixel here
pixels.SetPixel(pixel);
}
}
}
} |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I am very new to magickImage, I only use it for a personal project.
I use it to splice images, but I also need to change the color of an image.
I have the idea of taking each pixel of the image, compare if the alpha channel is greater than 0 and put a color depending on the value of the alpha channel.
I would need to know how to get the color out of a pixiel and how to change its color.
thank you
Beta Was this translation helpful? Give feedback.
All reactions