I have monochrome TIFF files (1 bpp) that I would like to write text to. When I load them into System.Drawing.Image, and try to instantiate a Graphics object from that image, I receive the error, "A Graphics object cannot be created from an image that has an indexed pixel format."
I can convert the images to a non-indexed format, such as JPEG, but then the resulting image size is very large.
I would like to accomplish this while keeping the image size down. How can I write text onto these images without converting them to another format?
Using the idea in the comment left by Hans Passant, I located this article on code project: http://www.codeproject.com/Articles/15186/Bitonal-TIFF-Image-Converter-for-NET
Adapting this code, I converted the image to 32bpp, wrote the text on that image, then converted it to 1bpp.