Engauge Digitizer 2
Loading...
Searching...
No Matches
Jpeg2000.h
Go to the documentation of this file.
1/******************************************************************************************************
2 * (C) 2014 markummitchell@github.com. This file is part of Engauge Digitizer, which is released *
3 * under GNU General Public License version 2 (GPLv2) or (at your option) any later version. See file *
4 * LICENSE or go to gnu.org/licenses for details. Distribution requires prior written permission. *
5 ******************************************************************************************************/
6
7#ifndef JPEG2000_H
8#define JPEG2000_H
9
10#include "openjpeg.h" // Before Jpeg2000Convert.h
11
12#include "Jpeg2000Convert.h" // Before lcms.h and lcms2.h
13#ifdef OPJ_HAVE_LIBLCMS2
14#include <lcms2.h>
15#endif
16#ifdef OPJ_HAVE_LIBLCMS1
17#include <lcms.h>
18#endif
19#include "Jpeg2000Color.h" // After lcms.h and lcms2.h
20#include <QStringList>
21
22class QImage;
23class QString;
24
27{
28 public:
30 Jpeg2000();
31
33 bool load (const QString &filename,
34 QImage &image) const;
35
38
39 private:
40
41 void applyImageTweaks (opj_image_t *image) const;
42 opj_codec_t *decode (int decodeFormat) const;
43 int getFileFormat(const char *filename) const;
44 void initializeParameters (opj_dparameters_t &parameters) const;
45 int inputFormat(const char *filename) const;
46 bool invalidFileExtension (const QString &filename) const;
47 QStringList supportedFileExtensions () const;
48
49};
50
51#endif // JPEG2000_H
const int INNER_RADIUS_MIN
Wrapper around OpenJPEG library, in C, for opening jpeg2000 files.
Definition Jpeg2000.h:27
QStringList supportedImageWildcards() const
List the supported jpeg2000 file extensions, for filtering import files.
Definition Jpeg2000.cpp:305
bool load(const QString &filename, QImage &image) const
Load image from jpeg2000 file.
Definition Jpeg2000.cpp:192
Jpeg2000()
Single constructor.
Definition Jpeg2000.cpp:21