How to read a byte array with MagickFormat.Gray? #1451
Unanswered
kmgallahan
asked this question in
Help
Replies: 1 comment 3 replies
-
You should use the |
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
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to create a MagickImage from a byte array that is of the format
MagickFormat.Gray
.I always get this error:
It's unclear to me how, what, or where the size is supposed to come from.
I've tried many variations of this pseudo-code without luck:
If I exclude MagickFormat.Gray on the create/read operation, then I get this:
Best I've found so far is:
Additional context: just trying to read an image, make it grayscale (single channel image), pass it elsewhere for processing as a byte array, get back the results, and read it in.
I started with a
Span<byte>
s but that wasn't working either, so tried out the array.Beta Was this translation helpful? Give feedback.
All reactions