Changeset View
Changeset View
Standalone View
Standalone View
imagelib/effects/kpEffectEmboss.cpp
Show First 20 Lines • Show All 45 Lines • ▼ Show 20 Line(s) | 40 | { | |||
---|---|---|---|---|---|
46 | // The numbers that follow were picked by experimentation to try to get | 46 | // The numbers that follow were picked by experimentation to try to get | ||
47 | // an effect linearly proportional to <strength> and at the same time, | 47 | // an effect linearly proportional to <strength> and at the same time, | ||
48 | // be fast enough. | 48 | // be fast enough. | ||
49 | // | 49 | // | ||
50 | // I still have no idea what "radius" and "sigma" mean. | 50 | // I still have no idea what "radius" and "sigma" mean. | ||
51 | 51 | | |||
52 | const double radius = 0; | 52 | const double radius = 0; | ||
53 | 53 | | |||
54 | #if 0 | | |||
55 | const double SigmaMin = 1; | | |||
56 | const double SigmaMax = 1.2; | | |||
57 | | ||||
58 | return SigmaMin + | | |||
59 | (kpEffectEmboss::MaxStrength - strength) * | | |||
60 | (SigmaMax - SigmaMin) / | | |||
61 | (kpEffectEmboss::MaxStrength - 1); | | |||
62 | #endif | | |||
63 | const double sigma = 1; | 54 | const double sigma = 1; | ||
64 | 55 | | |||
65 | const int repeat = 1; | 56 | const int repeat = 1; | ||
66 | 57 | | |||
67 | 58 | | |||
68 | for (int i = 0; i < repeat; i++) | 59 | for (int i = 0; i < repeat; i++) | ||
69 | { | 60 | { | ||
70 | qimage = Blitz::emboss (qimage, radius, sigma); | 61 | qimage = Blitz::emboss (qimage, radius, sigma); | ||
Show All 19 Lines |