Browse Source

Make color converter static

Co-authored-by: Günther Foidl <gue@korporal.at>
pull/2127/head
Brian Popow 4 years ago
committed by GitHub
parent
commit
7c8fecaec0
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      src/ImageSharp/Formats/Tiff/PhotometricInterpretation/CieLabPlanarTiffColor{TPixel}.cs
  2. 2
      src/ImageSharp/Formats/Tiff/PhotometricInterpretation/CieLabTiffColor{TPixel}.cs

2
src/ImageSharp/Formats/Tiff/PhotometricInterpretation/CieLabPlanarTiffColor{TPixel}.cs

@ -17,7 +17,7 @@ namespace SixLabors.ImageSharp.Formats.Tiff.PhotometricInterpretation
internal class CieLabPlanarTiffColor<TPixel> : TiffBasePlanarColorDecoder<TPixel> internal class CieLabPlanarTiffColor<TPixel> : TiffBasePlanarColorDecoder<TPixel>
where TPixel : unmanaged, IPixel<TPixel> where TPixel : unmanaged, IPixel<TPixel>
{ {
private readonly ColorSpaceConverter colorSpaceConverter = new(); private static readonly ColorSpaceConverter colorSpaceConverter = new();
private const float Inv255 = 1.0f / 255.0f; private const float Inv255 = 1.0f / 255.0f;

2
src/ImageSharp/Formats/Tiff/PhotometricInterpretation/CieLabTiffColor{TPixel}.cs

@ -16,7 +16,7 @@ namespace SixLabors.ImageSharp.Formats.Tiff.PhotometricInterpretation
internal class CieLabTiffColor<TPixel> : TiffBaseColorDecoder<TPixel> internal class CieLabTiffColor<TPixel> : TiffBaseColorDecoder<TPixel>
where TPixel : unmanaged, IPixel<TPixel> where TPixel : unmanaged, IPixel<TPixel>
{ {
private readonly ColorSpaceConverter colorSpaceConverter = new(); private static readonly ColorSpaceConverter colorSpaceConverter = new();
private const float Inv255 = 1.0f / 255.0f; private const float Inv255 = 1.0f / 255.0f;

Loading…
Cancel
Save