Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
6581 | leency | 1 | --PALETTE Modify: Inverted RGB |
2 | --by Richard Fhager |
||
3 | --http://hem.fyristorg.com/dawnbringer/ |
||
4 | |||
5 | -- Copyright 2010 Richard Fhager |
||
6 | -- |
||
7 | -- This program is free software; you can redistribute it and/or |
||
8 | -- modify it under the terms of the GNU General Public License |
||
9 | -- as published by the Free Software Foundation; version 2 |
||
10 | -- of the License. See |
||
11 | |||
12 | -- This script was adopted from Evalion, a Javascript codecrafting/imageprocessing project |
||
13 | -- http://goto.glocalnet.net/richard_fhager/evalion/evalion.html |
||
14 | |||
15 | |||
16 | |||
17 | for c = 0, 255, 1 do |
||
18 | |||
19 | r,g,b = getcolor(c) |
||
20 | |||
21 | r2 = (g+b)/2 |
||
22 | g2 = (r+b)/2 |
||
23 | b2 = (r+g)/2 |
||
24 | |||
25 | setcolor(c, r2,g2,b2) |
||
26 | |||
27 | end |