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
Specific jpeg images result in very strange saved images (corrupted?) #817
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
When loading an image using Image.Load and saving it again, using image.Save(). the resulting image is very different from the original, loaded image without doing any mutations.
Steps to Reproduce
.NET Core 2.1 Console app. Use using (Image<Rgba32> image = Image.Load("8.jpg")) { image.Save("8-saved.jpg"); }
As the only code in Main and run with 8.jpg in your working directory (see attached).
Activity
JimBobSquarePants commentedon Jan 25, 2019
JpegSnoop Output
It's YccK
I wonder if we are not parsing the color mode properly. cc/ @antonfirsovNope. Everything looks fine. It's happening after the scan decoder I think.
LarsWesselius commentedon Jan 25, 2019
Opening and saving it in Paint for example produces a smaller jpeg which does work in ImageSharp.

JimBobSquarePants commentedon Jan 25, 2019
@LarsWesselius I imagine paint is reencoding it to YCbCr. Just running a debug pass on the image now.
Remove hardcoded subsampling. Fix #817
Remove hardcoded subsampling. Fix #817 (#834)
Remove hardcoded subsampling. Fix SixLabors#817 (SixLabors#834)