Prerequisites
Description
I use a library to render PDF pages to image data. This data is in BGRA format. I then use Image.LoadPixelData<Bgra32>(bytes, width, height) to load the data, and then use the data.
In my unit test for this library I load the Bgra32 data after rendering, then save as PNG. Later on I open that file/stream again using Image.Load. It then throws an exception: SixLabors.ImageSharp.ImageFormatException : Bad method for ZLIB header: cmf=32.
Steps to Reproduce
I have saved the raw bgra data into a file, and made a minimal bug sample. The test run on GitHub actions can be found here: https://github.com/synercoder/ImageSharpNet6Bug/runs/3675201091?check_suite_focus=true
As can the minimal sample test: https://github.com/synercoder/ImageSharpNet6Bug/blob/main/ImageSharpBugTests/BugTests.cs
System Configuration
- ImageSharp version: 1.0.3
- Environment (Operating system, version and so on): Windows 10, bug also reproduced in GitHub Actions on Windows-latest
- .NET Framework version: My pc & Github actions: 6.0.100-rc.1.21458.32
- Additional information: Works in .NET 5.0 & images used in the raw file are from Pexels.com under the royalty-free license if that was any worry.
Prerequisites
DEBUGandRELEASEmodeDescription
I use a library to render PDF pages to image data. This data is in BGRA format. I then use
Image.LoadPixelData<Bgra32>(bytes, width, height)to load the data, and then use the data.In my unit test for this library I load the Bgra32 data after rendering, then save as PNG. Later on I open that file/stream again using
Image.Load. It then throws an exception:SixLabors.ImageSharp.ImageFormatException : Bad method for ZLIB header: cmf=32.Steps to Reproduce
I have saved the raw bgra data into a file, and made a minimal bug sample. The test run on GitHub actions can be found here: https://github.com/synercoder/ImageSharpNet6Bug/runs/3675201091?check_suite_focus=true
As can the minimal sample test: https://github.com/synercoder/ImageSharpNet6Bug/blob/main/ImageSharpBugTests/BugTests.cs
System Configuration