Engauge Digitizer  2
 All Classes Files Functions Variables Enumerations Enumerator Friends Pages
Jpeg2000.h
1 #ifndef JPEG2000_H
2 #define JPEG2000_H
3 
4 #include "openjpeg.h" // Before Jpeg2000Convert.h
5 
6 #include "Jpeg2000Convert.h" // Before lcms.h and lcms2.h
7 #ifdef OPJ_HAVE_LIBLCMS2
8 #include <lcms2.h>
9 #endif
10 #ifdef OPJ_HAVE_LIBLCMS1
11 #include <lcms.h>
12 #endif
13 #include "Jpeg2000Color.h" // After lcms.h and lcms2.h
14 #include <QStringList>
15 
16 class QImage;
17 class QString;
18 
20 class Jpeg2000
21 {
22  public:
24  Jpeg2000();
25 
27  bool load (const QString &filename,
28  QImage &image) const;
29 
31  QStringList supportedImageWildcards () const;
32 
33  private:
34 
35  void applyImageTweaks (opj_image_t *image) const;
36  opj_codec_t *decode (int decodeFormat) const;
37  int getFileFormat(const char *filename) const;
38  void initializeParameters (opj_dparameters_t &parameters) const;
39  int inputFormat(const char *filename) const;
40  bool invalidFileExtension (const QString &filename) const;
41  QStringList supportedFileExtensions () const;
42 
43 };
44 
45 #endif // JPEG2000_H
Wrapper around OpenJPEG library, in C, for opening jpeg2000 files.
Definition: Jpeg2000.h:20
bool load(const QString &filename, QImage &image) const
Load image from jpeg2000 file.
Definition: Jpeg2000.cpp:186
Jpeg2000()
Single constructor.
Definition: Jpeg2000.cpp:15
QStringList supportedImageWildcards() const
List the supported jpeg2000 file extensions, for filtering import files.
Definition: Jpeg2000.cpp:299