From 9e7d5b48fddca7d40dd0244d382a7f2a11e25ca1 Mon Sep 17 00:00:00 2001 From: popow Date: Wed, 23 May 2018 12:34:46 +0200 Subject: [PATCH] using also LayoutKind.Explicit for rgb24, because it may also be affected by #576 --- src/ImageSharp/PixelFormats/Rgb24.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) 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; ///