2020-12-23 11:12:49 +00:00
|
|
|
#include <qpdf/Pl_DCT.hh>
|
2022-04-02 21:14:10 +00:00
|
|
|
#include <qpdf/QPDFStreamFilter.hh>
|
2020-12-23 11:12:49 +00:00
|
|
|
#include <memory>
|
|
|
|
|
|
|
|
#ifndef SF_DCTDECODE_HH
|
2022-04-02 21:14:10 +00:00
|
|
|
# define SF_DCTDECODE_HH
|
2020-12-23 11:12:49 +00:00
|
|
|
|
|
|
|
class SF_DCTDecode: public QPDFStreamFilter
|
|
|
|
{
|
|
|
|
public:
|
|
|
|
SF_DCTDecode() = default;
|
|
|
|
virtual ~SF_DCTDecode() = default;
|
|
|
|
|
2022-04-02 21:14:10 +00:00
|
|
|
virtual Pipeline*
|
|
|
|
getDecodePipeline(Pipeline* next) override
|
2020-12-23 11:12:49 +00:00
|
|
|
{
|
|
|
|
this->pipeline = std::make_shared<Pl_DCT>("DCT decode", next);
|
|
|
|
return this->pipeline.get();
|
|
|
|
}
|
|
|
|
|
2022-04-02 21:14:10 +00:00
|
|
|
static std::shared_ptr<QPDFStreamFilter>
|
|
|
|
factory()
|
2020-12-23 11:12:49 +00:00
|
|
|
{
|
|
|
|
return std::make_shared<SF_DCTDecode>();
|
|
|
|
}
|
|
|
|
|
2022-04-02 21:14:10 +00:00
|
|
|
virtual bool
|
|
|
|
isSpecializedCompression() override
|
2020-12-23 11:12:49 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
2022-04-02 21:14:10 +00:00
|
|
|
virtual bool
|
|
|
|
isLossyCompression() override
|
2020-12-23 11:12:49 +00:00
|
|
|
{
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
|
|
|
|
private:
|
|
|
|
std::shared_ptr<Pipeline> pipeline;
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif // SF_DCTDECODE_HH
|