19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
..
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
str = '(' .. i.img:render() .. ')^' .. str
end
if str ~= '' then
str = str .. '('
bracket = true
end
str = str .. self.string
end
for _,e in pairs(self.fx) do
str = str .. '^[' .. e
-- be sure to escape ones that take arguments
-- correctly!
end
if bracket then str = str .. ')' end
return str
................................................................................
color = lib.color(color)
end
color = color:to_hsl()
end
return image.change(self, {
fx = lib.tbl.append(self.fx, {
string.format('hsl:%s:%s:%s',
color.hue, color.sat*100, color.lum*100)
})
})
end;
rehue = function(self, hue)
return self.shift{hue=hue, sat=0, lum=0}
end;
|
|
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
..
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
|
str = '(' .. i.img:render() .. ')^' .. str
end
if str ~= '' then
str = str .. '('
bracket = true
end
str = str .. self.string
end
for _,e in pairs(self.fx) do
str = str .. '^[' .. e
-- be sure to escape ones that take arguments
-- correctly!
end
if bracket then str = str .. ')' end
return str
................................................................................
color = lib.color(color)
end
color = color:to_hsl()
end
return image.change(self, {
fx = lib.tbl.append(self.fx, {
string.format('hsl:%s:%s:%s',
color.hue, color.sat, color.lum)
})
})
end;
rehue = function(self, hue)
return self.shift{hue=hue, sat=0, lum=0}
end;
|