I'm trying to manipulate an indexed image. In order to use the Graphics class, I first convert the image to a Bitmap. After the manipulation, I want to save the image back as an Indexed image. To do this I'm creating a blank Bitmap and using Graphics.DrawImage() to 'populate'. My problem is that the resulting image is blank.
Image plainImage = Image.FromFile(imageFile); Image img = new Bitmap(plainImage); //img = ResizeMaintainAspect(img, brdEnt.Width, brdEnt.Height, Color.Black); Image image = new Bitmap(img.Width, img.Height, plainImage.PixelFormat); image.Palette = plainImage.Palette; Graphics g = Graphics.FromImage(img); g.DrawImage(image, img.Width, img.Height);
(I commented out the manipulation routine to ensure that nothing I was doing there was causing the problem)
What am I doing wrong?!