digiKam
dimgjpeg2000loader.h
Go to the documentation of this file.
1 /* ============================================================
2  *
3  * This file is a part of digiKam project
4  * https://www.digikam.org
5  *
6  * Date : 2006-06-14
7  * Description : A JPEG-2000 IO file for DImg framework
8  *
9  * Copyright (C) 2006-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  *
11  * Others Linux JPEG-2000 Loader implementation:
12  * https://github.com/ImageMagick/ImageMagick/blob/master/coders/jp2.c
13  * https://github.com/GNOME/gimp/blob/master/plug-ins/common/file-jp2-load.c
14  * https://invent.kde.org/kde/krita/tree/fc1d4dce1c12a1a663d02436cde15a77e067af2c/plugins/impex/jp2
15  * https://github.com/darktable-org/darktable/blob/master/src/imageio/format/j2k.c
16  *
17  * This program is free software; you can redistribute it
18  * and/or modify it under the terms of the GNU General
19  * Public License as published by the Free Software Foundation;
20  * either version 2, or (at your option)
21  * any later version.
22  *
23  * This program is distributed in the hope that it will be useful,
24  * but WITHOUT ANY WARRANTY; without even the implied warranty of
25  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
26  * GNU General Public License for more details.
27  *
28  * ============================================================ */
29 
30 #ifndef DIGIKAM_DIMG_JPEG_2000_LOADER_H
31 #define DIGIKAM_DIMG_JPEG_2000_LOADER_H
32 
33 // Local includes
34 
35 #include "dimg.h"
36 #include "dimgloader.h"
37 
38 using namespace Digikam;
39 
41 {
42 
44 {
45 
46 public:
47 
48  explicit DImgJPEG2000Loader(DImg* const image);
49  ~DImgJPEG2000Loader() override;
50 
51  bool load(const QString& filePath, DImgLoaderObserver* const observer) override;
52  bool save(const QString& filePath, DImgLoaderObserver* const observer) override;
53 
54  bool hasAlpha() const override;
55  bool sixteenBit() const override;
56  bool isReadOnly() const override;
57 
58 private:
59 
60  bool m_sixteenBit;
61  bool m_hasAlpha;
62 };
63 
64 } // namespace DigikamJPEG2000DImgPlugin
65 
66 #endif // DIGIKAM_DIMG_JPEG_2000_LOADER_H
Definition: dimgjpeg2000loader.h:44
Definition: dimgloaderobserver.h:41
Definition: dimgloader.h:51
Definition: dimg.h:62
Definition: dimgjpeg2000loader.cpp:31
Definition: datefolderview.cpp:43