Problem with EMF Image quality

We are having problems with the image quality when adding an emf to a slide. The emfs we are trying to add contain a combination of graphics and text. (An example is attached in ExampleEMF.zip)

When we create a new picture by passing a Metafile object, the resulting image has dots appearing over the graphics (see the first slide). But if we create a new picture by passing the path to the same emf the image appears fine (see the second slide).

Ideally we don’t want to have to save out the images before we import them into PowerPoint.

Any ideas why we get a different result from the two constructors?

Example C# code:
Presentation p = new Presentation();

Slide s = p.Slides[0];
Metafile image = new Metafile(“C:\Temp\Example.emf”);
Picture picture = new Picture(p, image);
p.Pictures.Add(picture);
s.Shapes.AddPictureFrame(picture.PictureId, 1000, 1000, 2000, 2000);

s = p.AddEmptySlide();
picture = new Picture(p, “C:\Temp\Example.emf”);
p.Pictures.Add(picture);
s.Shapes.AddPictureFrame(picture.PictureId, 1000, 1000, 2000, 2000);

p.Write(“C:\Temp\Example.ppt”);

Try different image viewers and you will see that this metafile has dots inside green cross.
For example ACDSee viewer or some other.

Adding images from stream always work better because in this case
Aspose.Slides doesn’t allow .Net framework to read/process image.
The most simple solution is save image to memory stream instead of file.

Thanks for the suggestion.

You are right, ACDSee viewer does show the dots in the original.
Still don’t quite understand why the dots only appear in certain circumstances, but importing the emf from a memory stream worked much better. I guess it will have to do until we get a chance to have a another look at how we
generate the emfs in the first place.

Thanks




Most probably metafile contains both EMF and EMF+ parts and they have different quality.
Some applications use EMF+ and show good quality GDI+ graphics, other can show EMF only (with dots).
That is my opinion only, may be there is some another problem…