Exception "Unable to read beyond the end of the stream"on saving EMF file(C#)

For some, not all, EMF files I get following error when trying to save the image to disk:

EndOfStreamException “Unable to read beyond the end of the stream”

Here is code that recreates it and I have attached the sample EMF file.

File.zip (460 Bytes)

        var inputFile = @"d:\input\1.emf";
        try
        {
            var image = Image.Load(inputFile);
            image.Save(@"d:\output\new.emf");
        }catch(Exception ex)
        {
            // throws a unable to read past stream exception
            Console.WriteLine(ex);
        }

        Console.ReadLine();

}

@ejt66,

I have worked with the source files shared by you and have been able to observe the issue shared. An issue with ID IMAGINGNET-3356 has been created in our issue tracking system to further investigate and resolve the issue. This thread has been linked with the issue so that you may be notified once the issue will be fixed.

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