Why is the image type obtained by loading a grayscale image using Image<L8>.Load in Rgba32 format? How can I obtain the actual data format? #3053
-
Prerequisites
ImageSharp version3.119.1 Other ImageSharp packages and versions3.119.1 Environment (Operating system, version and so on)window10 .NET Framework version.NET10 DescriptionI hope to obtain the true grayscale image format, as my image size is too large(1G). However, after loading through ImageSharp, the image has been converted to RGBA32 format, resulting in a significant increase in memory usage Steps to Reproduce
ImagesNo response |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 5 replies
-
|
I’ve converted this into a discussion. Issues are for defects only. What you are describing is fundamentally impossible. The |
Beta Was this translation helpful? Give feedback.
-
|
Sorry, I wrote the wrong version number for ImageSharp. The correct version number is 3.1.12. The image type I see with ImageJ is 8-bit, but the type loaded by ImageSharp is actually Rgba32 |
Beta Was this translation helpful? Give feedback.

your calling the wrong API
you want
Image.Load<L8>(filename)notImage<L8>.Load(filename)(which is just the same as callingImage.Load(filename)) and thus uses the default type for the image.