home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
t
/
timwin.zip
/
TIMWIN2.EXE
/
pak
/
FILL.CMD
< prev
next >
Wrap
OS/2 REXX Batch file
|
1992-08-05
|
706b
|
31 lines
; fill - fills holes in objects
;expects: binary image in a
;******************************************
int num
int count = 1
cls
era x
dest p
show p
num = label a ;separate objects
if num == 0
print @8 "Something wrong with image!"
stop
endif
dest q
while count <= num
mark p count ;find object
inv qc ;invert
and qc 1 ;put into bitplane 1 (RED)
bord qc 3 ;put border in bitplane 2 (GREEN)
lpr4 qc 2 1 ;propagate from outside into object
comp qc == 1 ;keep non-propagated part (= isolated hole)
curs a q
or ac qc ;OR with original
count += 1
endw
stop