Skip to content

Commit

Permalink
using also LayoutKind.Explicit for rgb24, because it may also be affe…
Browse files Browse the repository at this point in the history
…cted by SixLabors#576
  • Loading branch information
brianpopow committed May 23, 2018
1 parent 7f7e6d3 commit 9e7d5b4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/ImageSharp/PixelFormats/Rgb24.cs
Original file line number Diff line number Diff line change
Expand Up @@ -15,22 +15,25 @@ namespace SixLabors.ImageSharp.PixelFormats
/// Ranges from [0, 0, 0, 1] to [1, 1, 1, 1] in vector form.
/// </para>
/// </summary>
[StructLayout(LayoutKind.Sequential)]
[StructLayout(LayoutKind.Explicit)]
public struct Rgb24 : IPixel<Rgb24>
{
/// <summary>
/// The red component.
/// </summary>
[FieldOffset(0)]
public byte R;

/// <summary>
/// The green component.
/// </summary>
[FieldOffset(1)]
public byte G;

/// <summary>
/// The blue component.
/// </summary>
[FieldOffset(2)]
public byte B;

/// <summary>
Expand Down

0 comments on commit 9e7d5b4

Please sign in to comment.