Grayscale image: Difference between revisions
Content added Content deleted
MaiconSoft (talk | contribs) No edit summary |
(Add Factor) |
||
Line 553: | Line 553: | ||
return image |
return image |
||
end function</lang> |
end function</lang> |
||
=={{header|Factor}}== |
|||
{{works with|Factor|0.99 2020-07-03}} |
|||
<lang factor>USING: arrays kernel math math.matrices math.vectors ; |
|||
: rgb>gray ( matrix -- new-matrix ) |
|||
[ { 0.2126 0.7152 0.0722 } vdot >integer ] matrix-map ; |
|||
: gray>rgb ( matrix -- new-matrix ) |
|||
[ dup dup 3array ] matrix-map ;</lang> |
|||
=={{header|FBSL}}== |
=={{header|FBSL}}== |