We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Wmf files can't be loaded at all. Aspose imaging, java 22.10


We found that some wmf files can’t be loaded at all.
The version is ‘com.aspose:aspose-imaging:22.10:jdk16’

Actually we can load many other wmf files successfully, but there around 100 wmf files that can’t loaded.

The sample code is below.

import java.io.File;

import com.aspose.imaging.Image;
import com.aspose.imaging.fileformats.wmf.WmfImage;

public class TestWmf {
    public static void main(String[] args) throws Exception {
        File wmfFile = new File("src/main/resources/wmf/test.wmf");

        boolean canLoad = Image.canLoad(wmfFile.getAbsolutePath());
        System.out.println("canLoad: " + canLoad); // it says true.
        WmfImage wmfImage = (WmfImage) Image.load(wmfFile.getAbsolutePath()); //stuck here forever.
        try {
            System.out.println("Loaded wmf successfully.");
        } finally {

Test data: bad-wmfs.zip (515.7 KB)

And all of the test data can be rendered in https://www.photopea.com/ successfully.

It seems that there is an infinite loop somewhere in aspose.imaging wmf code.
We may raise this ticket as high level as it seems that the fundamental feature is broken.

Could you help to check it? thanks :slight_smile:


Hello, @Tony_Li
Let me process your request. You will be replied shortly!

We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): IMAGINGNET-6088

You can obtain Paid Support services if you need support on a priority basis, along with the direct access to our Paid Support management team.

Hello, @Tony_Li
Some infinite loop really takes place when some of attached WMFs are being loaded. The ticket has been created, so you can get updates on the progress.

Thank you very much for your quick reply Denis. I’m looking forward to hearing some good news shortly :slight_smile: Thanks.