diff --git a/src/ImageSharp/PixelFormats/Rgb24.cs b/src/ImageSharp/PixelFormats/Rgb24.cs index fa03683c69..c540a7d120 100644 --- a/src/ImageSharp/PixelFormats/Rgb24.cs +++ b/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. /// /// - [StructLayout(LayoutKind.Sequential)] + [StructLayout(LayoutKind.Explicit)] public struct Rgb24 : IPixel { /// /// The red component. /// + [FieldOffset(0)] public byte R; /// /// The green component. /// + [FieldOffset(1)] public byte G; /// /// The blue component. /// + [FieldOffset(2)] public byte B; ///