Browse Source

Os2Short -> Os22ShortSize

af/merge-core
popow 7 years ago
parent
commit
d446c0cb7d
  1. 4
      src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs
  2. 4
      src/ImageSharp/Formats/Bmp/BmpInfoHeader.cs

4
src/ImageSharp/Formats/Bmp/BmpDecoderCore.cs

@ -510,10 +510,10 @@ namespace SixLabors.ImageSharp.Formats.Bmp
// 12 bytes
this.infoHeader = BmpInfoHeader.ParseCore(buffer);
}
else if (headerSize == BmpInfoHeader.Os2Short)
else if (headerSize == BmpInfoHeader.Os22ShortSize)
{
// 16 bytes
this.infoHeader = BmpInfoHeader.ParseOs2Short(buffer);
this.infoHeader = BmpInfoHeader.ParseOs22Short(buffer);
}
else if (headerSize >= BmpInfoHeader.Size)
{

4
src/ImageSharp/Formats/Bmp/BmpInfoHeader.cs

@ -29,7 +29,7 @@ namespace SixLabors.ImageSharp.Formats.Bmp
/// <summary>
/// Defines the size of the short variant of the OS22XBITMAPHEADER data structure in the bitmap file.
/// </summary>
public const int Os2Short = 16;
public const int Os22ShortSize = 16;
/// <summary>
/// Defines the size of the biggest supported header data structure in the bitmap file.
@ -168,7 +168,7 @@ namespace SixLabors.ImageSharp.Formats.Bmp
/// <param name="data">The data to parse.</param>
/// <returns>Parsed header</returns>
/// <seealso href="https://www.fileformat.info/format/os2bmp/egff.htm"/>
public static BmpInfoHeader ParseOs2Short(ReadOnlySpan<byte> data)
public static BmpInfoHeader ParseOs22Short(ReadOnlySpan<byte> data)
{
return new BmpInfoHeader(
headerSize: BinaryPrimitives.ReadInt32LittleEndian(data.Slice(0, 4)),

Loading…
Cancel
Save