digiKam
Loading...
Searching...
No Matches
autocrop.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 : 2012-10-18
7 * Description : Auto Crop analyzer
8 *
9 * SPDX-FileCopyrightText: 2013 by Sayantan Datta <sayantan dot knz at gmail dot com>
10 * SPDX-FileCopyrightText: 2013-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
11 *
12 * SPDX-License-Identifier: GPL-2.0-or-later
13 *
14 * ============================================================ */
15
16#pragma once
17
18// Qt includes
19
20#include <QObject>
21#include <QRect>
22#include <QImage>
23
24// Local includes
25
26#include "digikam_export.h"
27#include "nrfilter.h"
28#include "dimg.h"
30
31namespace Digikam
32{
33
34class DIGIKAM_EXPORT AutoCrop : public DImgThreadedAnalyser
35{
36 Q_OBJECT
37
38public:
39
43 explicit AutoCrop(DImg* const orgImage, QObject* const parent = nullptr);
44 ~AutoCrop() override;
45
50 void startAnalyse() override;
51
55 QRect autoInnerCrop() const;
56
57private:
58
65 QRect spiralClockwiseTraversal(const QImage& source, int topCrop = -1, int bottomCrop = -1);
66
67private:
68
69 class Private;
70 Private* const d = nullptr;
71};
72
73} // namespace Digikam
Definition autocrop.h:35
Definition dimgthreadedanalyser.h:28
Definition dimg.h:52
Definition datefolderview.cpp:34