Returning values from ProcessPixelRows #2950
Answered
by
antonfirsov
JohnJScott
asked this question in
Q&A
-
What is the best way to return a class from ProcessPixelRows()? Something like: I've a feeling it should be quite simple, but the solution eludes me! Cheers |
Beta Was this translation helpful? Give feedback.
Answered by
antonfirsov
Jun 22, 2025
Replies: 1 comment
-
public MyThing Foo(Image<Rgba32> image)
{
MyThing? result = null;
image.ProcessPixelRows(accessor =>
{
// Your processing logic
// Make sure result is always instantiated
result = new MyThing(...);
});
return result!;
} Does this answer your question? If not, can you elaborate on it with a short code example? |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
JohnJScott
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Does this answer your question? If not, can you elaborate on it with a short code example?