.
I don't know whether I am contributing anything to the natural flow of this thread, but here is a contour-maker for the FB horse, saved to disk as 'horse.bmp', which makes a thick-line contour (like a coloring book outline) and saves it as 'horse_contour_thick.bmp'.
Code: Select all
'==============================================================================
'Contour_Line_Thick.bas - Quark - 2015.11.17
'Purpose: make thick contour line from solid graphic shape on white background
'Uses: horse.bmp Saves: horse_contour_thick.bmp
'==============================================================================
CONST BLACK = RGB(&H00,&H00,&H00)
CONST WHITE = RGB(&HFF,&HFF,&HFF)
SCREENRES 640,480,32
DIM SHARED AS INTEGER w, h
SCREENINFO w,h
COLOR BLACK, WHITE
DIM horse AS ANY PTR = IMAGECREATE(640,480, WHITE, 32)
DIM contour AS ANY PTR = IMAGECREATE(640,480, WHITE, 32)
DIM AS STRING fname
WHILE LEN(INKEY) : WEND
BLOAD "horse.bmp",horse
PUT (0,0),horse,PSET 'show original
PRINT "Creating contour..."
SLEEP 2000
'SCAN 4 TIMES FOR THICK CONTOUR
FOR scan AS INTEGER = 1 TO 2
IF scan = 2 THEN
LINE horse, (0,0)-(639,479),WHITE,BF 'clear
PUT horse,(0,0),contour,PSET
END IF
FOR i AS INTEGER = 0 TO h-1
FOR j AS INTEGER = 1 TO w-1
IF POINT(j,i,horse) <> POINT(j-1,i,horse) THEN
IF scan = 1 THEN
IF POINT(j,i,horse) = WHITE THEN
PSET contour,(j-1,i),BLACK
ELSE
PSET contour,(j,i), BLACK
END IF
ELSE
IF POINT(j,i,horse) = WHITE THEN PSET contour,(j-1,i),BLACK
PSET contour,(j,i),BLACK
END IF
END IF
NEXT
NEXT
SLEEP 100
FOR j AS INTEGER = 0 TO w-1
FOR i AS INTEGER = 1 TO h-1
IF POINT(j,i,horse) <> POINT(j,i-1,horse) THEN
IF scan = 1 THEN
IF POINT(j,i,horse) = WHITE THEN
PSET contour,(j,i-1),BLACK
ELSE
PSET contour,(j,i), BLACK
END IF
ELSE
IF POINT(j,i,horse) = WHITE THEN PSET contour,(j,i-1),BLACK
PSET contour,(j,i),BLACK
END IF
END IF
NEXT
NEXT
NEXT
'SAVE THICK CONTOUR IMAGE AND END
fname = "horse_contour_thick"
BSAVE fname, contour
PUT (0,0),contour, PSET 'show the contour
LOCATE 1,1
PRINT fname; " saved...any key"
SLEEP
END
'==============================================================================
.