Metafile to Bitmap image

  • Thread starter Thread starter Guest
  • Start date Start date
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
 
Back
Top