How to replace a pixel of a specified color with another color #1502
-
I don't seem to have found an API to replace colors |
Beta Was this translation helpful? Give feedback.
Answered by
JimBobSquarePants
Jan 11, 2021
Replies: 2 comments 5 replies
-
Here's two ways to do it. Available on For a given pixel at position x, y // Image = Image<TPixel>
image[x, y] = ... For operating on multiple pixels on the same row. // Image = Image<TPixel>
Span<TPixel> row = image.GetPixelRowSpan(y);
row[x] = ... |
Beta Was this translation helpful? Give feedback.
2 replies
Answer selected by
JimBobSquarePants
-
@JimBobSquarePants I use the following method, but it doesn't seem to work, while mutate works normally.
|
Beta Was this translation helpful? Give feedback.
3 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here's two ways to do it. Available on
Image<TPixel>
and individual frames.For a given pixel at position x, y
For operating on multiple pixels on the same row.