Browse Source

Fix build issue

pull/2127/head
Brian Popow 4 years ago
parent
commit
9165efe740
  1. 4
      src/ImageSharp/Formats/Tiff/PhotometricInterpretation/CieLabPlanarTiffColor{TPixel}.cs
  2. 4
      src/ImageSharp/Formats/Tiff/PhotometricInterpretation/CieLabTiffColor{TPixel}.cs

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

@ -17,7 +17,7 @@ namespace SixLabors.ImageSharp.Formats.Tiff.PhotometricInterpretation
internal class CieLabPlanarTiffColor<TPixel> : TiffBasePlanarColorDecoder<TPixel>
where TPixel : unmanaged, IPixel<TPixel>
{
private static readonly ColorSpaceConverter colorSpaceConverter = new();
private static readonly ColorSpaceConverter ColorSpaceConverter = new();
private const float Inv255 = 1.0f / 255.0f;
@ -36,7 +36,7 @@ namespace SixLabors.ImageSharp.Formats.Tiff.PhotometricInterpretation
for (int x = 0; x < pixelRow.Length; x++)
{
var lab = new CieLab((l[offset] & 0xFF) * 100f * Inv255, (sbyte)a[offset], (sbyte)b[offset]);
var rgb = this.colorSpaceConverter.ToRgb(lab);
var rgb = ColorSpaceConverter.ToRgb(lab);
color.FromVector4(new Vector4(rgb.R, rgb.G, rgb.B, 1.0f));
pixelRow[x] = color;

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

@ -16,7 +16,7 @@ namespace SixLabors.ImageSharp.Formats.Tiff.PhotometricInterpretation
internal class CieLabTiffColor<TPixel> : TiffBaseColorDecoder<TPixel>
where TPixel : unmanaged, IPixel<TPixel>
{
private static readonly ColorSpaceConverter colorSpaceConverter = new();
private static readonly ColorSpaceConverter ColorSpaceConverter = new();
private const float Inv255 = 1.0f / 255.0f;
@ -33,7 +33,7 @@ namespace SixLabors.ImageSharp.Formats.Tiff.PhotometricInterpretation
{
float l = (data[offset] & 0xFF) * 100f * Inv255;
var lab = new CieLab(l, (sbyte)data[offset + 1], (sbyte)data[offset + 2]);
var rgb = this.colorSpaceConverter.ToRgb(lab);
var rgb = ColorSpaceConverter.ToRgb(lab);
color.FromVector4(new Vector4(rgb.R, rgb.G, rgb.B, 1.0f));
pixelRow[x] = color;

Loading…
Cancel
Save