File indexing completed on 2025-01-19 03:51:02

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 2005-11-01
0007  * Description : a PNG image loader for DImg framework.
0008  *
0009  * SPDX-FileCopyrightText: 2005-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  *
0011  * SPDX-License-Identifier: GPL-2.0-or-later
0012  *
0013  * ============================================================ */
0014 
0015 #ifndef DIGIKAM_DIMG_PNG_LOADER_H
0016 #define DIGIKAM_DIMG_PNG_LOADER_H
0017 
0018 // C++ includes
0019 
0020 #include <cstdarg>
0021 
0022 // Local includes
0023 
0024 #include "dimg.h"
0025 #include "dimgloader.h"
0026 
0027 using namespace Digikam;
0028 
0029 namespace DigikamPNGDImgPlugin
0030 {
0031 
0032 class DImgPNGLoader : public DImgLoader
0033 {
0034 public:
0035 
0036     explicit DImgPNGLoader(DImg* const image);
0037     ~DImgPNGLoader()                                                       override;
0038 
0039     bool load(const QString& filePath, DImgLoaderObserver* const observer) override;
0040     bool save(const QString& filePath, DImgLoaderObserver* const observer) override;
0041 
0042     bool hasAlpha()                                                  const override;
0043     bool sixteenBit()                                                const override;
0044     bool isReadOnly()                                                const override;
0045 
0046 private:
0047 
0048     bool m_sixteenBit;
0049     bool m_hasAlpha;
0050 };
0051 
0052 } // namespace DigikamPNGDImgPlugin
0053 
0054 #endif // DIGIKAM_DIMG_PNG_LOADER_H