GetPixelsUnsafe operations reset ColorType
See original GitHub issueDescription
Using GetPixelsUnsafe
for either read or write results in the MagickImage
object itself resetting the ColorType
to TrueColor
regardless of what it was set to before.
Steps to Reproduce
m.ColorType = ColorType.Grayscale;
using (var pix = m.GetPixelsUnsafe())
{
return pix.ToArray();
}
Console.WriteLine(m.ColorType);
System Configuration
- Magick.NET version: 8.3 (also reproducible in previous 8.x builds)
- Environment (Operating system, version and so on): Windows 10
Issue Analytics
- State:
- Created 2 years ago
- Comments:9 (5 by maintainers)
Top Results From Across the Web
Magick.NET
Using GetPixelsUnsafe for either read or write results in the MagickImage object itself resetting the ColorType to TrueColor regardless of what it was...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
This is caused by the call to
mm.Alpha(AlphaOption.Off)
. Not sure why this is happening though.Yes, thank you!