(
::If a pixel is not Black and...::
(src(x,y,z)!=0) &&
(
:

ne of those surrounding the pixel is... ("||" means or)::
src(x,(y-1),z) ||
src((x-1),y,z) ||
src((x+1),y,z) ||
src(x,(y+1),z)
)
== 0) ?
::then if the bottom and left one are not white::
(
(src((x-1),y,z))
!=255
&&
(src(x,(y-1),z))
!=255
)
?
::average them with the current pixel but give the current pixel value twice the weight::
(
(src((x-1),y,z)
+(src(x,(y-1),z)
+((src(x,y,z)*2)
/4
)
:

therwise...::
:
::if the top and left one are::
(
(src((x-1),y,z)
!=255
&&
(src(x,(y+1),z)
!=255)
)
?
::repeat the same::
(
src((x-1),y,z)
+(src(x,(y+1),z)
+((src(x,y,z)*2)
/4
)
:
::same for bottom and right::
(
(src((x+1),y,z)
!=255
&&
(src(x,(y-1),z)
!=255)
?
(
(src((x+1),y,z)
+(src(x,(y-1),z)
+((src(x,y,z)*2)
/4
)
:
::...and top and right::
(
(src((x+1),y,z)
!=255
&&
(src(x,(y+1),z)
!=255)
)
?
(
(src((x+1),y,z)
+(src(x,(y+1),z)
+((src(x,y,z)*2)
/4
)
:

therwise...::
:
::the pixel is white::
255