1//========================================================================
2//
3// ImgWriter.h
4//
5// This file is licensed under the GPLv2 or later
6//
7// Copyright (C) 2009 Stefan Thomas <thomas@eload24.com>
8// Copyright (C) 2009, 2011, 2018, 2022 Albert Astals Cid <aacid@kde.org>
9// Copyright (C) 2010 Adrian Johnson <ajohnson@redneon.com>
10// Copyright (C) 2010 Brian Cameron <brian.cameron@oracle.com>
11// Copyright (C) 2011 Thomas Freitag <Thomas.Freitag@alfa.de>
12//
13//========================================================================
14
15#ifndef IMGWRITER_H
16#define IMGWRITER_H
17
18#include "poppler_private_export.h"
19
20#include <cstdio>
21
22class POPPLER_PRIVATE_EXPORT ImgWriter
23{
24public:
25 ImgWriter() = default;
26 ImgWriter(const ImgWriter &) = delete;
27 ImgWriter &operator=(const ImgWriter &other) = delete;
28
29 virtual ~ImgWriter();
30 virtual bool init(FILE *f, int width, int height, double hDPI, double vDPI) = 0;
31
32 virtual bool writePointers(unsigned char **rowPointers, int rowCount) = 0;
33 virtual bool writeRow(unsigned char **row) = 0;
34
35 virtual bool close() = 0;
36 virtual bool supportCMYK() { return false; }
37};
38
39#endif
40

source code of poppler/goo/ImgWriter.h