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 noise 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() << "detectnoise - Parse image data to detect noise level";
0034         qDebug() << "Usage: <image file>";
0035 
0036         return -1;
0037     }
0038 
0039     QApplication app(argc, argv);
0040 
0041     DPluginLoader::instance()->init();
0042 
0043     QString path                = QString::fromUtf8(argv[1]);
0044     QFileInfoList list          = QFileInfoList() << QFileInfo(path);
0045 
0046     ImgQSortTest_ParseTestImagesDefautDetection(DETECTCOMPRESSION, list);
0047 
0048     return 0;
0049 }