Hello,
I'm tring to create an indexed image on the fly with the following :
Bitmap bcodeBitmap = new Bitmap(50,50,PixelFormat.Format32bppArgb);
Graphics objGraphics = Graphics.FromImage(bcodeBitmap);
objGraphics.FillRectangle(new SolidBrush(Color.White), new
Rectangle(0,0,50,50));
objGraphics.DrawString("hello", System.Drawing.Font, new
SolidBrush(Color.Black),10,0);
Would have liked to use PixelFormat.Format1bppIndexed when creating the
bitmap but this gives : System.Exception: A Graphics object cannot be
created from an image that has an indexed pixel format
Does anyone know how to index this image and avoid the exception....Thanks
in advance.