Provide Image.LoadPixelData(Type pixelFormatType, ...) API #2083
Replies: 2 comments 8 replies
-
This might be valuable, but I would like to see more justification. Can you elaborate a bit more on your use case? Is there a reason you need a dynamic pixel type descriptor and you cannot specify the pixel type at compile time with |
Beta Was this translation helpful? Give feedback.
-
@antonfirsov I am using ImageSharp to create an image stitcher. It takes multiple images and produces a new combined image. For me, I would like to see a What we have now, is asking for a
Not to elegant due to the ugly reflections
Again not to elegant, because all the if-s could be hidden inside the library. Thanks, |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello,
It would be beneficial to add overloads for
Image.LoadPixelData<TPixel>(...)
asImage.LoadPixelData(Type pixelFormatType, ...)
.Here's what someone has to go through when trying to load a
byte[]
containing raw pixel info with pixelformat as a variable (Rgba32 in the example)All this reflection should not be needed.
Thanks,
--Theodore
Beta Was this translation helpful? Give feedback.
All reactions