Skip to content

Unable to load image from DeflateStream. #1323

@maxvoxel8

Description

@maxvoxel8

Prerequisites

  • I have written a descriptive issue title
  • I have verified that I am running the latest version of ImageSharp
  • I have verified if the problem exist in both DEBUG and RELEASE mode
  • I have searched open and closed issues to ensure it has not already been reported

Description

Trying to use Image.Load to read a DeflateStream results in a NotSupportedException. This issue did not exist in 1.0.0-rc0001.

Steps to Reproduce

The following code called on a zip file with a PNG named 1.png demonstrates the issue:

    class Program {
        static void Main(string[] args) {
            using (var s = File.OpenRead(args[0])) {
                ZipArchive r = new ZipArchive(s);
                var entry = r.GetEntry("1.png");

                using (var t = entry.Open()) {
                    var img = Image.Load(t);
                }
            }
        }
    }

System Configuration

  • ImageSharp version: 1.0.0
  • Environment (Operating system, version and so on): Windows 10
  • .NET Framework version: 4.7.2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions