Browse Source

The colorPaletteSize is also part of the file size.

pull/1384/head
Dirk Lemstra 6 years ago
parent
commit
153c486a8e
No known key found for this signature in database GPG Key ID: 57FEA4B5173E68
  1. 2
      src/ImageSharp/Formats/Bmp/BmpEncoderCore.cs

2
src/ImageSharp/Formats/Bmp/BmpEncoderCore.cs

@ -171,7 +171,7 @@ namespace SixLabors.ImageSharp.Formats.Bmp
var fileHeader = new BmpFileHeader(
type: BmpConstants.TypeMarkers.Bitmap,
fileSize: BmpFileHeader.Size + infoHeaderSize + infoHeader.ImageSize,
fileSize: BmpFileHeader.Size + infoHeaderSize + colorPaletteSize + infoHeader.ImageSize,
reserved: 0,
offset: BmpFileHeader.Size + infoHeaderSize + colorPaletteSize);

Loading…
Cancel
Save