-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpolished_plastic_fun_299o.scm
1614 lines (1472 loc) · 55.4 KB
/
polished_plastic_fun_299o.scm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
;
; File > Create > Logos > Polished Plastic Fu
; Filters > Alpha to Logo > Polished Plastic Fu
;
; origine : http://www.lefinnois.net/wp/index.php/2007/10/29/mise-a-jour-des-script-fu-pour-the-gimp-24/
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;
; plasticlogo.scm
; Version 0.8 (For The Gimp 2.0 and 2.2)
; A Script-Fu that create a Polished Plastic Text or Shape
;
; Copyright (C) 2004-2007 Denis Bodor <lefinnois@lefinnois.net>
;
; This program is free software; you can redistribute it and/or
; modify it under the terms of the GNU General Public License
; as published by the Free Software Foundation; either version 2
; of the License, or (at your option) any later version.
;
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
; GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License
; along with this program; if not, write to the Free Software
; Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
;
;299d update for gimp 2.99.3 by viforlinux.wordpress.com
;299k added text alignment functions transparence, and materials carbon fiber, aluminium, jeans, bovination, camouflage
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define list-blend-ppf-dir '("Top-Botton" "Bottom-Top" "Left-Right" "Right-Left" "Diag-Top-Left" "Diag-Top-Right" "Diag-Bottom-Left" "Diag-Bottom-Right" "Diag-to-center" "Diag-from-center" "Center-to-Top center" "Center-to-Bottom center" ))
(define list-fill-ppf-dir '("Color" "Pattern" "Gradient" "None" "Aluminium Brushed" "Aluminium Brushed Light" "Blue Jeans" "Washed Jeans" "Dark Jeans" "Carbon fiber" "Bovination" "Camouflage 1" "Camouflage 2" "Plasma" "Patchwork" "Diffraction" "Pizza" "Leopard" "Giraffe" "Zebra" "Leopard 2 colors" "Snake" "Snake 2 colors" "Pois 2 colors" "Squares 2 colors" "Emap gradient" "Pijama gradient Horiz" "Pijama gradient 45" "Pijama gradient Vert" "Will Wood" "Steampunk Brass" "Steampunk Color" "Grunge Green" "Grunge Color" "Stripes Horiz" "Stripes 45" "Stripes Vert" "material gradient"))
(define list-effect-ppf-dir '("None" "Blur" "Oilify" "Cubism" "Ripple" "Bump with pattern" "Desaturate & Chrome" "Desaturate+Chrome+Color LIGHTEN ONLY" "Desaturate+Chrome+Color MULTILPLY" "Desaturate+Chrome+Color OVERLAY" "Desaturate+Color LIGHTEN ONLY" "Desaturate+Color MULTILPLY" "Desaturate+Color OVERLAY" "Stained Glass" "Glitter"))
; Fix code for gimp 2.99.6 working in 2.10
(cond ((not (defined? 'gimp-drawable-get-width)) (define gimp-drawable-get-width gimp-drawable-width)))
(cond ((not (defined? 'gimp-drawable-get-height)) (define gimp-drawable-get-height gimp-drawable-height)))
(cond ((not (defined? 'gimp-drawable-get-offsets)) (define gimp-drawable-get-offsets gimp-drawable-offsets)))
(cond ((not (defined? 'gimp-text-fontname)) (define (gimp-text-fontname fn1 fn2 fn3 fn4 fn5 fn6 fn7 fn8 PIXELS fn9) (gimp-text-font fn1 fn2 fn3 fn4 fn5 fn6 fn7 fn8 fn9))))
(cond ((not (defined? 'gimp-context-set-pattern-ng)) (define (gimp-context-set-pattern-ng value)
(if (= (string->number (substring (car(gimp-version)) 0 3)) 2.10)
(gimp-context-set-pattern value)
(gimp-context-set-pattern (car (gimp-pattern-get-by-name value)))
))))
(cond ((not (defined? 'gimp-context-set-gradient-ng)) (define (gimp-context-set-gradient-ng value)
(if (= (string->number (substring (car(gimp-version)) 0 3)) 2.10)
(gimp-context-set-gradient value)
(gimp-context-set-gradient (car (gimp-gradient-get-by-name value)))
))))
(define (apply-gauss img drawable x y)(begin (if (= (string->number (substring (car(gimp-version)) 0 3)) 2.10)
(plug-in-gauss 1 img drawable x y 0)
(plug-in-gauss 1 img drawable (* x 0.32) (* y 0.32) 0) )))
;scaled pattern fill procedure
(define (scaled-pattern-fill image drawable pattern scale)
(let* (
(width (car (gimp-pattern-get-info pattern)))
(height (cadr (gimp-pattern-get-info pattern)))
(pat-img (car (gimp-image-new (* 5 width) (* 5 height) RGB)))
(pat-layer (car (gimp-layer-new pat-img (* 5 width) (* 5 height) RGBA-IMAGE "Pattern" 100 LAYER-MODE-NORMAL-LEGACY)))
(new-width (* (/ (* 5 width) 100) scale))
(new-height (* (/ (* 5 height) 100) scale))
)
(gimp-image-insert-layer pat-img pat-layer 0 0)
(gimp-context-set-pattern pattern)
(gimp-drawable-fill pat-layer FILL-PATTERN)
(gimp-image-scale pat-img new-width new-height)
(plug-in-unsharp-mask 1 pat-img pat-layer 5 .5 0)
;(plug-in-make-seamless 1 pat-img pat-layer)
(gimp-edit-copy-visible pat-img)
;(gimp-context-set-pattern (caadr (gimp-patterns-list "")))
(if (= (string->number (substring (car(gimp-version)) 0 3)) 2.10)
(gimp-context-set-pattern (list-ref (cadr (gimp-patterns-get-list "")) 0))
(gimp-context-set-pattern (car (gimp-pattern-get-by-name (list-ref (car (gimp-patterns-get-list "")) 0))))
)
(gimp-image-delete pat-img))
(gimp-drawable-edit-fill drawable FILL-PATTERN))
(define (fun-util-image-resize-from-layer image layer)
(let* (
(width (car (gimp-drawable-get-width layer)))
(height (car (gimp-drawable-get-height layer)))
(posx (- (car (gimp-drawable-get-offsets layer))))
(posy (- (car (gimp-drawable-get-offsets layer))))
)
(gimp-image-resize image width height posx posy)
)
)
(define (material-carbon fond) (begin
(gimp-context-set-pattern-ng "Parque #3")
(gimp-drawable-fill fond FILL-PATTERN)
(gimp-drawable-desaturate fond 1)
(gimp-drawable-brightness-contrast fond -0.5 0.15)
))
(define (material-color fond-color fond) (begin
(gimp-context-set-paint-mode 28)
(gimp-context-set-foreground fond-color)
(gimp-drawable-edit-fill fond FILL-FOREGROUND)
;(gimp-edit-bucket-fill fond 0 0 100 0 FALSE 100 100)
))
(define (material-pattern image pattern fond scale) (begin
;(gimp-context-set-pattern pattern)
;(gimp-drawable-fill fond FILL-PATTERN)
(scaled-pattern-fill image fond pattern scale)
))
(define (material-gradient fond image gradient gradient-type direction reverse fond-color) (begin
(define width (car (gimp-drawable-get-width fond)))
(define height (car (gimp-drawable-get-height fond)))
(gimp-context-set-foreground fond-color)
(gimp-drawable-edit-fill fond FILL-FOREGROUND)
; choose gradient destination
(cond ((= direction 0) ; Top-Bottom
(define x1 0) ; X Blend Starting Point
(define y1 0) ; Y Blend Starting Point
(define x2 0) ; X Blend Ending Point
(define y2 height) ; Y Blend Ending Point
)
((= direction 1) ; Bottom-Top
(define x1 0) ; X Blend Starting Point
(define y1 height) ; Y Blend Starting Point
(define x2 0) ; X Blend Ending Point
(define y2 0) ; Y Blend Ending Point
)
((= direction 2) ; Left-Right
(define x1 0) ; X Blend Starting Point
(define y1 0) ; Y Blend Starting Point
(define x2 width) ; X Blend Ending Point
(define y2 0) ; Y Blend Ending Point
)
((= direction 3) ; Right-Left
(define x1 width) ; X Blend Starting Point
(define y1 0) ; Y Blend Starting Point
(define x2 0) ; X Blend Ending Point
(define y2 0) ; Y Blend Ending Point
)
((= direction 4) ; Diag-Top-Left
(define x1 0) ; X Blend Starting Point
(define y1 0) ; Y Blend Starting Point
(define x2 width) ; X Blend Ending Point
(define y2 height) ; Y Blend Ending Point
)
((= direction 5) ; Diag-Top-Right
(define x1 width) ; X Blend Starting Point
(define y1 0) ; Y Blend Starting Point
(define x2 0) ; X Blend Ending Point
(define y2 height) ; Y Blend Ending Point
)
((= direction 6) ; Diag-Bottom-Left
(define x1 0) ; X Blend Starting Point
(define y1 height) ; Y Blend Starting Point
(define x2 width) ; X Blend Ending Point
(define y2 0) ; Y Blend Ending Point
)
((= direction 7) ; Diag-Bottom-Right
(define x1 width) ; X Blend Starting Point
(define y1 height) ; Y Blend Starting Point
(define x2 0) ; X Blend Ending Point
(define y2 0) ; Y Blend Ending Point
)
((= direction 8) ; Diag-to-center
(define x1 0) ; X Blend Starting Point
(define y1 0) ; Y Blend Starting Point
(define x2 (/ width 2)) ; X Blend Ending Point
(define y2 (/ height 2)) ; Y Blend Ending Point
)
((= direction 9) ; Diag-from-center
(define x1 (/ width 2)) ; X Blend Starting Point
(define y1 (/ height 2)) ; Y Blend Starting Point
(define x2 0) ; X Blend Ending Point
(define y2 0) ; Y Blend Ending Point
)
((= direction 10) ; center-to-top-center
(define x1 (/ width 2)) ; X Blend Starting Point
(define y1 (/ height 2)) ; Y Blend Starting Point
(define x2 (/ width 2)) ; X Blend Ending Point
(define y2 0) ; Y Blend Ending Point
)
((= direction 11) ; center-to-bottom-center
(define x1 (/ width 2)) ; X Blend Starting Point
(define y1 (/ height 2)) ; Y Blend Starting Point
(define x2 (/ width 2)) ; X Blend Ending Point
(define y2 height) ; Y Blend Ending Point
)
; (else
; ; For later use..
; )
) ;end cond
(gimp-context-set-gradient gradient)
(gimp-context-set-gradient-reverse reverse)
(gimp-drawable-edit-gradient-fill fond gradient-type 0 REPEAT-NONE 1 0.0 FALSE x1 y1 x2 y2)
))
(define (material-bovination-2 fond image) (begin
(plug-in-solid-noise 0 image fond 0 0 (random 65535) 1 16 4)
(gimp-drawable-equalize fond 0)
; (gimp-drawable-threshold fond HISTOGRAM-VALUE 0 1)
;(gimp-brightness-contrast fond 0 127) ; cambiare!
(gimp-drawable-brightness-contrast fond 0 0.5)
;(gimp-drawable-levels fond 0 0.1 0.4 FALSE 0.1 0.1 0.2 FALSE)
(gimp-drawable-brightness-contrast fond 0 0.5)
(gimp-drawable-brightness-contrast fond 0 0.5)
;(gimp-drawable-levels fond 0 0 0.4 FALSE 0.1 0.1 0.2 FALSE)
(gimp-drawable-brightness-contrast fond 0 0.5)
))
(define (material-camo2 fond image col-opt) (begin
(gimp-selection-none image)
(if (= col-opt 1)
(begin (define color1 '(136 125 52))
(define color2 '(62 82 22))
(define color3 '(50 28 0))) )
(if (= col-opt 0)
(begin (define color1 '(170 170 60))
(define color2 '(33 100 58))
(define color3 '(150 115 100))) )
;(gimp-context-set-paint-mode LAYER-MODE-NORMAL-LEGACY)
(gimp-context-set-paint-mode LAYER-MODE-NORMAL)
(material-bovination-2 fond image)
(gimp-image-select-color image 0 fond '(255 255 255) )
(gimp-selection-grow image 2)
(gimp-context-set-foreground color1 )
(gimp-drawable-edit-fill fond FILL-FOREGROUND)
(gimp-selection-invert image)
(gimp-context-set-foreground color2 )
(gimp-drawable-edit-fill fond FILL-FOREGROUND)
(gimp-selection-none image)
(gimp-image-select-color image 0 fond color1)
(gimp-selection-grow image 2)
(material-bovination-2 fond image)
(gimp-selection-none image)
(gimp-image-select-color image 0 fond '(0 0 0) )
(gimp-selection-grow image 2)
(gimp-context-set-foreground color1 )
(gimp-drawable-edit-fill fond FILL-FOREGROUND)
(gimp-selection-none image)
(gimp-image-select-color image 0 fond '(255 255 255))
(gimp-selection-grow image 2)
(gimp-context-set-foreground color3 )
(gimp-drawable-edit-fill fond FILL-FOREGROUND)
(gimp-selection-none image)
))
(define (material-alubrushed fond image) (begin
(gimp-context-set-pattern-ng "Blue Squares")
(gimp-drawable-fill fond FILL-PATTERN)
(gimp-drawable-desaturate fond 1)
(gimp-drawable-brightness-contrast fond -0.5 0.15)
(gimp-selection-none image)
(apply-gauss image fond 20 20)
(plug-in-randomize-hurl 0 image fond 50 50 TRUE 0)
(plug-in-mblur 0 image fond 0 25 0 0 0)
(gimp-drawable-colorize-hsl fond 0 0 10 )
;(script-fu-colorize 0 image fond 959595 1)
))
(define (material-alubrushed-light fond image) (begin
;(gimp-context-set-gradient "Flare Rays Size 1")
; (gimp-context-set-gradient-ng "Rounded edge")
(if (= (string->number (substring (car(gimp-version)) 0 3)) 2.10)
(gimp-context-set-gradient "Rounded edge")
(gimp-context-set-gradient (car (gimp-gradient-get-by-name "Rounded Edge")))
)
(gimp-context-set-gradient-repeat-mode 0)
(gimp-drawable-edit-gradient-fill
fond
;BLEND-FG-TRANSPARENT
;LAYER-MODE-NORMAL-LEGACY
0 ;GRADIENT-LINEAR
0 ; 100
0
;REPEAT-NONE
;FALSE
;FALSE
1
0
0 ;FALSE
0
0
(car (gimp-drawable-get-width fond))
0
)
(gimp-drawable-desaturate fond 1)
(gimp-drawable-brightness-contrast fond -0.5 0.15)
(gimp-selection-none image)
(apply-gauss image fond 20 20)
(plug-in-randomize-hurl 0 image fond 5 5 TRUE 0)
(plug-in-mblur 0 image fond 0 25 0 0 0)
(gimp-drawable-colorize-hsl fond 0 0 10 )
))
(define (material-blue-jeans fond image col-opt) (begin
; (gimp-context-set-gradient-ng "Rounded edge")
(if (= (string->number (substring (car(gimp-version)) 0 3)) 2.10)
(gimp-context-set-gradient "Rounded edge")
(gimp-context-set-gradient (car (gimp-gradient-get-by-name "Rounded Edge")))
)
(gimp-context-set-gradient-repeat-mode 2)
(gimp-drawable-edit-gradient-fill
fond
;BLEND-FG-TRANSPARENT
;LAYER-MODE-NORMAL-LEGACY
0 ;GRADIENT-LINEAR
0 ; 100
0
;REPEAT-NONE
;FALSE
;FALSE
1
0
0 ;FALSE
0
0
5
5
)
(gimp-drawable-brightness-contrast fond -0.5 0.15)
(plug-in-randomize-hurl 0 image fond 5 5 TRUE 0)
(gimp-drawable-desaturate fond 1)
(apply-gauss image fond 3 3)
;(gimp-drawable-colorize-hsl fond 230 36 20 )
(if (= col-opt 0)
(begin (gimp-drawable-colorize-hsl fond 230 36 20 )
(gimp-drawable-brightness-contrast fond -0.1 0.3))
)
(if (= col-opt 1)
(begin(gimp-drawable-colorize-hsl fond 230 36 20 )
(gimp-drawable-brightness-contrast fond -0.1 0.1))
)
(if (= col-opt 2)
(begin (gimp-drawable-colorize-hsl fond 10 10 10)
(gimp-drawable-brightness-contrast fond -0.1 0.3)
(gimp-drawable-desaturate fond 1))
)
))
(define (material-plasma fond image) (begin
;(gimp-layer-set-lock-alpha fond TRUE)
(plug-in-plasma 1 image fond (random 999999999) 7) ; Add plasma
))
(define (material-none fond) (gimp-drawable-edit-clear fond) )
(define (material-patchwork fond image) (begin
(plug-in-plasma 1 image fond (random 999999999) (+ 1 (random 3))) ; Rnd Plasma Fill
(plug-in-cubism 1 image fond 6 10 0)
))
(define (material-diffraction fond image) (begin
(set! *seed* (car (gettimeofday))) ; Random Number Seed From Clock (*seed* is global)
(random-next) ; Next Random Number Using Seed
(plug-in-diffraction 1 image fond .815 1.221 1.123 (+ .821 (random 2)) (+ .821 (random 2)) (+ .974 (random 2)) .610 .677 .636 .066 (+ 27.126 (random 20)) (+ -0.437 (random 1)))
))
(define (material-pizza fond image) (begin
;(gimp-layer-set-lock-alpha fond TRUE)
(material-bovination-2 fond image)
; (gimp-selection-none image)
(gimp-image-select-color image 2 fond '(0 0 0) )
(gimp-selection-grow image 3)
(gimp-context-set-foreground '(255 0 0) )
(gimp-drawable-edit-fill fond FILL-FOREGROUND)
(gimp-selection-none image)
(gimp-layer-set-lock-alpha fond TRUE)
(plug-in-oilify 1 image fond 20 0)
))
(define (material-pijama fond image gradient col-opt) (begin
(gimp-context-set-gradient gradient)
(gimp-context-set-gradient-repeat-mode REPEAT-SAWTOOTH)
(if (= col-opt 1)(gimp-drawable-edit-gradient-fill fond 0 0 REPEAT-NONE 1 0.0 FALSE 0 0 90 45)) ;45
(if (= col-opt 0) (gimp-drawable-edit-gradient-fill fond 0 0 REPEAT-NONE 1 0.0 FALSE 0 0 0 45)); horiz
(if (= col-opt 2) (gimp-drawable-edit-gradient-fill fond 0 0 REPEAT-NONE 1 0.0 FALSE 0 0 90 0));vert
(gimp-drawable-posterize fond 3)
))
(define (material-leopard fond image) (begin
;(gimp-layer-set-lock-alpha fond TRUE)
(gimp-context-set-foreground '(0 0 0))
(gimp-context-set-background '(208 169 110))
(gimp-drawable-edit-fill fond FILL-FOREGROUND)
;(plug-in-mosaic 1 image fond 30 1 7 0.5 0 135 0 1 0 1 0 1 )
(plug-in-mosaic 1 image fond 30 1 7 0.5 0 135 0 1 0 1 1 1 )
(gimp-selection-none image)
(gimp-image-select-color image 0 fond '(0 0 0) )
(gimp-selection-shrink image 1)
;(script-fu-distress-selection 1 image fond 50 4 2 2 1 1)
; (gimp-selection-shrink image 1)
(gimp-context-set-foreground '(189 140 84))
(gimp-drawable-edit-fill fond FILL-FOREGROUND)
(gimp-selection-none image)
;(plug-in-wind 1 image fond 1 3 1 0 0)
;(plug-in-oilify-enhanced 1 image fond 1 12 fond 12 fond)
(plug-in-oilify 1 image fond 5 0)
(plug-in-oilify 1 image fond 6 0)
))
(define (material-snake fond image) (begin
;(gimp-layer-set-lock-alpha fond TRUE)
(gimp-context-set-foreground '(0 0 0))
(gimp-context-set-background '(208 169 110))
(gimp-drawable-edit-fill fond FILL-FOREGROUND)
(plug-in-mosaic 1 image fond 30 1 7 0.5 0 135 0 1 0 1 0 1 )
;(plug-in-mosaic 1 image fond 30 1 7 0.5 0 135 0 1 0 1 1 1 )
(gimp-selection-none image)
(gimp-image-select-color image 0 fond '(0 0 0) )
(gimp-selection-shrink image 1)
;(script-fu-distress-selection 1 image fond 50 4 2 2 1 1)
; (gimp-selection-shrink image 1)
(gimp-context-set-foreground '(189 140 84))
(gimp-drawable-edit-fill fond FILL-FOREGROUND)
(gimp-selection-none image)
;(plug-in-wind 1 image fond 1 3 1 0 0)
;(plug-in-oilify-enhanced 1 image fond 1 12 fond 12 fond)
(gimp-context-set-foreground '(255 255 255))
(gimp-context-set-background '(0 0 0))
(plug-in-mosaic 1 image fond 7 1 1 0.5 0 135 0 1 0 1 0 1 )
(plug-in-oilify 1 image fond 2 0)
;(plug-in-oilify 1 image fond 6 0)
))
(define (material-snake2 fond image color color2) (begin
;(gimp-layer-set-lock-alpha fond TRUE)
(gimp-context-set-foreground '(0 0 0))
(gimp-context-set-background color)
(gimp-drawable-edit-fill fond FILL-FOREGROUND)
(plug-in-mosaic 1 image fond 30 1 7 0.5 0 135 0 1 0 1 0 1 )
;(plug-in-mosaic 1 image fond 30 1 7 0.5 0 135 0 1 0 1 1 1 )
(gimp-selection-none image)
(gimp-image-select-color image 0 fond '(0 0 0) )
(gimp-selection-shrink image 1)
;(script-fu-distress-selection 1 image fond 50 4 2 2 1 1)
; (gimp-selection-shrink image 1)
(gimp-context-set-foreground color2)
(gimp-drawable-edit-fill fond FILL-FOREGROUND)
(gimp-selection-none image)
;(plug-in-wind 1 image fond 1 3 1 0 0)
;(plug-in-oilify-enhanced 1 image fond 1 12 fond 12 fond)
(gimp-context-set-foreground '(255 255 255))
(gimp-context-set-background '(0 0 0))
(plug-in-mosaic 1 image fond 7 1 1 0.5 0 135 0 1 0 1 0 1 )
(plug-in-oilify 1 image fond 2 0)
;(plug-in-oilify 1 image fond 6 0)
))
(define (material-leopard2 fond image color color2 colopt) (begin
(gimp-context-set-foreground '(0 0 0))
(gimp-context-set-background color)
(gimp-drawable-edit-fill fond FILL-FOREGROUND)
(plug-in-mosaic 1 image fond 30 1 7 0.5 0 135 0 1 0 1 1 1 )
(gimp-selection-none image)
(gimp-image-select-color image 0 fond '(0 0 0) )
(gimp-selection-shrink image 1)
(gimp-context-set-foreground color2)
(gimp-drawable-edit-fill fond FILL-FOREGROUND)
(gimp-selection-none image)
(plug-in-oilify 1 image fond 5 0)
(plug-in-oilify 1 image fond 6 0)
))
(define (material-giraffe fond image) (begin
;(gimp-layer-set-lock-alpha fond TRUE)
(gimp-context-set-foreground '(112 68 31))
(gimp-context-set-background '(248 202 164))
(gimp-drawable-edit-fill fond FILL-FOREGROUND)
(plug-in-mosaic 1 image fond 25 1 5 0.5 0 0 0 1 0 1 1 1 )
(plug-in-wind 1 image fond 1 3 1 0 0)
(plug-in-oilify 1 image fond 2 0)
))
(define (material-zebra fond image) (begin
;(gimp-layer-set-lock-alpha fond TRUE)
(gimp-context-set-paint-mode 0)
(gimp-context-set-foreground '(0 0 0))
(gimp-context-set-background '(255 255 255))
(gimp-context-set-gradient-fg-bg-rgb)
(if (= (string->number (substring (car(gimp-version)) 0 3)) 2.10)
(gimp-context-set-gradient-repeat-mode 1)
(gimp-context-set-gradient-repeat-mode 3))
(gimp-drawable-edit-gradient-fill
fond
;BLEND-FG-TRANSPARENT
;LAYER-MODE-NORMAL-LEGACY
0 ;GRADIENT-LINEAR
0 ; 100
0
;REPEAT-NONE
;FALSE
;FALSE
1
0
0 ;FALSE
47
43
69
52
)
(gimp-drawable-brightness-contrast fond 0 0.5)
(plug-in-wind 1 image fond 1 3 1 0 0)
(plug-in-oilify 1 image fond 2 0)
(plug-in-ripple 1 image fond 100 25 1 0 1 TRUE TRUE)
))
(define (material-pois fond image color color2) (begin
(gimp-context-set-foreground '(165 165 165))
(gimp-drawable-edit-fill fond FILL-FOREGROUND)
(gimp-context-set-foreground color)
(gimp-context-set-background color2)
;(plug-in-newsprint 1 image fond 1 0 0 0 0 0 0 0 0 0 0 0)
(plug-in-newsprint 1 image fond
20 ;cell-width
0 ;colorspace
100 ;k-pullout
15 ;gry-ang
0 ;gry-spotfn QUI
15 ;red-ang
0 ;red-spotfn
75 ;grn-ang
0 ;grn-spotfn
0 ;blu-ang
0 ;blu-spotfn
45) ;oversample
(gimp-image-select-color image 2 fond '(0 0 0))
(gimp-drawable-edit-fill fond FILL-BACKGROUND)
(gimp-selection-invert image)
(gimp-drawable-edit-fill fond FILL-FOREGROUND)
(plug-in-oilify 1 image fond 2 0)
(gimp-selection-none image)
))
(define (material-squares fond image color color2) (begin
(gimp-context-set-foreground '(165 165 165))
(gimp-drawable-edit-fill fond FILL-FOREGROUND)
(gimp-context-set-foreground color)
(gimp-context-set-background color2)
;(plug-in-newsprint 1 image fond 1 0 0 0 0 0 0 0 0 0 0 0)
(plug-in-newsprint 1 image fond
20 ;cell-width
0 ;colorspace
100 ;k-pullout
15 ;gry-ang
2 ;gry-spotfn QUI
15 ;red-ang
0 ;red-spotfn
75 ;grn-ang
0 ;grn-spotfn
0 ;blu-ang
0 ;blu-spotfn
45) ;oversample
(gimp-image-select-color image 2 fond '(0 0 0))
(gimp-drawable-edit-fill fond FILL-BACKGROUND)
(gimp-selection-invert image)
(gimp-drawable-edit-fill fond FILL-FOREGROUND)
(plug-in-oilify 1 image fond 2 0)
(gimp-selection-none image)
))
(define (material-emap fond image gradient) (begin
(plug-in-solid-noise 1 image fond 1 0 (random 999999) 1 9 3)
(apply-gauss
image ; Image to apply blur
fond ; Layer to apply blur
5 ; Blur Radius x
5 ; Blue Radius y
)
(gimp-context-set-gradient gradient)
(plug-in-autostretch-hsv 1 image fond)
(if (= (string->number (substring (car(gimp-version)) 0 3)) 2.10)
(plug-in-gradmap 1 image fond)
(plug-in-gradmap 1 image (vector fond)) ) ; Map Gradient
))
(define (material-willwood fond img n1 n2) (begin
(plug-in-solid-noise 0 img fond 1 0 (random 65535) 2 n1 n2)
(plug-in-alienmap2 1 img fond 1 0 1 0 15 0 1 FALSE FALSE TRUE)
(plug-in-alienmap2 1 img fond 1 0 1 0 0.1 0 1 FALSE TRUE TRUE)
(gimp-drawable-hue-saturation fond 0 0 30 -40 0)
(plug-in-wind 1 img fond 1 3 1 0 0)
(plug-in-oilify 1 img fond 2 0)
))
(define (material-steampunk-brass img fond color n1) (begin
(if (= n1 0)
(gimp-context-set-foreground '(232 204 0) )
(gimp-context-set-foreground color )
)
(gimp-context-set-paint-mode LAYER-MODE-MULTIPLY-LEGACY)
(plug-in-solid-noise 0 img fond 0 0 (random 65535) 1 16 4)
(gimp-drawable-edit-fill fond FILL-FOREGROUND)
(gimp-drawable-hue-saturation fond 0 0 0 100 0)
(gimp-drawable-hue-saturation fond 0 0 0 100 0)
(gimp-context-set-paint-mode LAYER-MODE-NORMAL-LEGACY)
) )
(define (material-grunge-green img fond color n1) (begin
(plug-in-plasma 1 img fond 0 1.0) (gimp-drawable-desaturate fond 4)
(plug-in-noisify 1 img fond 1 0.2 0.2 0.2 0)
(gimp-context-set-paint-mode LAYER-MODE-MULTIPLY-LEGACY)
(if (= n1 0)
(gimp-context-set-background '(0 96 4) )
(gimp-context-set-background color )
)
(gimp-drawable-edit-fill fond FILL-BACKGROUND)
(gimp-context-set-paint-mode LAYER-MODE-NORMAL-LEGACY)
) )
(define (material-stripes img fond color color2 45deg size) (begin
(gimp-context-set-background color2)
(gimp-context-set-foreground color )
(if (= (string->number (substring (car(gimp-version)) 0 3)) 2.10)
(gimp-context-set-gradient (list-ref (cadr (gimp-gradients-get-list "")) 1))
(gimp-context-set-gradient (car (gimp-gradient-get-by-name(list-ref (car (gimp-gradients-get-list "")) 4)))) )
(gimp-context-set-gradient-repeat-mode REPEAT-SAWTOOTH)
(cond ((= 45deg 0)
(gimp-drawable-edit-gradient-fill fond 0 0 TRUE 1 0 TRUE 0 0 0 (round size))
)
((= 45deg 1)
(gimp-drawable-edit-gradient-fill fond 0 0 TRUE 1 0 TRUE 0 0 (round size) (round size ))
)
((= 45deg 2)
(gimp-drawable-edit-gradient-fill fond 0 0 TRUE 1 0 TRUE 0 0 (round size) 0)
)
)
)
)
;;;;;;;
;;;;;;;MATERIAL END
;;;;;;;
(define (effect-blur fond image) (begin
(apply-gauss image fond 6 6)
))
(define (effect-oilify fond image) (begin
(plug-in-oilify 1 image fond 20 0) ; Add olify effect
))
(define (effect-cubism fond image) (begin
(plug-in-cubism 1 image fond 15 9 1) ; Add cubism effect
))
(define (effect-ripple fond image) (begin
(plug-in-ripple 1 image fond 100 5 1 0 1 TRUE FALSE) ; Add ripple effect
))
(define (effect-bump-pattern fond image pattern scale) (begin
; (set! effect-layer (car (gimp-layer-new-from-drawable fond image))) ; New effect Layer
; (gimp-image-insert-layer image effect-layer 0 3) ; Add it to image
; (gimp-item-set-name effect-layer "Bumped") ; Name effect layer
(define bump-layer (car (gimp-layer-new-from-drawable fond image))) ; New patten layer
(gimp-image-insert-layer image bump-layer 0 -1)
(gimp-context-set-pattern pattern) ; Make bump pattern active
;(gimp-drawable-fill bump-layer FILL-PATTERN) ; Fill with pattern
;(scaled-pattern-fill image bump-layer pattern scale)
(material-pattern image pattern bump-layer scale)
;
; Call bump map procedure (pattern bump)
;
(plug-in-bump-map
1 ; Interactive (0), non-interactive (1)
image ; Input image
fond ; Input drawable
bump-layer ; Bumpmap drawable
130 ; Azimuth (float)
55 ; Elevation (float)
7 ; Depth
0 ; X offset
0 ; Y offset
0 ; Level that full transparency should represent
0 ; Ambient lighting factor
TRUE ; Compensate for darkening
FALSE ; Invert bumpmap
0) ; Type of map (0=linear, 1=spherical, 2=sinusoidal)
(gimp-image-remove-layer image bump-layer)
))
(define (effect-desat-chrome fond image) (begin
(gimp-drawable-desaturate fond 4 )
(if (= (string->number (substring (car(gimp-version)) 0 3)) 2.10)
(gimp-drawable-curves-spline fond 0 12 #(0 0.34902 0.266667 0.882353 0.494118 0.376471 0.65098 0.886275 0.87451 0.152941 1 1))
(gimp-drawable-curves-spline fond 0 #(0 0.34902 0.266667 0.882353 0.494118 0.376471 0.65098 0.886275 0.87451 0.152941 1 1)))
(apply-gauss image fond 3 3)
))
(define (effect-desat-chrome-color fond image fond-color number) (begin
(gimp-drawable-desaturate fond 2 )
(if (= (string->number (substring (car(gimp-version)) 0 3)) 2.10)
(gimp-drawable-curves-spline fond 0 12 #(0 0.34902 0.266667 0.882353 0.494118 0.376471 0.65098 0.886275 0.87451 0.152941 1 1))
(gimp-drawable-curves-spline fond 0 #(0 0.34902 0.266667 0.882353 0.494118 0.376471 0.65098 0.886275 0.87451 0.152941 1 1)))
(gimp-context-set-foreground fond-color)
(apply-gauss image fond 3 3)
(if (= number 0) (gimp-context-set-paint-mode LAYER-MODE-LIGHTEN-ONLY-LEGACY))
(if (= number 1) (gimp-context-set-paint-mode LAYER-MODE-MULTIPLY-LEGACY))
(if (= number 2) (gimp-context-set-paint-mode LAYER-MODE-OVERLAY-LEGACY))
(gimp-drawable-edit-fill fond FILL-FOREGROUND)
(gimp-context-set-paint-mode LAYER-MODE-NORMAL-LEGACY)
))
(define (effect-desat-color fond image fond-color number) (begin
(gimp-drawable-desaturate fond 2 )
(gimp-context-set-foreground fond-color)
(if (= number 0) (gimp-context-set-paint-mode LAYER-MODE-LIGHTEN-ONLY-LEGACY))
(if (= number 1) (gimp-context-set-paint-mode LAYER-MODE-MULTIPLY-LEGACY))
(if (= number 2) (gimp-context-set-paint-mode LAYER-MODE-OVERLAY-LEGACY))
(gimp-drawable-edit-fill fond FILL-FOREGROUND)
(gimp-context-set-paint-mode LAYER-MODE-NORMAL-LEGACY)
))
(define (effect-stain-glass fond image) (begin
(plug-in-mosaic 1 image fond ; mosaic drawing
20 ;tsize
4
1 ;tspc
0.65
1
135
0.2
1
1
1
0
0)
))
(define (effect-glitter fond image) (begin
;(plug-in-solid-noise 0 image fond 0 0 (random 65535) 1 16 4)
(plug-in-rgb-noise 1 image fond FALSE FALSE 0.6 0.6 0.6 0)
(plug-in-cubism 1 image fond 1 5 0) ; Add cubism effect
))
;;;;;;;
;;;;;;;EFFECTS END
;;;;;;;
(define
(
apply-plastic-logo-effect-299o
img
basetext
border-color
border-size
refl-color
refl-opacity
refl-dir
shadow-color
type
effect-fill
opacity
color
color2
pattern
pattern-scale
gradient
gradient-type
direction
grad-rev
;ripple
backtype
effect-back
fond-color
fond-color2
back-pattern
back-pattern-scale
back-gradient
back-gradient-type
blendir
back-grad-rev
vignette
vignette-color
applyMasks
)
(let*
(
(width (car (gimp-drawable-get-width basetext)))
(height (car (gimp-drawable-get-height basetext)))
(fond (car (gimp-layer-new img width height RGBA-IMAGE "Background" 100 LAYER-MODE-NORMAL-LEGACY)))
(olight (car (gimp-layer-new img width height RGBA-IMAGE "Light Outline" 90 LAYER-MODE-SCREEN-LEGACY)))
(border (car (gimp-layer-new img width height RGBA-IMAGE "Border" 100 LAYER-MODE-NORMAL-LEGACY)))
(refl (car (gimp-layer-new img width height RGBA-IMAGE "Refl" 70 LAYER-MODE-NORMAL-LEGACY)))
(mapeux (car (gimp-layer-new img width height RGBA-IMAGE "Mapper" 100 LAYER-MODE-NORMAL-LEGACY)))
(shad (car (gimp-layer-new img width height RGBA-IMAGE "Shadow" 100 LAYER-MODE-NORMAL-LEGACY)))
(chantext)
(basetextmask)
(xdest)
(ydest)
(reflmask)
(bump-layer -1) ; Bump Map layer
(effect-layer -1) ; Effect layer
)
(gimp-context-push)
(gimp-context-set-paint-mode LAYER-MODE-NORMAL-LEGACY )
;;;;;; filling back with background
(gimp-context-set-background fond-color)
(gimp-context-set-foreground fond-color2)
(gimp-selection-none img)
(fun-util-image-resize-from-layer img basetext)
(gimp-image-insert-layer img fond 0 1)
(gimp-drawable-edit-clear fond)
(if (= backtype 0)
(material-color fond-color fond)
;(begin
; (gimp-context-set-foreground fond-color)
; (gimp-drawable-edit-fill fond FILL-FOREGROUND)
;)
)
(if (= backtype 1)
(material-pattern img back-pattern fond back-pattern-scale)
)
(if (= backtype 2) ;START gradient
(material-gradient fond img back-gradient back-gradient-type blendir back-grad-rev fond-color))
(if (= backtype 3)
(material-none fond)
)
(if (= backtype 4)
(material-alubrushed fond img)
)
(if (= backtype 5)
(material-alubrushed-light fond img)
)
(if (= backtype 6)
(material-blue-jeans fond img 0)
)
(if (= backtype 7)
(material-blue-jeans fond img 1)
)
(if (= backtype 8)
(material-blue-jeans fond img 2)
)
(if (= backtype 9)
;(material-bovination fond img)
(material-carbon fond)
)
(if (= backtype 10)
(material-bovination-2 fond img)
)
(if (= backtype 11)
(material-camo2 fond img 0)
)
(if (= backtype 12)
(material-camo2 fond img 1)
)
(if (= backtype 13)
(material-plasma fond img)
)
(if (= backtype 14)
(material-patchwork fond img)
)
(if (= backtype 15)
(material-diffraction fond img)
)
(if (= backtype 16)
(material-pizza fond img)
)
(if (= backtype 17)
(material-leopard fond img)
)
(if (= backtype 18)
(material-giraffe fond img)
)
(if (= backtype 19)
(material-zebra fond img)
)
(if (= backtype 20)
(material-leopard2 fond img fond-color fond-color2 0)
)
(if (= backtype 21)
(material-snake fond img))
(if (= backtype 22)
(material-snake2 fond img fond-color fond-color2))
(if (= backtype 23)
(material-pois fond img fond-color fond-color2))
(if (= backtype 24)
(material-squares fond img fond-color fond-color2))
(if (= backtype 25)
(material-emap fond img back-gradient))
(if (= backtype 26)
(material-pijama fond img back-gradient 0))
(if (= backtype 27)
(material-pijama fond img back-gradient 1))
(if (= backtype 28)
(material-pijama fond img back-gradient 2))
(if (= backtype 29)
(material-willwood fond img 9 1))
(if (= backtype 30)
(material-steampunk-brass img fond fond-color 0))
(if (= backtype 31)
(material-steampunk-brass img fond fond-color 1))
(if (= backtype 32)
(material-grunge-green img fond fond-color 0))
(if (= backtype 33)
(material-grunge-green img fond fond-color 1))
(if (= backtype 34)
(material-stripes img fond fond-color fond-color2 0 20))
(if (= backtype 35)
(material-stripes img fond fond-color fond-color2 1 20))
(if (= backtype 36)
(material-stripes img fond fond-color fond-color2 2 20))
(if (= backtype 37)
(material-gradient fond img back-gradient back-gradient-type blendir back-grad-rev fond-color))
(if (= effect-back 1) ;Blur
(effect-blur fond img) ; Blur effect
)
(if (= effect-back 2)
(effect-oilify fond img) ; Add olify effect
)
(if (= effect-back 3)
(effect-cubism fond img) ; Add cubism effect
)
(if (= effect-back 4)
(effect-ripple fond img) ; Add ripple effect
)
(if (= effect-back 5)
(effect-bump-pattern fond img back-pattern back-pattern-scale); Bump gradient
)
(if (= effect-back 6)
(effect-desat-chrome fond img)
)
(if (= effect-back 7)
(effect-desat-chrome-color fond img fond-color 0)
)
(if (= effect-back 8)
(effect-desat-chrome-color fond img fond-color 1)
)
(if (= effect-back 9)
(effect-desat-chrome-color fond img fond-color 2)
)
(if (= effect-back 10)
(effect-desat-color fond img fond-color 0)
)
(if (= effect-back 11)
(effect-desat-color fond img fond-color 1)
)
(if (= effect-back 12)
(effect-desat-color fond img fond-color 2)
)
(if (= effect-back 13)
(effect-stain-glass fond img)
)
(if (= effect-back 14)
(effect-glitter fond img)
)
; composite text and channel
(gimp-image-select-item img 0 basetext)
(define chantext (car (gimp-selection-save img)))