File indexing completed on 2025-01-05 03:58:11

0001 /* ============================================================
0002  *
0003  * This file is a part of digiKam project
0004  * https://www.digikam.org
0005  *
0006  * Date        : 28/08/2021
0007  * Description : a command line tool to detect image exposure level
0008  *
0009  * SPDX-FileCopyrightText: 2021-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
0010  * SPDX-FileCopyrightText: 2021-2022 by Phuoc Khanh Le <phuockhanhnk94 at gmail dot com>
0011  *
0012  * SPDX-License-Identifier: GPL-2.0-or-later
0013  *
0014  * ============================================================ */
0015 
0016 // Qt includes
0017 
0018 #include <QApplication>
0019 #include <QDebug>
0020 
0021 // Local includes
0022 
0023 #include "imgqsorttest_shared.h"
0024 #include "digikam_globals.h"
0025 #include "dpluginloader.h"
0026 
0027 using namespace Digikam;
0028 
0029 int main(int argc, char** argv)
0030 {
0031     if (argc != 2)
0032     {
0033         qDebug() << "detectexposure - Parse image data to detect over exposure level";
0034         qDebug() << "Usage: <image file>";
0035         return -1;
0036     }
0037 
0038     QApplication app(argc, argv);
0039 
0040     DPluginLoader::instance()->init();
0041 
0042     QString path                = QString::fromUtf8(argv[1]);
0043     QFileInfoList list          = QFileInfoList() << QFileInfo(path);
0044     ImgQSortTest_ParseTestImagesDefautDetection(DETECTEXPOSURE, list);
0045 
0046     return 0;
0047 }