mirror of
https://github.com/qpdf/qpdf.git
synced 2024-05-30 08:50:51 +00:00
a68703b07e
(patrepl and cleanpatch are my own utilities) patrepl s/PointerHolder/std::shared_ptr/g {include,libqpdf}/qpdf/*.hh patrepl s/PointerHolder/std::shared_ptr/g libqpdf/*.cc patrepl s/make_pointer_holder/std::make_shared/g libqpdf/*.cc patrepl s/make_array_pointer_holder/QUtil::make_shared_array/g libqpdf/*.cc patrepl s,qpdf/std::shared_ptr,qpdf/PointerHolder, **/*.cc **/*.hh git restore include/qpdf/PointerHolder.hh cleanpatch ./format-code
43 lines
956 B
C++
43 lines
956 B
C++
#ifndef PL_TIFFPREDICTOR_HH
|
|
#define PL_TIFFPREDICTOR_HH
|
|
|
|
// This pipeline reverses the application of a TIFF predictor as
|
|
// described in the TIFF specification.
|
|
|
|
#include <qpdf/Pipeline.hh>
|
|
|
|
class Pl_TIFFPredictor: public Pipeline
|
|
{
|
|
public:
|
|
enum action_e { a_encode, a_decode };
|
|
|
|
QPDF_DLL
|
|
Pl_TIFFPredictor(
|
|
char const* identifier,
|
|
Pipeline* next,
|
|
action_e action,
|
|
unsigned int columns,
|
|
unsigned int samples_per_pixel = 1,
|
|
unsigned int bits_per_sample = 8);
|
|
QPDF_DLL
|
|
virtual ~Pl_TIFFPredictor();
|
|
|
|
QPDF_DLL
|
|
virtual void write(unsigned char* data, size_t len);
|
|
QPDF_DLL
|
|
virtual void finish();
|
|
|
|
private:
|
|
void processRow();
|
|
|
|
action_e action;
|
|
unsigned int columns;
|
|
unsigned int bytes_per_row;
|
|
unsigned int samples_per_pixel;
|
|
unsigned int bits_per_sample;
|
|
std::shared_ptr<unsigned char> cur_row;
|
|
size_t pos;
|
|
};
|
|
|
|
#endif // PL_TIFFPREDICTOR_HH
|