@@ -14,13 +14,6 @@ public partial class JpegEncoderTests
1414{
1515 private static JpegEncoder JpegEncoder => new ( ) ;
1616
17- private static readonly TheoryData < int > TestQualities = new ( )
18- {
19- 40 ,
20- 80 ,
21- 100 ,
22- } ;
23-
2417 public static readonly TheoryData < JpegEncodingColor , int , float > NonSubsampledEncodingSetups = new ( )
2518 {
2619 { JpegEncodingColor . Rgb , 100 , 0.0238f / 100 } ,
@@ -160,6 +153,31 @@ public void EncodeBaseline_WorksWithDiscontiguousBuffers<TPixel>(TestImageProvid
160153 TestJpegEncoderCore ( provider , colorType , 100 , comparer ) ;
161154 }
162155
156+ [ Theory ]
157+ [ WithFile ( TestImages . Png . CalliphoraPartial , nameof ( NonSubsampledEncodingSetups ) , PixelTypes . Rgb24 ) ]
158+ [ WithFile ( TestImages . Png . CalliphoraPartial , nameof ( SubsampledEncodingSetups ) , PixelTypes . Rgb24 ) ]
159+ [ WithFile ( TestImages . Png . BikeGrayscale , nameof ( LuminanceEncodingSetups ) , PixelTypes . L8 ) ]
160+ [ WithFile ( TestImages . Jpeg . Baseline . Cmyk , nameof ( CmykEncodingSetups ) , PixelTypes . Rgb24 ) ]
161+ [ WithFile ( TestImages . Jpeg . Baseline . Ycck , nameof ( YcckEncodingSetups ) , PixelTypes . Rgb24 ) ]
162+ public void EncodeProgressive_DefaultNumberOfScans < TPixel > ( TestImageProvider < TPixel > provider , JpegEncodingColor colorType , int quality , float tolerance )
163+ where TPixel : unmanaged, IPixel < TPixel >
164+ {
165+ using Image < TPixel > image = provider . GetImage ( ) ;
166+
167+ JpegEncoder encoder = new ( )
168+ {
169+ Quality = quality ,
170+ ColorType = colorType ,
171+ Progressive = true
172+ } ;
173+ string info = $ "{ colorType } -Q{ quality } ";
174+
175+ ImageComparer comparer = new TolerantImageComparer ( tolerance ) ;
176+
177+ // Does DebugSave & load reference CompareToReferenceInput():
178+ image . VerifyEncoder ( provider , "jpeg" , info , encoder , comparer , referenceImageExtension : "jpg" ) ;
179+ }
180+
163181 [ Theory ]
164182 [ InlineData ( JpegEncodingColor . YCbCrRatio420 ) ]
165183 [ InlineData ( JpegEncodingColor . YCbCrRatio444 ) ]
0 commit comments