Problem showing some wmf files with aspose-imaging-3.4

Hallo,

we’re using aspose imaging (with a valid license) for showing wmf and emf files in a panel.
The most files are working, but some views are mismatched.

I’ve created a small test program (without using our license) and will attach some wmfs, which have the problems (you can compare showing the output in visio, irfanView, paint, gimp,…).

One file (Übersichtskarte_Osdorf.wmf) has a real great dimension (241562 x 99113), which isn’t shown in the test program (here the output is 37472 x 91328).
The other files are showing corrupted elements.

For running the program:
java -jar AsposeTest.jar

Thanks
Burkhardt

Hi Burkhardt,

Thank you for your inquiry and providing sample files.

We have tried to reproduce the issue at our end. Initial testing shows that the issue persists. The issue has been logged into our system with ID IMAGING-35366. Our product team will look into it. We will update you accordingly via this forum.

Hi Burkhardt,

This is to update you that we have further investigated the issue. It was found that the issue is not with Aspose.Imaging API rather you have to check your Java Swing (JFrame) code and adjust it accordingly in order to preview metafiles.

com.aspose.imaging.fileformats.metafile.MetafileImage metaImage = new WmfMetafileImage("ZentralenPlan.wmf");
metaImage.save("ZentralenPlanOut.wmf");

Please consider the following code snippet. It will process the WMF file using Aspose.Imging API. Now preview the resultant file “ZentralenPlanOut.wmf” using IfranView software, you will see that display is correct.

Hallo Ikram,

hmm, I don’t see any solution.
The problem is not in loading/saving the file, but in creating the Graphics2D.
Take a look into the MyImage class, which uses

Graphics2D g2 = (Graphics2D) g;
metafile.playMetafile(g2); --> this is using aspose

For the most wmfs, this is working, but not for the attached ones.

With older versions ( < 3.x) from the apose api, we don’t had this problem.

Now I’ve created the example with the former used lib (metafiles-1.6.1) and again:
There all things are working smooth.

Test ist with java -jar AsposeTestOld.jar ZentralenPlan.wmf

Thanks,
Burkhardt

Hi Burkhardt,

Thank you for your feedback and sharing the sample code.

We are further investigating the issue. In the meanwhile please send us the details about which older version of Aspose.Imaging you used. This will help us in investigation.

Hello Ikram,

as written before: We had used metafiles-1.6.1 (it seems to be released 2011 and was previous version before apose-imaging has released) and all needes jars are added in my example code.

Thanks
Burkhardt

Hi Burkhardt,

Sorry for the inconvenience caused.

This is to update you that investigation on this issue has already in progress. We have started testing with version Aspose.Imging for Java 2.9.0 along with the sample files provided by. We will update you about the progress via this forum thread.




The issues you have found earlier (filed as IMAGING-35366) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by Aspose Notifier.

The issues you have found earlier (filed as ) have been fixed in this Aspose.Words for JasperReports 18.3 update.