1 (define (make-fractal-border infile outfile logofile)
4 (image (car (gimp-file-load 1 infile infile)))
5 (fractal (car (gimp-image-get-active-layer image)))
6 (fwidth (car (gimp-drawable-width fractal)))
7 (fheight (car (gimp-drawable-height fractal)))
8 (logo (car (gimp-file-load-layer 1 image logofile)))
9 (lwidth (car (gimp-drawable-width logo)))
10 (lheight (car (gimp-drawable-height logo)))
11 (innerborder (car (gimp-layer-new image (+ 30 fwidth) (+ 30 fheight) 1 "Inner Border" 100 0)))
12 (whiteborder (car (gimp-layer-new image (+ 240 fwidth) (+ 240 fheight) 1 "White Border" 100 0)))
13 (outerborder (car (gimp-layer-new image (+ 300 fwidth) (+ 300 fheight) 1 "Outer Border" 100 0)))
15 (white '(248 248 248))
18 (gimp-layer-set-name fractal "Fractal")
20 (gimp-image-resize image (+ 300 fwidth) (+ 300 fheight) 150 150)
21 ; new layer: inner border
22 (gimp-layer-set-offsets innerborder 135 135)
23 (gimp-context-set-foreground black)
24 (gimp-drawable-fill innerborder 0)
25 (gimp-image-add-layer image innerborder 1)
26 ; new layer: white border
27 (gimp-layer-set-offsets whiteborder 30 30)
28 (gimp-context-set-foreground white)
29 (gimp-drawable-fill whiteborder 0)
30 (gimp-image-add-layer image whiteborder 2)
31 ; new layer: outer border
32 (gimp-layer-set-offsets outerborder 0 0)
33 (gimp-context-set-foreground black)
34 (gimp-drawable-fill outerborder 0)
35 (gimp-image-add-layer image outerborder 3)
37 (gimp-layer-set-opacity logo 42)
38 (gimp-layer-set-offsets logo (- (- (car(gimp-image-width image)) lwidth) 45) (- (- (car(gimp-image-height image)) lheight) 45))
39 (gimp-image-add-layer image logo 2)
41 (gimp-xcf-save 0 image fractal outfile outfile)