Browse Source

Fix for Issue #871 and #914 (#915)

af/merge-core
Brian Popow 7 years ago
committed by James Jackson-South
parent
commit
561b0a619c
  1. 13
      src/ImageSharp/PixelFormats/PixelImplementations/Rgba32.cs

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

@ -136,13 +136,16 @@ namespace SixLabors.ImageSharp.PixelFormats
/// </summary> /// </summary>
public Rgb24 Rgb public Rgb24 Rgb
{ {
// If this is changed to ShortMethod then several jpeg encoding tests fail [MethodImpl(InliningOptions.ShortMethod)]
// on 32 bit Net 4.6.2 and NET 4.7.1 get => new Rgb24(this.R, this.G, this.B);
[MethodImpl(InliningOptions.ColdPath)]
get => Unsafe.As<Rgba32, Rgb24>(ref this);
[MethodImpl(InliningOptions.ShortMethod)] [MethodImpl(InliningOptions.ShortMethod)]
set => Unsafe.As<Rgba32, Rgb24>(ref this) = value; set
{
this.R = value.R;
this.G = value.G;
this.B = value.B;
}
} }
/// <summary> /// <summary>

Loading…
Cancel
Save