Metafile to Bitmap image

G

Guest

I'm converting an EMF to BMP. Image is coming properly except that background color of the bMP is set to black.
I'm saving EMF to a stream and craeting BMP from stream.

One more thing I tried is craeted a bitmap of width and height same as the original EMF(image). Created a graphics object from the bitmap. Cleared the graphics and drew that EMF to the graphics.
code is
Graphics G;
Bitmap b = new Bitmap(image.Width,image.Height);
G.FromImage(b);
G.clear();
G.Draw(image,0,0);
G.Dispose();

Now the Bitmap height and width is not coming same as original image. Width and height are less. so image is cut in bottom and right.
Please help me to solve this problem.

Thanks
gana
 

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

Top