Merge pull request #17 from fintelia/master

Fix calculation of uncompressed_strip_size
This commit is contained in:
Sven Nilsen authored and GitHub committed 2018-09-26 21:52:03 +02:00
commit 3239a37003
1 file changed
+1 -1
+1 -1
View File
@@ -472,7 +472,7 @@ impl<R: Read + Seek> Decoder<R> {
for (i, (&offset, &byte_count)) in try!(self.get_tag_u32_vec(ifd::Tag::StripOffsets))
.iter().zip(try!(self.get_tag_u32_vec(ifd::Tag::StripByteCounts)).iter()).enumerate() {
let uncompressed_strip_size = scanline_size
* (self.height as usize - i * rows_per_strip);
* (self.height as usize - i * rows_per_strip).min(rows_per_strip);
units_read += match result {
DecodingResult::U8(ref mut buffer) => {