Browse Source

Fix StyleCop issues

af/octree-no-pixelmap
Sheyne Anderson 7 years ago
parent
commit
d304c77214
  1. 10
      src/ImageSharp/Formats/Png/PngEncoderOptionsHelpers.cs

10
src/ImageSharp/Formats/Png/PngEncoderOptionsHelpers.cs

@ -166,22 +166,27 @@ namespace SixLabors.ImageSharp.Formats.Png
{ {
return PngColorType.GrayscaleWithAlpha; return PngColorType.GrayscaleWithAlpha;
} }
if (tPixel == typeof(Argb32)) if (tPixel == typeof(Argb32))
{ {
return PngColorType.RgbWithAlpha; return PngColorType.RgbWithAlpha;
} }
if (tPixel == typeof(Rgb24)) if (tPixel == typeof(Rgb24))
{ {
return PngColorType.Rgb; return PngColorType.Rgb;
} }
if (tPixel == typeof(Gray16)) if (tPixel == typeof(Gray16))
{ {
return PngColorType.Grayscale; return PngColorType.Grayscale;
} }
if (tPixel == typeof(Gray8)) if (tPixel == typeof(Gray8))
{ {
return PngColorType.Grayscale; return PngColorType.Grayscale;
} }
return default; return default;
} }
@ -199,22 +204,27 @@ namespace SixLabors.ImageSharp.Formats.Png
{ {
return PngBitDepth.Bit8; return PngBitDepth.Bit8;
} }
if (tPixel == typeof(Argb32)) if (tPixel == typeof(Argb32))
{ {
return PngBitDepth.Bit8; return PngBitDepth.Bit8;
} }
if (tPixel == typeof(Rgb24)) if (tPixel == typeof(Rgb24))
{ {
return PngBitDepth.Bit8; return PngBitDepth.Bit8;
} }
if (tPixel == typeof(Gray16)) if (tPixel == typeof(Gray16))
{ {
return PngBitDepth.Bit16; return PngBitDepth.Bit16;
} }
if (tPixel == typeof(Gray8)) if (tPixel == typeof(Gray8))
{ {
return PngBitDepth.Bit8; return PngBitDepth.Bit8;
} }
return default; return default;
} }
} }

Loading…
Cancel
Save