private void CalculateLuminanceValues(SixLabors.ImageSharp.Image image, byte[] bytes)
        {
            var luminance = image.CloneAs <L8>();

            for (int i = 0; i < luminance.Height; i++)
            {
                var row = luminance.GetPixelRowSpan(i);

                byte[] rawBytes = MemoryMarshal.AsBytes(row).ToArray();
                var    offset   = i * (rawBytes.Length);
                Buffer.BlockCopy(rawBytes, 0, bytes, offset, rawBytes.Length);
            }
        }