images.Hue
语法
images.Hue SHIFT
返回值
images.filter
色调角度偏移通常在 [-180, 180] 范围内,其中 0 没有效果。
用法
创建过滤器
{{ $filter := images.Hue -15 }}
使用 images.Filter
函数应用过滤器
{{ with resources.Get "images/original.jpg" }}
{{ with . | images.Filter $filter }}
<img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
{{ end }}
{{ end }}
您还可以使用 Resource
对象上的 Filter
方法应用过滤器
{{ with resources.Get "images/original.jpg" }}
{{ with .Filter $filter }}
<img src="{{ .RelPermalink }}" width="{{ .Width }}" height="{{ .Height }}" alt="">
{{ end }}
{{ end }}
示例
原始

已处理
