5
5
; it under the terms of the GNU General Public License as published by
6
6
; the Free Software Foundation; either version 2 of the License, or
7
7
; (at your option) any later version.
9
9
; This program is distributed in the hope that it will be useful,
10
10
; but WITHOUT ANY WARRANTY; without even the implied warranty of
11
11
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12
12
; GNU General Public License for more details.
14
14
; You should have received a copy of the GNU General Public License
15
15
; along with this program; if not, write to the Free Software
16
16
; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
19
19
(define (script-fu-tile-blur inImage inLayer inRadius inVert inHoriz inType)
21
(set! theImage inImage)
22
(set! theLayer inLayer)
23
(set! theHeight (car (gimp-drawable-height theLayer)))
24
(set! theWidth (car (gimp-drawable-width theLayer)))
26
(gimp-image-undo-group-start theImage)
27
(gimp-layer-resize theLayer (* 3 theWidth) (* 3 theHeight) 0 0)
29
(gimp-rect-select theImage 0 0 theWidth theHeight CHANNEL-OP-REPLACE 0 0)
30
(gimp-edit-cut theLayer)
32
(gimp-selection-none theImage)
33
(gimp-layer-set-offsets theLayer theWidth theHeight)
35
(cjg-pasteat 1 1) (cjg-pasteat 1 2) (cjg-pasteat 1 3)
36
(cjg-pasteat 2 1) (cjg-pasteat 2 2) (cjg-pasteat 2 3)
37
(cjg-pasteat 3 1) (cjg-pasteat 3 2) (cjg-pasteat 3 3)
39
(gimp-selection-none theImage)
41
(plug-in-gauss-iir TRUE theImage theLayer inRadius inHoriz inVert)
42
(plug-in-gauss-rle TRUE theImage theLayer inRadius inHoriz inVert)
45
(gimp-layer-resize theLayer theWidth theHeight (- 0 theWidth) (- 0 theHeight))
46
(gimp-layer-set-offsets theLayer 0 0)
47
(gimp-image-undo-group-end theImage)
51
(define (cjg-pasteat xoff yoff)
52
(let ((theFloat (car(gimp-edit-paste theLayer 0))))
53
(gimp-layer-set-offsets theFloat (* xoff theWidth) (* yoff theHeight) )
54
(gimp-floating-sel-anchor theFloat)
24
(theHeight (car (gimp-drawable-height theLayer)))
25
(theWidth (car (gimp-drawable-width theLayer)))
28
(define (pasteat xoff yoff)
29
(let ((theFloat (car(gimp-edit-paste theLayer 0))))
30
(gimp-layer-set-offsets theFloat (* xoff theWidth) (* yoff theHeight) )
31
(gimp-floating-sel-anchor theFloat)
35
(gimp-image-undo-group-start theImage)
36
(gimp-layer-resize theLayer (* 3 theWidth) (* 3 theHeight) 0 0)
38
(gimp-rect-select theImage 0 0 theWidth theHeight CHANNEL-OP-REPLACE 0 0)
39
(gimp-edit-cut theLayer)
41
(gimp-selection-none theImage)
42
(gimp-layer-set-offsets theLayer theWidth theHeight)
44
(pasteat 1 1) (pasteat 1 2) (pasteat 1 3)
45
(pasteat 2 1) (pasteat 2 2) (pasteat 2 3)
46
(pasteat 3 1) (pasteat 3 2) (pasteat 3 3)
48
(gimp-selection-none theImage)
50
(plug-in-gauss-iir TRUE theImage theLayer inRadius inHoriz inVert)
51
(plug-in-gauss-rle TRUE theImage theLayer inRadius inHoriz inVert)
54
(gimp-layer-resize theLayer
55
theWidth theHeight (- 0 theWidth) (- 0 theHeight))
56
(gimp-layer-set-offsets theLayer 0 0)
57
(gimp-image-undo-group-end theImage)
59
62
(script-fu-register "script-fu-tile-blur"
61
"Blurs image edges so that the final result tiles seamlessly"
63
"1998, Chris Gutteridge / ECS dept, University of Southampton, England."
66
SF-IMAGE "The Image" 0
67
SF-DRAWABLE "The Layer" 0
68
SF-ADJUSTMENT _"Radius" '(5 0 128 1 1 0 0)
69
SF-TOGGLE _"Blur vertically" TRUE
70
SF-TOGGLE _"Blur horizontally" TRUE
71
SF-OPTION _"Blur type" '(_"IIR" _"RLE"))
64
_"Blur the edges of an image so the result tiles seamlessly"
66
"1998, Chris Gutteridge / ECS dept, University of Southampton, England."
69
SF-IMAGE "The Image" 0
70
SF-DRAWABLE "The Layer" 0
71
SF-ADJUSTMENT _"Radius" '(5 0 128 1 1 0 0)
72
SF-TOGGLE _"Blur vertically" TRUE
73
SF-TOGGLE _"Blur horizontally" TRUE
74
SF-OPTION _"Blur type" '(_"IIR" _"RLE")
73
77
(script-fu-menu-register "script-fu-tile-blur"
74
"<Image>/Filters/Blur")
78
"<Image>/Filters/Blur")