00001
00002
00003
00004
00005
00006
00007 #ifndef JPEG2000_H
00008 #define JPEG2000_H
00009
00010 #include "openjpeg.h"
00011
00012 #include "Jpeg2000Convert.h"
00013 #ifdef OPJ_HAVE_LIBLCMS2
00014 #include <lcms2.h>
00015 #endif
00016 #ifdef OPJ_HAVE_LIBLCMS1
00017 #include <lcms.h>
00018 #endif
00019 #include "Jpeg2000Color.h"
00020 #include <QStringList>
00021
00022 class QImage;
00023 class QString;
00024
00026 class Jpeg2000
00027 {
00028 public:
00030 Jpeg2000();
00031
00033 bool load (const QString &filename,
00034 QImage &image) const;
00035
00037 QStringList supportedImageWildcards () const;
00038
00039 private:
00040
00041 void applyImageTweaks (opj_image_t *image) const;
00042 opj_codec_t *decode (int decodeFormat) const;
00043 int getFileFormat(const char *filename) const;
00044 void initializeParameters (opj_dparameters_t ¶meters) const;
00045 int inputFormat(const char *filename) const;
00046 bool invalidFileExtension (const QString &filename) const;
00047 QStringList supportedFileExtensions () const;
00048
00049 };
00050
00051 #endif // JPEG2000_H