We have a .NET application which currently creates documents to TIFF files by printing to a virtual printer. We would like to get rid of the virtual printer because it is expensive, slow, and does not support 64-bit operating systems. Right now, I can use other tools at my disposal to create a TIFF image from, say, a Word document at 300 dpi. However, I don't have a great deal of control over the final TIFF format; specifically, it creates full 24-bit true color images and thus very large TIFF files. The legacy solution, for all of its faults, does create nice 8-bit palette color TIFF files.
So my question is this: is there a straightforward, efficient way to convert a 24-bit, truecolor image to an 8-bit palette color image? It would be nice if the resulting palette was optimized for the particular image, but I realize that analyzing every pixel is probably too slow. A solution that used a standard 8-bit palette would certainly be acceptable. Is there a method in the .NET imaging library that will do this, or a third-party, open source tool? I've messed around a little with ImageMagick.NET, but was not very pleased with the experience.