Description
A System.NullReferenceException was throwing when get a gif image using Image.FromFile() method.
CallStack.txt
Expected behavior:
The gif image should get using Image.FromFile() method correctly.
Minimal repro:
- Create a WinForms .NET core project targeting .NET 6.0
- Add following code to the structure method of Form1
Image.FromFile(@"\\ServerName\Images\animated.gif");
Below is the animated.gif file:

- Build and run the project
Configuration
.NET SDK 6.0.100-preview.7.21320.4
Regression?
Yes, this is a regression issue.
Other information
This issue doesn't repro when file was saved on a local path