29 #ifndef DIGIKAM_DISTORTION_FX_FILTER_H
30 #define DIGIKAM_DISTORTION_FX_FILTER_H
69 struct Q_DECL_HIDDEN Args
127 explicit DistortionFXFilter(QObject*
const parent =
nullptr);
128 explicit DistortionFXFilter(DImg*
const orgImage, QObject*
const parent =
nullptr,
int effectType=0,
129 int level=0,
int iteration=0,
bool antialiasing=
true);
131 ~DistortionFXFilter()
override;
135 return QLatin1String(
"digikam:DistortionFXFilter");
138 static QString DisplayableName();
152 return FilterIdentifier();
157 void readParameters(
const FilterAction& action)
override;
162 void filterImage()
override;
165 void fisheye(
DImg* orgImage,
DImg* destImage,
double Coeff,
bool AntiAlias=
true);
166 void fisheyeMultithreaded(
const Args& prm);
168 void twirl(
DImg* orgImage,
DImg* destImage,
int dist,
bool AntiAlias=
true);
169 void twirlMultithreaded(
const Args& prm);
171 void cilindrical(
DImg* orgImage,
DImg* destImage,
double Coeff,
172 bool Horizontal,
bool Vertical,
bool AntiAlias=
true);
173 void cilindricalMultithreaded(
const Args& prm);
175 void multipleCorners(
DImg* orgImage,
DImg* destImage,
int Factor,
bool AntiAlias=
true);
176 void multipleCornersMultithreaded(
const Args& prm);
178 void polarCoordinates(
DImg* orgImage,
DImg* destImage,
bool Type,
bool AntiAlias=
true);
179 void polarCoordinatesMultithreaded(
const Args& prm);
181 void circularWaves(
DImg* orgImage,
DImg* destImage,
int X,
int Y,
double Amplitude,
182 double Frequency,
double Phase,
bool WavesType,
bool AntiAlias=
true);
183 void circularWavesMultithreaded(
const Args& prm);
186 void waves(
DImg* orgImage,
DImg* destImage,
int Amplitude,
int Frequency,
187 bool FillSides,
bool Direction);
188 void wavesHorizontalMultithreaded(
const Args& prm);
189 void wavesVerticalMultithreaded(
const Args& prm);
191 void blockWaves(
DImg* orgImage,
DImg* destImage,
int Amplitude,
int Frequency,
bool Mode);
192 void blockWavesMultithreaded(
const Args& prm);
194 void tile(
DImg* orgImage,
DImg* destImage,
int WSize,
int HSize,
int Random);
195 void tileMultithreaded(
const Args& prm);
197 void setPixelFromOther(
int Width,
int Height,
bool sixteenBit,
int bytesDepth,
198 uchar* data, uchar* pResBits,
199 int w,
int h,
double nw,
double nh,
bool AntiAlias);
202 inline int Lim_Max(
int Now,
int Up,
int Max)
206 while (Now > Max - Up)
214 inline bool isInside (
int Width,
int Height,
int X,
int Y)
216 bool bIsWOk = ((
X < 0) ?
false : (
X >=
Width ) ? false :
true);
217 bool bIsHOk = ((Y < 0) ?
false : (Y >=
Height) ? false :
true);
219 return (bIsWOk && bIsHOk);
222 inline int getOffset(
int Width,
int X,
int Y,
int bytesDepth)
224 return (Y *
Width * bytesDepth) + (
X * bytesDepth);
227 inline int getOffsetAdjusted(
int Width,
int Height,
int X,
int Y,
int bytesDepth)
232 return getOffset(
Width,
X, Y, bytesDepth);
Definition: dimgthreadedfilter.h:41
Definition: distortionfxfilter.h:42
static int CurrentVersion()
Definition: distortionfxfilter.h:145
static QList< int > SupportedVersions()
Definition: distortionfxfilter.h:140
static QString FilterIdentifier()
Definition: distortionfxfilter.h:133
QString filterIdentifier() const override
Definition: distortionfxfilter.h:150
DistortionFXTypes
Definition: distortionfxfilter.h:48
@ WavesVertical
Definition: distortionfxfilter.h:57
@ PolarCoordinates
Definition: distortionfxfilter.h:62
@ CircularWaves1
Definition: distortionfxfilter.h:60
@ CircularWaves2
Definition: distortionfxfilter.h:61
@ WavesHorizontal
Definition: distortionfxfilter.h:56
@ BlockWaves2
Definition: distortionfxfilter.h:59
@ MultipleCorners
Definition: distortionfxfilter.h:55
@ CilindricalHor
Definition: distortionfxfilter.h:51
@ Twirl
Definition: distortionfxfilter.h:50
@ Caricature
Definition: distortionfxfilter.h:54
@ BlockWaves1
Definition: distortionfxfilter.h:58
@ CilindricalVert
Definition: distortionfxfilter.h:52
@ CilindricalHV
Definition: distortionfxfilter.h:53
@ UnpolarCoordinates
Definition: distortionfxfilter.h:63
Definition: filteraction.h:43
@ Width
Definition: coredbfields.h:87
@ Height
Definition: coredbfields.h:88
Definition: datefolderview.cpp:43
Type
Definition: gpsitemcontainer.h:45