diff --git a/src/ImageSharp/Formats/Jpeg/Components/Decoder/JpegComponentPostProcessor.cs b/src/ImageSharp/Formats/Jpeg/Components/Decoder/JpegComponentPostProcessor.cs index 31214b4c1d..9a659d6216 100644 --- a/src/ImageSharp/Formats/Jpeg/Components/Decoder/JpegComponentPostProcessor.cs +++ b/src/ImageSharp/Formats/Jpeg/Components/Decoder/JpegComponentPostProcessor.cs @@ -78,8 +78,7 @@ namespace SixLabors.ImageSharp.Formats.Jpeg.Components.Decoder var blockPp = new JpegBlockPostProcessor(this.RawJpeg, this.Component); - // TODO: this is a constant value for ALL components - float maximumValue = MathF.Pow(2, this.frame.Precision) - 1; + float maximumValue = this.frame.MaxColorChannelValue; int destAreaStride = this.ColorBuffer.Width;