2020-12-23 11:12:49 +00:00
|
|
|
#include <qpdf/QPDFStreamFilter.hh>
|
|
|
|
#include <memory>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#ifndef SF_FLATELZWDECODE_HH
|
|
|
|
# define SF_FLATELZWDECODE_HH
|
|
|
|
|
|
|
|
class SF_FlateLzwDecode: public QPDFStreamFilter
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
SF_FlateLzwDecode(bool lzw);
|
2023-06-01 14:21:32 +00:00
|
|
|
~SF_FlateLzwDecode() override = default;
|
2020-12-23 11:12:49 +00:00
|
|
|
|
2023-06-01 14:21:32 +00:00
|
|
|
bool setDecodeParms(QPDFObjectHandle decode_parms) override;
|
|
|
|
Pipeline* getDecodePipeline(Pipeline* next) override;
|
2020-12-23 11:12:49 +00:00
|
|
|
|
|
|
|
static std::shared_ptr<QPDFStreamFilter> flate_factory();
|
|
|
|
static std::shared_ptr<QPDFStreamFilter> lzw_factory();
|
|
|
|
|
|
|
|
private:
|
|
|
|
bool lzw;
|
|
|
|
int predictor;
|
|
|
|
int columns;
|
|
|
|
int colors;
|
|
|
|
int bits_per_component;
|
|
|
|
bool early_code_change;
|
|
|
|
std::vector<std::shared_ptr<Pipeline>> pipelines;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SF_FLATELZWDECODE_HH
|