You have to convert the image from indexed to non indexed. Try this code to convert it:
public Bitmap CreateNonIndexedImage(Image src)
{
Bitmap newBmp = new Bitmap(src.Width, src.Height, System.Drawing.Imaging.PixelFormat.Format32bppArgb);
using (Graphics gfx = Graphics.FromImage(newBmp)) {
gfx.DrawImage(src, 0, 0);
}
return newBmp;
}
Oskar Kjellin
2010-05-15 12:53:08