Skip to content

Conversation

@BobLd
Copy link
Collaborator

@BobLd BobLd commented Oct 14, 2025

fix #1183

cc @rhuijben

@BobLd
Copy link
Collaborator Author

BobLd commented Oct 14, 2025

tests fail because size of of png is different between net47 / net8 / net9

@rhuijben
Copy link
Contributor

Size in bytes, nor hash after recompressing is guaranteed as they have different Zlib versions. Will likely be more different in DotNet 10 as that starts using zlib-ng.

Size difference in pixels would be very surprising. I debugged the issue with .net 8 or 9)

@BobLd
Copy link
Collaborator Author

BobLd commented Oct 14, 2025

Agreed yes for the pixels, I wasn't aware for zlib. Ill have a look. Thanks again!

@rhuijben
Copy link
Contributor

👍 looks good to me. You could use a checksum over the actual data instead of copying all those bytes. But I think it is hard to avoid reading it using something that really understands the image.

In theory if you can assume png you could try to locate the uncompressed data checksum... But I would recommend not going that deep in a format.

@BobLd
Copy link
Collaborator Author

BobLd commented Oct 15, 2025

@rhuijben thanks a lot for that. Agreed, as this is just for testing purpose, I don't think there's a need to improve it too much. Thanks again for finding the fix!

@BobLd BobLd merged commit c9034f9 into UglyToad:master Oct 15, 2025
2 checks passed
@BobLd BobLd deleted the issues/1183 branch October 15, 2025 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

FlateFilter wrong image output

2 participants