You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Vectorized 4:2:0 subsampling leads to artifacts during Jpeg encoding. #1549
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
Issue originally identified by @jrdiver in #1547 Thanks for that!
The new vectorized subsampling algorithm introduced in #1517 by @tkp1n is creating artifacts in our jpeg output. Unfortunately our regression tests did not capture the issue.
v1.0.3-alpha.0.28
v1.0.3-alpha.0.29
Steps to Reproduce
Simply resaving the input image is enough ensuring the quality is low enough to trigger 4:2:0 subsampling.
I'm not sure quality matters here. This is the output EncodeBaseline_WorksWithDifferentSizes_Rgba32_TestPattern600x400_Ratio420-Q100.jpeg which should run with Quality=100 if everything is correct:
Activity
antonfirsov commentedon Feb 13, 2021
I'm not sure quality matters here. This is the output
EncodeBaseline_WorksWithDifferentSizes_Rgba32_TestPattern600x400_Ratio420-Q100.jpegwhich should run withQuality=100if everything is correct:JimBobSquarePants commentedon Feb 13, 2021
Quality just triggers the subsampling when < 91 so yes, explicitly setting the property would be enough.
antonfirsov commentedon Feb 13, 2021
This should have been caught by our tests. Opened #1550.
@tkp1n any chance you can take a look?
tkp1n commentedon Feb 14, 2021
I found the issue.. expect a PR coming soon