From 7c8fecaec0239a63f615144c3b2cb20f2c468844 Mon Sep 17 00:00:00 2001 From: Brian Popow <38701097+brianpopow@users.noreply.github.com> Date: Fri, 27 May 2022 11:31:03 +0200 Subject: [PATCH] Make color converter static MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Günther Foidl --- .../PhotometricInterpretation/CieLabPlanarTiffColor{TPixel}.cs | 2 +- .../Tiff/PhotometricInterpretation/CieLabTiffColor{TPixel}.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/CieLabPlanarTiffColor{TPixel}.cs b/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/CieLabPlanarTiffColor{TPixel}.cs index b0420f9920..9e55693e40 100644 --- a/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/CieLabPlanarTiffColor{TPixel}.cs +++ b/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/CieLabPlanarTiffColor{TPixel}.cs @@ -17,7 +17,7 @@ namespace SixLabors.ImageSharp.Formats.Tiff.PhotometricInterpretation internal class CieLabPlanarTiffColor : TiffBasePlanarColorDecoder where TPixel : unmanaged, IPixel { - private readonly ColorSpaceConverter colorSpaceConverter = new(); + private static readonly ColorSpaceConverter colorSpaceConverter = new(); private const float Inv255 = 1.0f / 255.0f; diff --git a/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/CieLabTiffColor{TPixel}.cs b/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/CieLabTiffColor{TPixel}.cs index f3d014a46f..546ef8f4f8 100644 --- a/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/CieLabTiffColor{TPixel}.cs +++ b/src/ImageSharp/Formats/Tiff/PhotometricInterpretation/CieLabTiffColor{TPixel}.cs @@ -16,7 +16,7 @@ namespace SixLabors.ImageSharp.Formats.Tiff.PhotometricInterpretation internal class CieLabTiffColor : TiffBaseColorDecoder where TPixel : unmanaged, IPixel { - private readonly ColorSpaceConverter colorSpaceConverter = new(); + private static readonly ColorSpaceConverter colorSpaceConverter = new(); private const float Inv255 = 1.0f / 255.0f;