@@ -48,11 +48,12 @@ private JpegMetadata(JpegMetadata other)
4848 internal int ? ChrominanceQuality { get ; set ; }
4949
5050 /// <summary>
51- /// Gets the encoded quality.
51+ /// Gets or sets the encoded quality.
5252 /// </summary>
5353 /// <remarks>
5454 /// Note that jpeg image can have different quality for luminance and chrominance components.
5555 /// This property returns maximum value of luma/chroma qualities if both are present.
56+ /// Setting the quality will update both values.
5657 /// </remarks>
5758 public int Quality
5859 {
@@ -70,34 +71,40 @@ public int Quality
7071
7172 return this . ChrominanceQuality ?? Quantization . DefaultQualityFactor ;
7273 }
74+
75+ set
76+ {
77+ this . LuminanceQuality = value ;
78+ this . ChrominanceQuality = value ;
79+ }
7380 }
7481
7582 /// <summary>
76- /// Gets the color type.
83+ /// Gets or sets the color type.
7784 /// </summary>
78- public JpegEncodingColor ? ColorType { get ; internal set ; }
85+ public JpegEncodingColor ColorType { get ; set ; } = JpegEncodingColor . YCbCrRatio420 ;
7986
8087 /// <summary>
81- /// Gets the component encoding mode.
88+ /// Gets or sets a value indicating whether the component encoding mode should be interleaved .
8289 /// </summary>
8390 /// <remarks>
8491 /// Interleaved encoding mode encodes all color components in a single scan.
8592 /// Non-interleaved encoding mode encodes each color component in a separate scan.
8693 /// </remarks>
87- public bool ? Interleaved { get ; internal set ; }
94+ public bool Interleaved { get ; set ; } = true ;
8895
8996 /// <summary>
90- /// Gets the scan encoding mode.
97+ /// Gets or sets a value indicating whether the scan encoding mode is progressive .
9198 /// </summary>
9299 /// <remarks>
93100 /// Progressive jpeg images encode component data across multiple scans.
94101 /// </remarks>
95- public bool ? Progressive { get ; internal set ; }
102+ public bool Progressive { get ; set ; }
96103
97104 /// <summary>
98- /// Gets the comments.
105+ /// Gets or sets collection of comments.
99106 /// </summary>
100- public IList < JpegComData > Comments { get ; }
107+ public IList < JpegComData > Comments { get ; set ; } = [ ] ;
101108
102109 /// <inheritdoc/>
103110 public static JpegMetadata FromFormatConnectingMetadata ( FormatConnectingMetadata metadata )
0 commit comments