digiKam
dimgpngloader.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 : 2005-11-01
7  * Description : a PNG image loader for DImg framework.
8  *
9  * Copyright (C) 2005-2022 by Gilles Caulier <caulier dot gilles at gmail dot com>
10  *
11  * This program is free software; you can redistribute it
12  * and/or modify it under the terms of the GNU General
13  * Public License as published by the Free Software Foundation;
14  * either version 2, or (at your option)
15  * any later version.
16  *
17  * This program is distributed in the hope that it will be useful,
18  * but WITHOUT ANY WARRANTY; without even the implied warranty of
19  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20  * GNU General Public License for more details.
21  *
22  * ============================================================ */
23 
24 #ifndef DIGIKAM_DIMG_PNG_LOADER_H
25 #define DIGIKAM_DIMG_PNG_LOADER_H
26 
27 // C++ includes
28 
29 #include <cstdarg>
30 
31 // Local includes
32 
33 #include "dimg.h"
34 #include "dimgloader.h"
35 
36 using namespace Digikam;
37 
38 namespace DigikamPNGDImgPlugin
39 {
40 
41 class DImgPNGLoader : public DImgLoader
42 {
43 public:
44 
45  explicit DImgPNGLoader(DImg* const image);
46  ~DImgPNGLoader() override;
47 
48  bool load(const QString& filePath, DImgLoaderObserver* const observer) override;
49  bool save(const QString& filePath, DImgLoaderObserver* const observer) override;
50 
51  bool hasAlpha() const override;
52  bool sixteenBit() const override;
53  bool isReadOnly() const override;
54 
55 private:
56 
57  bool m_sixteenBit;
58  bool m_hasAlpha;
59 };
60 
61 } // namespace DigikamPNGDImgPlugin
62 
63 #endif // DIGIKAM_DIMG_PNG_LOADER_H
Definition: dimgpngloader.h:42
Definition: dimgloaderobserver.h:41
Definition: dimgloader.h:51
Definition: dimg.h:62
Definition: dimgpngloader.cpp:66
Definition: datefolderview.cpp:43