Changeset View
Changeset View
Standalone View
Standalone View
imagelib/effects/kpEffectEmboss.cpp
Show All 33 Lines | |||||
34 | #include "kpLogCategories.h" | 34 | #include "kpLogCategories.h" | ||
35 | 35 | | |||
36 | #include "pixmapfx/kpPixmapFX.h" | 36 | #include "pixmapfx/kpPixmapFX.h" | ||
37 | 37 | | |||
38 | 38 | | |||
39 | static QImage EmbossQImage (const QImage &qimage_, int strength) | 39 | static QImage EmbossQImage (const QImage &qimage_, int strength) | ||
40 | { | 40 | { | ||
41 | QImage qimage = qimage_; | 41 | QImage qimage = qimage_; | ||
42 | if (strength == 0) | 42 | if (strength == 0) { | ||
43 | return qimage; | 43 | return qimage; | ||
44 | } | ||||
44 | 45 | | |||
45 | 46 | | |||
46 | // The numbers that follow were picked by experimentation to try to get | 47 | // The numbers that follow were picked by experimentation to try to get | ||
47 | // an effect linearly proportional to <strength> and at the same time, | 48 | // an effect linearly proportional to <strength> and at the same time, | ||
48 | // be fast enough. | 49 | // be fast enough. | ||
49 | // | 50 | // | ||
50 | // I still have no idea what "radius" and "sigma" mean. | 51 | // I still have no idea what "radius" and "sigma" mean. | ||
51 | 52 | | |||
52 | const double radius = 0; | 53 | const auto radius = 0.0; | ||
53 | 54 | | |||
54 | const double sigma = 1; | 55 | const auto sigma = 1.0; | ||
55 | 56 | | |||
56 | const int repeat = 1; | 57 | const auto repeat = 1; | ||
57 | 58 | | |||
58 | 59 | | |||
59 | for (int i = 0; i < repeat; i++) | 60 | for (int i = 0; i < repeat; i++) | ||
60 | { | 61 | { | ||
61 | qimage = Blitz::emboss (qimage, radius, sigma); | 62 | qimage = Blitz::emboss (qimage, radius, sigma); | ||
62 | } | 63 | } | ||
63 | 64 | | |||
64 | 65 | | |||
Show All 13 Lines |