diff --git a/src/ImageSharp/Formats/Jpeg/README.md b/src/ImageSharp/Formats/Jpeg/README.md index 54bc14847c..2f766ca0c3 100644 --- a/src/ImageSharp/Formats/Jpeg/README.md +++ b/src/ImageSharp/Formats/Jpeg/README.md @@ -1,3 +1,8 @@ -Encoder/Decoder adapted and extended from: +Encoder adapted and extended from: +https://golang.org/src/image/jpeg/ -https://golang.org/src/image/jpeg/ \ No newline at end of file +Decoder orchestration code is based on: +https://github.com/mozilla/pdf.js + +Huffmann decoder is based on: +https://github.com/rds1983/StbSharp \ No newline at end of file diff --git a/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.Baseline.cs b/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.Baseline.cs index 8169fdba3c..73167a4b7e 100644 --- a/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.Baseline.cs +++ b/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.Baseline.cs @@ -42,13 +42,5 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg // TODO: We need a public ImageDecoderException class in ImageSharp! Assert.ThrowsAny(() => provider.GetImage(JpegDecoder)); } - - [Theory(Skip = "Debug only, enable manually!")] - [WithFileCollection(nameof(BaselineTestJpegs), PixelTypes.Rgba32)] - public void CompareJpegDecoders_Baseline(TestImageProvider provider) - where TPixel : struct, IPixel - { - this.CompareJpegDecodersImpl(provider, DecodeBaselineJpegOutputName); - } } } \ No newline at end of file diff --git a/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.Progressive.cs b/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.Progressive.cs index 9de788be2a..77bc9f5404 100644 --- a/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.Progressive.cs +++ b/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.Progressive.cs @@ -33,13 +33,5 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg appendPixelTypeToFileName: false); } } - - [Theory(Skip = "Debug only, enable manually!")] - [WithFileCollection(nameof(ProgressiveTestJpegs), PixelTypes.Rgba32)] - public void CompareJpegDecoders_Progressive(TestImageProvider provider) - where TPixel : struct, IPixel - { - this.CompareJpegDecodersImpl(provider, DecodeProgressiveJpegOutputName); - } } } \ No newline at end of file diff --git a/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs b/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs index 496891ce43..4ae955c323 100644 --- a/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs +++ b/tests/ImageSharp.Tests/Formats/Jpg/JpegDecoderTests.cs @@ -63,7 +63,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg private static JpegDecoder JpegDecoder => new JpegDecoder(); [Fact] - public void ParseStream_BasicPropertiesAreCorrect1_PdfJs() + public void ParseStream_BasicPropertiesAreCorrect() { byte[] bytes = TestFile.Create(TestImages.Jpeg.Progressive.Progress).Bytes; using (var ms = new MemoryStream(bytes)) @@ -122,20 +122,7 @@ namespace SixLabors.ImageSharp.Tests.Formats.Jpg return "0%"; } - - private void CompareJpegDecodersImpl(TestImageProvider provider, string testName) - where TPixel : struct, IPixel - { - this.Output.WriteLine(provider.SourceFileOrDescription); - provider.Utility.TestName = testName; - - using (Image image = provider.GetImage(JpegDecoder)) - { - string d = this.GetDifferenceInPercentageString(image, provider); - this.Output.WriteLine($"Difference using decoder: {d}"); - } - } - + // DEBUG ONLY! // The PDF.js output should be saved by "tests\ImageSharp.Tests\Formats\Jpg\pdfjs\jpeg-converter.htm" // into "\tests\Images\ActualOutput\JpegDecoderTests\"