Skip to content

A System.NullReferenceException was throwing when get a **gif** image using Image.FromFile() method #54475

@Amy-Li03

Description

@Amy-Li03

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:

  1. Create a WinForms .NET core project targeting .NET 6.0
  2. Add following code to the structure method of Form1
    Image.FromFile(@"\\ServerName\Images\animated.gif");
    Below is the animated.gif file:
    animated
  3. 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

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions