mirror of
https://github.com/qpdf/qpdf.git
synced 2024-12-22 10:58:58 +00:00
In Pl_TIFFPredictor::processRow buffer output
This commit is contained in:
parent
20ca1e8644
commit
d946ad6c30
@ -78,6 +78,7 @@ Pl_TIFFPredictor::processRow()
|
||||
}
|
||||
bw.flush();
|
||||
} else {
|
||||
out.clear();
|
||||
auto next = cur_row.begin();
|
||||
auto cr_end = cur_row.end();
|
||||
auto pr_end = previous.end();
|
||||
@ -93,10 +94,10 @@ Pl_TIFFPredictor::processRow()
|
||||
new_sample += *prev;
|
||||
*prev = new_sample;
|
||||
}
|
||||
auto out = static_cast<unsigned char>(255U & new_sample);
|
||||
p_next->write(&out, 1);
|
||||
out.push_back(static_cast<unsigned char>(255U & new_sample));
|
||||
}
|
||||
}
|
||||
p_next->write(out.data(), out.size());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -35,6 +35,7 @@ class Pl_TIFFPredictor: public Pipeline
|
||||
unsigned int bits_per_sample;
|
||||
std::vector<unsigned char> cur_row;
|
||||
std::vector<long long> previous;
|
||||
std::vector<unsigned char> out;
|
||||
Pipeline* p_next;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user