scantools  1.0.4
Graphics manipulation with a view towards scanned documents
compressionTest.h
1 /*
2  * Copyright © 2016-2017 Stefan Kebekus <stefan.kebekus@math.uni-freiburg.de>
3  *
4  * This program is free software: you can redistribute it and/or modify it under
5  * the terms of the GNU General Public License as published by the Free Software
6  * Foundation, either version 3 of the License, or (at your option) any later
7  * version.
8  *
9  * This program is distributed in the hope that it will be useful, but WITHOUT
10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
11  * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
12  * details.
13  *
14  * You should have received a copy of the GNU General Public License along with
15  * this program. If not, see <http://www.gnu.org/licenses/>.
16  */
17 
18 #include <QTest>
19 
20 class compressionTest: public QObject
21 {
22  Q_OBJECT
23 
24  public:
25  // Uses undocumented TIFF FAX encoder
26  QByteArray referenceFAXEncoder(const QImage &image);
27 
28  // Analyses errors in FAX compression
29  bool bisectAndAnalyseFAXCompressionError(QImage &image);
30 
31  private slots:
32  void faxG4Compression_data();
33  void faxG4Compression();
34  void zlibCompression_data();
35  void zlibCompression();
36  void zopfliCompression_data();
37  void zopfliCompression();
38 };