File tree Expand file tree Collapse file tree 1 file changed +27
-4
lines changed Expand file tree Collapse file tree 1 file changed +27
-4
lines changed Original file line number Diff line number Diff line change 11(define (resize-ris image
22 drawable
33 newwidth
4- newheight)
4+ newheight
5+ method)
56 (let*
67 (
78 (drawable (car (gimp-image-active-drawable image)))
1920 (gimp-layer-set-mode new-layer-2 LAYER-MODE-MULTIPLY-LEGACY)
2021 (set! new-layer-1 (car (gimp-image-merge-down image new-layer-2 EXPAND-AS-NECESSARY)))
2122
23+ (cond
24+ ((= method 0 )
25+ (gimp-context-set-interpolation INTERPOLATION-CUBIC)
26+ )
27+ ((= method 1 )
28+ (gimp-context-set-interpolation INTERPOLATION-NONE)
29+ )
30+ ((= method 2 )
31+ (gimp-context-set-interpolation INTERPOLATION-LINEAR)
32+ )
33+ ((= method 3 )
34+ (gimp-context-set-interpolation INTERPOLATION-CUBIC)
35+ )
36+ ((= method 4 )
37+ (gimp-context-set-interpolation INTERPOLATION-NOHALO)
38+ )
39+ ((= method 5 )
40+ (gimp-context-set-interpolation INTERPOLATION-LOHALO)
41+ )
42+ )
43+
2244 (gimp-image-insert-layer image new-layer-3 0 -1)
23- (gimp-layer-scale new-layer-3 newwidth newheight INTERPOLATION-CUBIC )
24- (gimp-layer-scale new-layer-3 oldwidth oldheight INTERPOLATION-CUBIC )
45+ (gimp-layer-scale new-layer-3 newwidth newheight TRUE )
46+ (gimp-layer-scale new-layer-3 oldwidth oldheight TRUE )
2547
2648 (gimp-layer-set-mode new-layer-3 LAYER-MODE-DIVIDE-LEGACY)
2749 (set! new-layer-1 (car (gimp-image-merge-down image new-layer-3 EXPAND-AS-NECESSARY)))
2850 (gimp-item-set-name new-layer-1 " RIS" )
2951
30- (gimp-image-scale-full image newwidth newheight INTERPOLATION-CUBIC )
52+ (gimp-image-scale image newwidth newheight)
3153
3254 (gimp-displays-flush)
3355
4668 SF-DRAWABLE " Drawable" 0
4769 SF-VALUE " Width" " 1024"
4870 SF-VALUE " Height" " 1024"
71+ SF-OPTION " Method" ' (" Cubic" " None" " Linear" " Cubic" " NoHalo" " LowHalo" )
4972)
5073
5174(script-fu-menu-register " resize-ris" " <Image>/Image/Transform" )
You can’t perform that action at this time.
0 commit comments