Converting to indexed Bitmap PixelFormat in C#
What is the best wa开发者_StackOverflow社区y to convert from a non-indexed pixel format bitmap to an indexed format in C# ?
This worked great and fast for me using P/Invoke to let GDI handle it (it can do the job, but the .Net API doesn't expose it for some weird reasons).
There is unfortunately nothing in the framework that will help you.
You will have to quantize your image, map the colors and write the indexed bitmap data by yourself or by using some other library.
精彩评论