tags:

views:

294

answers:

2

What is the best way to convert from a non-indexed pixel format bitmap to an indexed format in C# ?

A: 

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).

Benjamin Podszun
A: 

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.

Coincoin