Browse Source

using also LayoutKind.Explicit for rgb24, because it may also be affected by #576

pull/591/head
popow 8 years ago
parent
commit
9e7d5b48fd
  1. 5
      src/ImageSharp/PixelFormats/Rgb24.cs

5
src/ImageSharp/PixelFormats/Rgb24.cs

@ -15,22 +15,25 @@ namespace SixLabors.ImageSharp.PixelFormats
/// Ranges from [0, 0, 0, 1] to [1, 1, 1, 1] in vector form. /// Ranges from [0, 0, 0, 1] to [1, 1, 1, 1] in vector form.
/// </para> /// </para>
/// </summary> /// </summary>
[StructLayout(LayoutKind.Sequential)] [StructLayout(LayoutKind.Explicit)]
public struct Rgb24 : IPixel<Rgb24> public struct Rgb24 : IPixel<Rgb24>
{ {
/// <summary> /// <summary>
/// The red component. /// The red component.
/// </summary> /// </summary>
[FieldOffset(0)]
public byte R; public byte R;
/// <summary> /// <summary>
/// The green component. /// The green component.
/// </summary> /// </summary>
[FieldOffset(1)]
public byte G; public byte G;
/// <summary> /// <summary>
/// The blue component. /// The blue component.
/// </summary> /// </summary>
[FieldOffset(2)]
public byte B; public byte B;
/// <summary> /// <summary>

Loading…
Cancel
Save