The docs for the Bitmap class say you can open a metafile using new Bitmap("file.emf"
While this "works" it has a couple of problems:
- There is no way to set the DPI of the image.
- The image size is generally not what the metafile header says it should be.
- The RawFormat property say it is a MemoryBmp, not a Emf or Wmf.
Instead do the following:
Metafile mf = new Metafile("text box line.wmf");
System.Drawing.Bitmap img = new System.Drawing.Bitmap(mf.get_Width(), mf.get_Height(), PixelFormat.Format32bppArgb);
img.SetResolution(72, 72);
Do you find this useful? If so please check out Windward Reports.

Comments