diff --git a/src/ImageSharp/Formats/Jpeg/IJpegEncoderOptions.cs b/src/ImageSharp/Formats/Jpeg/IJpegEncoderOptions.cs
index d2921ad4c0..a9f564b450 100644
--- a/src/ImageSharp/Formats/Jpeg/IJpegEncoderOptions.cs
+++ b/src/ImageSharp/Formats/Jpeg/IJpegEncoderOptions.cs
@@ -9,18 +9,11 @@ namespace SixLabors.ImageSharp.Formats.Jpeg
internal interface IJpegEncoderOptions
{
///
- /// Gets the quality, that will be used to encode the luminance data of the image.
- /// Quality index must be between 0 and 100 (compression from max to min).
+ /// Gets or sets the quality, that will be used to encode the image. Quality
+ /// index must be between 0 and 100 (compression from max to min).
+ /// Defaults to 75.
///
- /// The quality of the jpg image from 0 to 100.
- int? LuminanceQuality { get; }
-
- ///
- /// Gets the quality, that will be used to encode the chrominance data of the image.
- /// Quality index must be between 0 and 100 (compression from max to min).
- ///
- /// The quality of the jpg image from 0 to 100.
- int? ChrominanceQuality { get; }
+ public int? Quality { get; set; }
///
/// Gets the subsample ration, that will be used to encode the image.
diff --git a/src/ImageSharp/Formats/Jpeg/JpegEncoder.cs b/src/ImageSharp/Formats/Jpeg/JpegEncoder.cs
index 27597a0f99..5e199b4204 100644
--- a/src/ImageSharp/Formats/Jpeg/JpegEncoder.cs
+++ b/src/ImageSharp/Formats/Jpeg/JpegEncoder.cs
@@ -1,7 +1,6 @@
// Copyright (c) Six Labors.
// Licensed under the Apache License, Version 2.0.
-using System;
using System.IO;
using System.Threading;
using System.Threading.Tasks;
@@ -14,43 +13,8 @@ namespace SixLabors.ImageSharp.Formats.Jpeg
///
public sealed class JpegEncoder : IImageEncoder, IJpegEncoderOptions
{
- ///
- /// Gets or sets the quality, that will be used to encode the image. Quality
- /// index must be between 0 and 100 (compression from max to min).
- /// Defaults to 75.
- ///
- public int? Quality
- {
- [Obsolete("This accessor will soon be deprecated. Use LuminanceQuality and ChrominanceQuality getters instead.", error: false)]
- get
- {
- const int defaultQuality = 75;
-
- int lumaQuality = this.LuminanceQuality ?? defaultQuality;
- int chromaQuality = this.LuminanceQuality ?? lumaQuality;
- return (int)Math.Round((lumaQuality + chromaQuality) / 2f);
- }
-
- set
- {
- this.LuminanceQuality = value;
- this.ChrominanceQuality = value;
- }
- }
-
- ///
- /// Gets or sets the quality, that will be used to encode luminance image data.
- /// Quality index must be between 0 and 100 (compression from max to min).
- /// Defaults to 75.
- ///
- public int? LuminanceQuality { get; set; }
-
- ///
- /// Gets or sets the quality, that will be used to encode chrominance image data.
- /// Quality index must be between 0 and 100 (compression from max to min).
- /// Defaults to 75.
- ///
- public int? ChrominanceQuality { get; set; }
+ ///
+ public int? Quality { get; set; }
///
/// Gets or sets the subsample ration, that will be used to encode the image.
diff --git a/src/ImageSharp/Formats/Jpeg/JpegEncoderCore.cs b/src/ImageSharp/Formats/Jpeg/JpegEncoderCore.cs
index 9c66cfe0c3..248772b287 100644
--- a/src/ImageSharp/Formats/Jpeg/JpegEncoderCore.cs
+++ b/src/ImageSharp/Formats/Jpeg/JpegEncoderCore.cs
@@ -64,8 +64,8 @@ namespace SixLabors.ImageSharp.Formats.Jpeg
/// The options
public JpegEncoderCore(IJpegEncoderOptions options)
{
- this.luminanceQuality = options.LuminanceQuality;
- this.chrominanceQuality = options.ChrominanceQuality;
+ this.luminanceQuality = options.Quality;
+ this.chrominanceQuality = options.Quality;
this.subsample = options.Subsample;
this.colorType = options.ColorType;
}