Browse Source

Don't use RGB. Fixes #1275

pull/1574/head
James Jackson-South 6 years ago
parent
commit
1ac38e3fcf
  1. 13
      src/ImageSharp/PixelFormats/PixelImplementations/Rgb24.cs

13
src/ImageSharp/PixelFormats/PixelImplementations/Rgb24.cs

@ -201,7 +201,18 @@ namespace SixLabors.ImageSharp.PixelFormats
/// <inheritdoc/>
[MethodImpl(InliningOptions.ShortMethod)]
public void FromRgba32(Rgba32 source) => this = source.Rgb;
public void FromRgba32(Rgba32 source)
{
#if NETSTANDARD2_0
// See https://github.com/SixLabors/ImageSharp/issues/1275
this.R = source.R;
this.G = source.G;
this.B = source.B;
#else
this = source.Rgb;
#endif
}
/// <inheritdoc />
[MethodImpl(InliningOptions.ShortMethod)]

Loading…
Cancel
Save