Reorganized source code and directory tree.
git-svn-id: svn://pulkomandy.tk/GrafX2/trunk@1375 416bcca6-2ee7-4201-b75f-2eb2f807beb1
This commit is contained in:
18
share/grafx2/scripts/bru_db_GrayscaleAvg.lua
Normal file
18
share/grafx2/scripts/bru_db_GrayscaleAvg.lua
Normal file
@@ -0,0 +1,18 @@
|
||||
--BRUSH Remap: Grayscale (average)
|
||||
--by Richard Fhager
|
||||
--http://hem.fyristorg.com/dawnbringer/
|
||||
|
||||
|
||||
w, h = getbrushsize()
|
||||
|
||||
for x = 0, w - 1, 1 do
|
||||
for y = 0, h - 1, 1 do
|
||||
|
||||
r, g, b = getcolor(getbrushpixel(x,y))
|
||||
|
||||
a = (r+g+b)/3
|
||||
|
||||
putbrushpixel(x, y, matchcolor(a,a,a));
|
||||
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user