Convert wmf to jpeg causes black background in result image.

J

Jonas

Hi!

When i use the code below to convert a wmf to a jpg image, the output will
always be with a black backgound.

("data" is a byte array containing the WMF file)

System.IO.MemoryStream ms = new MemoryStream(data,0,data.Length);
ms.Write(data,0,data.Length);
ms.Position = 0;

System.Drawing.Image img = System.Drawing.Image.FromStream( ms );

this.Response.Clear();
this.Response.ContentType = "image/jpg";
img.Save(this.Response.OutputStream,
System.Drawing.Imaging.ImageFormat.Jpeg);

Does anyone have a solution?

/Jonas
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,969
Messages
2,570,161
Members
46,708
Latest member
SherleneF1

Latest Threads

Top