aboutsummaryrefslogtreecommitdiffstats
path: root/libqpdf/qpdf/SF_DCTDecode.hh
blob: 619cf9c40a8b9a66bd37c74f8d1d39c0b3439ab2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#include <qpdf/Pl_DCT.hh>
#include <qpdf/QPDFStreamFilter.hh>
#include <memory>

#ifndef SF_DCTDECODE_HH
# define SF_DCTDECODE_HH

class SF_DCTDecode: public QPDFStreamFilter
{
  public:
    SF_DCTDecode() = default;
    ~SF_DCTDecode() override = default;

    Pipeline*
    getDecodePipeline(Pipeline* next) override
    {
        this->pipeline = std::make_shared<Pl_DCT>("DCT decode", next);
        return this->pipeline.get();
    }

    static std::shared_ptr<QPDFStreamFilter>
    factory()
    {
        return std::make_shared<SF_DCTDecode>();
    }

    bool
    isSpecializedCompression() override
    {
        return true;
    }

    bool
    isLossyCompression() override
    {
        return true;
    }

  private:
    std::shared_ptr<Pipeline> pipeline;
};

#endif // SF_DCTDECODE_HH