Browse Source

Fix issue with packed bits and bi color tiffs

pull/1570/head
Brian Popow 6 years ago
parent
commit
b04b9f4c7f
  1. 2
      src/ImageSharp/Formats/Tiff/README.md
  2. 2
      src/ImageSharp/Formats/Tiff/Utils/TiffWriter.cs

2
src/ImageSharp/Formats/Tiff/README.md

@ -42,7 +42,7 @@
|---------------------------|:-----:|:-----:|--------------------------|
|None | Y | Y | |
|Ccitt1D | Y | Y | |
|PackBits | | Y | |
|PackBits | Y | Y | |
|CcittGroup3Fax | Y | Y | |
|CcittGroup4Fax | | | |
|Lzw | | Y | Based on ImageSharp GIF LZW implementation - this code could be modified to be (i) shared, or (ii) optimised for each case |

2
src/ImageSharp/Formats/Tiff/Utils/TiffWriter.cs

@ -591,7 +591,7 @@ namespace SixLabors.ImageSharp.Formats.Tiff.Utils
}
var size = PackBitsWriter.PackBits(outputRow, compressedRowSpan);
this.output.Write(compressedRowSpan);
this.output.Write(compressedRowSpan.Slice(0, size));
bytesWritten += size;
outputRow.Clear();

Loading…
Cancel
Save