Debian Codegraph @

docs/content/en/functions/images/Sigmoid.md

raw
1 ---
2 title: images.Sigmoid
3 description: Returns an image filter that changes the contrast of an image using a sigmoidal function.
4 categories: []
5 keywords: []
6 params:
7 functions_and_methods:
8 aliases: []
9 returnType: images.filter
10 signatures: [images.Sigmoid MIDPOINT FACTOR]
11 ---
12
13 This is a non-linear contrast change useful for photo adjustments; it preserves highlight and shadow detail.
14
15 The midpoint is the midpoint of contrast. It must be in the range [0, 1], typically 0.5.
16
17 The factor indicates how much to increase or decrease the contrast, typically in the range [-10, 10] where 0 has no effect. A positive value increases contrast, while a negative value decrease contrast.
18
19 ## Usage
20
21 Create the filter:
22
23 ```go-html-template
24 {{ $filter := images.Sigmoid 0.6 -4 }}
25 ```
26
27 {{% include "/_common/functions/images/apply-image-filter.md" %}}
28
29 ## Example
30
31 {{< img
32 src="images/examples/zion-national-park.jpg"
33 alt="Zion National Park"
34 filter="Sigmoid"
35 filterArgs="0.6,-4"
36 example=true
37 >}}