@@ -26,6 +26,8 @@ internal sealed class DeflateTiffCompression : TiffBaseDecompressor
26
26
27
27
private readonly int tileWidth ;
28
28
29
+ private readonly int tileHeight ;
30
+
29
31
/// <summary>
30
32
/// Initializes a new instance of the <see cref="DeflateTiffCompression" /> class.
31
33
/// </summary>
@@ -37,13 +39,15 @@ internal sealed class DeflateTiffCompression : TiffBaseDecompressor
37
39
/// <param name="isBigEndian">if set to <c>true</c> decodes the pixel data as big endian, otherwise as little endian.</param>
38
40
/// <param name="isTiled">Flag indicates, if the image is a tiled image.</param>
39
41
/// <param name="tileWidth">Number of pixels in a tile row.</param>
40
- public DeflateTiffCompression ( MemoryAllocator memoryAllocator , int width , int bitsPerPixel , TiffColorType colorType , TiffPredictor predictor , bool isBigEndian , bool isTiled , int tileWidth )
42
+ /// <param name="tileHeight">Number of rows in a tile.</param>
43
+ public DeflateTiffCompression ( MemoryAllocator memoryAllocator , int width , int bitsPerPixel , TiffColorType colorType , TiffPredictor predictor , bool isBigEndian , bool isTiled , int tileWidth , int tileHeight )
41
44
: base ( memoryAllocator , width , bitsPerPixel , predictor )
42
45
{
43
46
this . colorType = colorType ;
44
47
this . isBigEndian = isBigEndian ;
45
48
this . isTiled = isTiled ;
46
49
this . tileWidth = tileWidth ;
50
+ this . tileHeight = tileHeight ;
47
51
}
48
52
49
53
/// <inheritdoc/>
@@ -81,7 +85,7 @@ protected override void Decompress(BufferedReadStream stream, int byteCount, int
81
85
if ( this . isTiled )
82
86
{
83
87
// When the image is tiled, undoing the horizontal predictor will be done for each tile row.
84
- HorizontalPredictor . UndoTile ( buffer , this . tileWidth , this . colorType , this . isBigEndian ) ;
88
+ HorizontalPredictor . UndoTile ( buffer , this . tileWidth , this . tileHeight , this . colorType , this . isBigEndian ) ;
85
89
}
86
90
else
87
91
{
0 commit comments