digiKam
Loading...
Searching...
No Matches
embossfilter.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-05-25
7 * Description : Emboss threaded image filter.
8 *
9 * SPDX-FileCopyrightText: 2005-2024 by Gilles Caulier <caulier dot gilles at gmail dot com>
10 * SPDX-FileCopyrightText: 2006-2010 by Marcel Wiesweg <marcel dot wiesweg at gmx dot de>
11 * SPDX-FileCopyrightText: 2010 by Martin Klapetek <martin dot klapetek at gmail dot com>
12 *
13 * Original Emboss algorithm copyrighted 2004 by
14 * Pieter Z. Voloshyn <pieter dot voloshyn at gmail dot com>.
15 *
16 * SPDX-License-Identifier: GPL-2.0-or-later
17 *
18 * ============================================================ */
19
20#pragma once
21
22// Local includes
23
24#include "digikam_export.h"
25#include "dimgthreadedfilter.h"
26#include "digikam_globals.h"
27
28namespace Digikam
29{
30
31class DIGIKAM_EXPORT EmbossFilter : public DImgThreadedFilter
32{
33 Q_OBJECT
34
35public:
36
37 explicit EmbossFilter(QObject* const parent = nullptr);
38 explicit EmbossFilter(DImg* const orgImage, QObject* const parent = nullptr, int depth=30);
39 ~EmbossFilter() override;
40
41 static QString FilterIdentifier()
42 {
43 return QLatin1String("digikam:EmbossFilter");
44 }
45
46 static QString DisplayableName();
47
48 static QList<int> SupportedVersions()
49 {
50 return QList<int>() << 1;
51 }
52
53 static int CurrentVersion()
54 {
55 return 1;
56 }
57
58 QString filterIdentifier() const override
59 {
60 return FilterIdentifier();
61 }
62
63 FilterAction filterAction() override;
64 void readParameters(const FilterAction& action) override;
65
66private:
67
68 void filterImage() override;
69 void embossMultithreaded(uint start, uint stop, uint h, double Depth);
70
71 inline int Lim_Max (int Now, int Up, int Max);
72 inline int getOffset(int Width, int X, int Y, int bytesDepth);
73
74private:
75
76 int m_depth = 30;
77};
78
79} // namespace Digikam
Definition dimgthreadedfilter.h:31
Definition dimg.h:52
Definition embossfilter.h:32
QString filterIdentifier() const override
Definition embossfilter.h:58
static QString FilterIdentifier()
Definition embossfilter.h:41
static QList< int > SupportedVersions()
Definition embossfilter.h:48
static int CurrentVersion()
Definition embossfilter.h:53
Definition filteraction.h:33
#define X
Definition datefolderview.cpp:34