New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Png's are decoding wrong after 1.0.0-alpha-000061 #28
Comments
Hmmmm... Probably the ArrayPool stuff again. Odd, it really doesn't seem to be threadsafe. Would you be able to fork the repo and conduct your tests with a reverted decoder? I'll test myself when I can. |
Well i checked and the ArrayPool is definitely thread safe BUT you will eventually get MORE bytes than you asked for. the docs say it will return a array of MINIMAL the specified length. so great care must be taken in using the bytes that are returned by the pool. https://github.com/JimBobSquarePants/ImageSharp/blob/master/src/ImageSharp/Formats/Png/PngDecoderCore.cs#L338 sorry if it sounds like i'm ranting, it must be hard trying to keep your head straight with this huge amount of code |
Och not at all, at least it looks like it should be an easy fix then. Would you like to give it a go? You have the advantage of tests that work. I really need to beef up my parallel test. |
Changed duplicate InlineData from MinValue to MaxValue
Changed duplicate InlineData from MinValue to MaxValue
Changed duplicate InlineData from MinValue to MaxValue
png's are decoded incorrectly on version v1.0.0-alpha-000062 and higher (including 95)
last know good version is v1.0.0-alpha-000061
so i think something went wrong in this commit 27522da
i think it's the same as #24 but this time it's in the decoder, i only have 1 specific image that gives me the issue. all of my other images decode&encode just fine (on version 95)
tested with output format: png,jpeg,bmp,gif (all give the same issue)
used the same simple console app as in #24 (comment)
please don't forget to sleep this time 😄
original source file:
single-thread output:
multi-thread output:
The text was updated successfully, but these errors were encountered: