I try to convert the jpg image into vector format.I try to implement this code but it's through the exeception
public void Run()
{
Control c = new Control();
Graphics grfx = c.CreateGraphics();
//ReadImage(ImageName) method return the Image to Byte Array
MemoryStream ms = new MemoryStream(ReadImage(@"E:\Temp\1.jpg"));
IntPtr ipHdc = grfx.GetHdc();
Metafile mf = new Metafile(ms,ipHdc);
grfx.ReleaseHdc(ipHdc);
grfx.Dispose();
grfx = Graphics.FromImage(mf);
mf.Save(@"E:\Temp\file.wmf", ImageFormat.Wmf);//Get Exception on this line
grfx.Dispose();
}
Exeception is :A generic error occurred in GDI+. Please verify my code where i did the mistake. Thanks in Advance