It is currently Tue Jul 02, 2024 3:31 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: iccii-aquabou.scm
PostPosted: Sun May 16, 2021 11:48 am  (#1) 
Offline
GimpChat Member
User avatar

Joined: Jan 06, 2020
Posts: 343
Location: The Netherlands
I sometimes use this script in Gimp 2.8.
Could it be fixed so I can use it in Gimp 2.10!


Attachments:
2028_iccii-aquabou.scm [32.28 KiB]
Downloaded 144 times
gimpchat.png
gimpchat.png [ 588.66 KiB | Viewed 4292 times ]
Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: iccii-aquabou.scm
PostPosted: Sun May 16, 2021 12:50 pm  (#2) 
Offline
GimpChat Member
User avatar

Joined: May 10, 2013
Posts: 1389
Location: FInland
File->Create->AquaPro2

edit: Fixed displace type & LINEAR. Download from post #5.

Attachment:
Aquapill-Round-Hrule-Logo.png
Aquapill-Round-Hrule-Logo.png [ 175.44 KiB | Viewed 4257 times ]


Last edited by Nidhogg on Wed May 19, 2021 12:47 pm, edited 1 time in total.

Top
 Post subject: Re: iccii-aquabou.scm
PostPosted: Sun May 16, 2021 1:05 pm  (#3) 
Offline
GimpChat Member
User avatar

Joined: Jan 06, 2020
Posts: 343
Location: The Netherlands
Thank you!


Top
 Post subject: Re: iccii-aquabou.scm
PostPosted: Wed May 19, 2021 11:59 am  (#4) 
Offline
GimpChat Member
User avatar

Joined: Jan 06, 2020
Posts: 343
Location: The Netherlands
Script works in 2.10. I did notice that if I want to use a gradient or a pattern the script will not work. Do you have a solution for that?


Top
 Post subject: Re: iccii-aquabou.scm
PostPosted: Wed May 19, 2021 12:41 pm  (#5) 
Offline
GimpChat Member
User avatar

Joined: May 10, 2013
Posts: 1389
Location: FInland
Yes, fixed.

Attachment:
GradienPill.png
GradienPill.png [ 95.47 KiB | Viewed 4063 times ]


Attachment:
TexturePill.png
TexturePill.png [ 165.42 KiB | Viewed 4063 times ]


Attachments:
iccii-aquabou.scm [32.42 KiB]
Downloaded 148 times


Last edited by Nidhogg on Mon May 31, 2021 4:15 am, edited 1 time in total.
Top
 Post subject: Re: iccii-aquabou.scm
PostPosted: Wed May 19, 2021 1:16 pm  (#6) 
Offline
GimpChat Member
User avatar

Joined: Jan 06, 2020
Posts: 343
Location: The Netherlands
Thanks again!


Top
 Post subject: Re: iccii-aquabou.scm
PostPosted: Wed May 19, 2021 3:45 pm  (#7) 
Offline
GimpChat Member

Joined: May 12, 2015
Posts: 4694
Thank you, Jappaloe63, for reminding me of this nice filter, and you, Nidhogg for being so nice and fixing it for all of us!
Attachment:
Thanks.jpg
Thanks.jpg [ 165.96 KiB | Viewed 4030 times ]


Top
 Post subject: Re: iccii-aquabou.scm
PostPosted: Thu May 20, 2021 12:22 pm  (#8) 
Offline
GimpChat Member

Joined: Apr 09, 2018
Posts: 1792
Location: France
ImageImage

Image

_________________
Les parfums, les couleurs et les sons se répondent.Baudelaire (Les fleurs du mal)
2.10.14 (Samj),2.10.21 (Samj) and 2.10.23(Samj) OS Windows 10 Home 64 bits


Top
 Post subject: Re: iccii-aquabou.scm
PostPosted: Mon May 31, 2021 4:16 am  (#9) 
Offline
GimpChat Member
User avatar

Joined: May 10, 2013
Posts: 1389
Location: FInland
I just noticed the script has 4 options, button still had the old "Toolbox" entry.
You can fix it by editing line 655 with: "<Image>/File/Create/AquaPro2/Button..."

or download again from post 5


Top
 Post subject: Re: iccii-aquabou.scm
PostPosted: Mon May 31, 2021 4:59 am  (#10) 
Offline
GimpChat Member
User avatar

Joined: Apr 15, 2017
Posts: 1826
Yes, lines 428, 518, 655 and 838 should to be edited. I did that when I first tried the script.


Last edited by racer-x on Mon May 31, 2021 5:27 am, edited 1 time in total.

Top
 Post subject: Re: iccii-aquabou.scm
PostPosted: Mon May 31, 2021 5:00 am  (#11) 
Offline
GimpChat Member
User avatar

Joined: Jan 06, 2020
Posts: 343
Location: The Netherlands
Thank you ... now I am really completely satisfied!


Attachments:
thankyou.png
thankyou.png [ 133.4 KiB | Viewed 2796 times ]
Top
 Post subject: Re: iccii-aquabou.scm
PostPosted: Mon May 31, 2021 1:29 pm  (#12) 
Offline
GimpChat Member

Joined: Dec 19, 2018
Posts: 158
I didn't know this script.
I liked it a lot, a nice result in a simple and fast way.
Jappaloe63 thanks for commenting on this script.
Nidhogg, thx for making it functional again!

However...

One thing I noticed from the first time I tested the script is that it doesn't warn about the user not having the default font.
I don't have the font classicheavylight. The script selects another font and runs without giving the user any information about which font they are using.

I also noticed that with the Logo In Pill:
01- If I enter 3 separate words in the Text field, 3 individual blocks are generated for each word.
02- But if I enter only one word, instead of generating a block with this word, the script generates a block for each letter of the word.

This result (individual blocks for letters of a word) is welcome, but it would be nice if the script also generated an entire word per block.
Attachment:
LIP.png
LIP.png [ 268.14 KiB | Viewed 2771 times ]


Thx.

Edited (PS)
I think I get it... with the Button option you can generate a whole word per block.
Attachment:
LIP02.png
LIP02.png [ 118.5 KiB | Viewed 2768 times ]


Top
 Post subject: Re: iccii-aquabou.scm
PostPosted: Mon May 31, 2021 6:12 pm  (#13) 
Offline
GimpChat Member
User avatar

Joined: May 10, 2013
Posts: 1389
Location: FInland
Yeah that's how it works. I didn't want to edit the font name because I'm on Linux, and you never know what fonts people have installed on their systems. Just replaced "classicheavylight" to "Proxima Nova Alt", that I have installed and it worked. It's in the lines 668-670 and 851-853 under ; Default setting


Top
 Post subject: Re: iccii-aquabou.scm
PostPosted: Mon May 31, 2021 9:08 pm  (#14) 
Offline
GimpChat Member
User avatar

Joined: May 24, 2021
Posts: 790
Location: SEA - South East Asia
This is an Awesome script!
Image

_________________
Patrice


Top
 Post subject: Re: iccii-aquabou.scm
PostPosted: Tue Jun 01, 2021 2:11 am  (#15) 
Offline
GimpChat Member

Joined: Apr 09, 2018
Posts: 1792
Location: France
Image

_________________
Les parfums, les couleurs et les sons se répondent.Baudelaire (Les fleurs du mal)
2.10.14 (Samj),2.10.21 (Samj) and 2.10.23(Samj) OS Windows 10 Home 64 bits


Top
 Post subject: iccii-aquabou.scm v2_10_28 No LONGER deprecated
PostPosted: Tue Nov 16, 2021 6:00 pm  (#16) 
Offline
GimpChat Member
User avatar

Joined: Oct 23, 2021
Posts: 67
Hello Nidhogg
Attachment:
NoLongerDeprecated.jpg
NoLongerDeprecated.jpg [ 140.67 KiB | Viewed 1496 times ]

The historical comment in Japanese about strbreakup highlighted in yellow
"Making it easier to split strings, so improve them" has been kept as an encouragement.

Introducing iccii-aquabou v2.10.28 22 KB Aqua style pill buttons
Attachment:
iccii-aquabou2_10_28.zip [6.07 KiB]
Downloaded 63 times


Firstly, AlSchemist added you in the credits. :jumpclap

Nidhogg wrote:
File > Create >AquaPro2


Caution: there are not any new features. It is a version for :geek who does not hate Scheme.

This version includes shortcuts, separated menu registration, some optimizations about constants "(* 512 2)" => "1024",
new pretty-print with aligned parenthesis and longer lines of Scheme beyond 80 char per line in full screen Notepad++.

AlSchemist removed deprecated API and (- 867 333) => 534 lines of Scheme. :shock:

This main subject of this article is:

1. How to find deprecated API in Gimp Script-Fu?
Gimp menu "Filters" > "Script-Fu" > "Console":
Copy and paste the following function in the input area of the console then validate by ENTER:
(define (deprecated? strFnc)
   (let*   (   (pdb (gimp-procedural-db-query ".*" ".*Deprecated.*"
               ".*Deprecated.*" ".*" ".*" ".*" ".*")
            )
            (nbrDeprec (car pdb))
            (lstPdbDeprec (cadr pdb))
         )
      (and (member strFnc lstPdbDeprec) #t)
)   )

;-> Script-Fu replies by the name of the function deprecated? meaning that the Scheme code is OK.

Ask Script-Fu:
After the name of the function, enter as parameter directly the name of any function such as gimp-version between double quote as a string:
(deprecated? "gimp-version")

;-> #f

gimp-version is not deprecated.

On the other hand:
(deprecated? "gimp-image-add-layer")

;-> #t

If you try unknown name of function, deprecated? will fail to preserve the future:
(deprecated? "unknown")

;-> #f

However parsing a function from iccii-aquabou.scm is out of the scope of this post.
Send a Private Message to AlSchemist if you are interested in the code in Scheme of deprecated-list.

In short, hereafter enclosed is the result for the first big function of the Aqua style button:
(deprecated-list script-fu-aqua-button2)

;-> ("gimp-blend" "gimp-drawable-set-visible" "gimp-ellipse-select" "gimp-gradients-get-gradient" "gimp-gradients-set-gradient" "gimp-image-add-layer" "gimp-palette-get-background" "gimp-palette-get-foreground" "gimp-palette-set-background" "gimp-palette-set-foreground" "gimp-patterns-get-pattern" "gimp-patterns-set-pattern" "gimp-perspective" "gimp-rect-select" "gimp-selection-layer-alpha")

We can classify the deprecated API in three families from easy to difficult:
  1. Change of API name only: the list of parameters is unchanged ;)
  2. Change of order of the parameters. Some extra parameters could be removed.
  3. Add new parameters :roll:

Stay tuned to sweeten the pill! :oops:


Top
 Post subject: Re: iccii-aquabou.scm
PostPosted: Tue Nov 16, 2021 9:31 pm  (#17) 
Offline
GimpChat Member
User avatar

Joined: Jul 06, 2013
Posts: 2607
Location: California
Examples:

Logo in Pill:
Image

Button:
Image


Top
 Post subject: Re: iccii-aquabou.scm v2_10_28 No LONGER deprecated
PostPosted: Wed Nov 17, 2021 1:58 am  (#18) 
Offline
GimpChat Member
User avatar

Joined: May 24, 2021
Posts: 790
Location: SEA - South East Asia
AlSchemist wrote:
Hello Nidhogg
Attachment:
The attachment NoLongerDeprecated.jpg is no longer available

The historical comment in Japanese about strbreakup highlighted in yellow
"Making it easier to split strings, so improve them" has been kept as an encouragement.

Introducing iccii-aquabou v2.10.28 22 KB Aqua style pill buttons
Attachment:
The attachment iccii-aquabou2_10_28.zip is no longer available


Firstly, AlSchemist added you in the credits. :jumpclap

Nidhogg wrote:
File > Create >AquaPro2


Caution: there are not any new features. It is a version for :geek who does not hate Scheme.

This version includes shortcuts, separated menu registration, some optimizations about constants "(* 512 2)" => "1024",
new pretty-print with aligned parenthesis and longer lines of Scheme beyond 80 char per line in full screen Notepad++.

AlSchemist removed deprecated API and (- 867 333) => 534 lines of Scheme. :shock:

This main subject of this article is:

1. How to find deprecated API in Gimp Script-Fu?
Gimp menu "Filters" > "Script-Fu" > "Console":
Copy and paste the following function in the input area of the console then validate by ENTER:
(define (deprecated? strFnc)
   (let*   (   (pdb (gimp-procedural-db-query ".*" ".*Deprecated.*"
               ".*Deprecated.*" ".*" ".*" ".*" ".*")
            )
            (nbrDeprec (car pdb))
            (lstPdbDeprec (cadr pdb))
         )
      (and (member strFnc lstPdbDeprec) #t)
)   )

;-> Script-Fu replies by the name of the function deprecated? meaning that the Scheme code is OK.

Ask Script-Fu:
After the name of the function, enter as parameter directly the name of any function such as gimp-version between double quote as a string:
(deprecated? "gimp-version")

;-> #f

gimp-version is not deprecated.

On the other hand:
(deprecated? "gimp-image-add-layer")

;-> #t

If you try unknown name of function, deprecated? will fail to preserve the future:
(deprecated? "unknown")

;-> #f

However parsing a function from iccii-aquabou.scm is out of the scope of this post.
Send a Private Message to AlSchemist if you are interested in the code in Scheme of deprecated-list.

In short, hereafter enclosed is the result for the first big function of the Aqua style button:
(deprecated-list script-fu-aqua-button2)

;-> ("gimp-blend" "gimp-drawable-set-visible" "gimp-ellipse-select" "gimp-gradients-get-gradient" "gimp-gradients-set-gradient" "gimp-image-add-layer" "gimp-palette-get-background" "gimp-palette-get-foreground" "gimp-palette-set-background" "gimp-palette-set-foreground" "gimp-patterns-get-pattern" "gimp-patterns-set-pattern" "gimp-perspective" "gimp-rect-select" "gimp-selection-layer-alpha")

We can classify the deprecated API in three families from easy to difficult:
  1. Change of API name only: the list of parameters is unchanged ;)
  2. Change of order of the parameters. Some extra parameters could be removed.
  3. Add new parameters :roll:

Stay tuned to sweeten the pill! :oops:


AlSchemist seems to have a great knowledge about tiny script
PixLab (a.k.a. Patrice) is no programmer at All, but if you can tell to AlSchemist what Patrice did found about the original script that make Patrice feel "limited" in many ways with the original script (Patrice did not try the one from AlSchemist yet, he will wait)

Limitation about size of the font with "File/Create/AquaPro2/Button..."> Patrice cannot make font bigger than 685 pixels as at 686 he got an error, with the default font(which I don't have), and with another font, Patrice can go up to 697 pixels, but at 698 he got the same type of error.
Same error appear with "File/Create/AquaPro2/Logo in Pill..." Thus this tells him that there is limitation somewhere...
Same limitation/Error about the "File/Create/AquaPro2/Hrule..." about the "width" and "Height"
Same Error/Limitation about the "File/Create/AquaPro2/Round..." about the radius
All error got this message (only the floating point number change):
Error: Procedure execution of plug-in-gauss-rle2 failed on invalid input arguments: Procedure 'plug-in-gauss-rle2' has been called with value '860.504202' for argument 'horizontal' (#4, type gdouble). This value is out of range.

Attachment:
screenshot_20211117-121912.png
screenshot_20211117-121912.png [ 23.4 KiB | Viewed 1476 times ]



Also, Patrice found extremely annoying to not have a slider on the UI to increase quickly the font size and other options, so he did discovered by comparing some tinyscripts that by changing only 1 parameter and 1 parameter only
SF-ADJUSTMENT   _"Font Size (pixels)"   '(75 2 2048 1 1 0 1)
//by
SF-ADJUSTMENT   _"Font Size (pixels)"   '(75 2 2048 1 1 0 0)
//Note the 1 to 0 on the last parameter

He now got a slider and an input box with arrows up and down at the same time (no need to tell how Patrice is now happy), but in the end why tinyscripter don't do that?

Anyway thanks AlSchemist for me for having a look at this script :bigthup

In the very end I'm exhausted to speak about me at the third person, and about you at the third of the third person, my next post will be back to "normal mode" ;)

_________________
Patrice


Top
 Post subject: Re: iccii-aquabou.scm
PostPosted: Wed Nov 17, 2021 9:46 am  (#19) 
Offline
GimpChat Member
User avatar

Joined: May 10, 2013
Posts: 1389
Location: FInland
AlSchemist, thanks for sweetening the pill. It turned 20 years old 2 months ago!


Top
 Post subject: Is there a limit in gauss function?
PostPosted: Wed Nov 17, 2021 4:40 pm  (#20) 
Offline
GimpChat Member
User avatar

Joined: Oct 23, 2021
Posts: 67
:tyspin Mackenzieh, PixLab and Nidhogg!

PixLab wrote:
SF-ADJUSTMENT _"Font Size (pixels)" '(75 2 2048 1 1 0 0)

The upper limit "2048" is a little bit too big. :faint However why not for the last zero! :clap
The original version with 867 lines said:
  • "SF-ADJUSTMENT _"Font Size (pixels)" '(100 2 500 1 1 0 1)"
  • "SF-ADJUSTMENT _"Font Size (pixels)" '(75 2 500 1 1 0 1)"

Is there a limit in gauss function?

Copy and paste the following tool in the Script-Fu console:
(define (proc-arg-search proc token) ; search token in all arguments of PDB functions matching proc
   (let loopApi ((lstApi (cadr (gimp-procedural-db-query (string-append ".*" proc ".*") ".*" ".*" ".*" ".*" ".*" ".*"))))
      (if (not (pair? lstApi)) (string->symbol "") ; return nothing
         (let*   (   (procedure-name (car lstApi))
                  (nbrPrm (car (last (butlast (gimp-procedural-db-proc-info procedure-name)))))
               )
            (let loopPrm ((arg-num 0))
               (if (= arg-num nbrPrm) (loopApi (cdr lstApi))
                  (let*   (   (lstInfo (gimp-procedural-db-proc-arg procedure-name arg-num))
                           (arg-name  (cadr lstInfo))
                           (arg-descr (caddr lstInfo))
                           (lstToken (strbreakup (car (strbreakup (car (strbreakup arg-descr "-")) ")")) " "))
                           (strInfo (string-append procedure-name ": " arg-name ": " arg-descr))
                        )
                     (if (and (member token lstToken) #t) (displayln strInfo))
                     (loopPrm (+ arg-num 1))
)   )   )   )   )   )   )


Then ask the Script-Fu console by:
(proc-arg-search "gauss" "500")

;-> Script-Fu will tell you a long story about the known limit "500" in the gauss procedures:
plug-in-gauss-iir2: horizontal: Horizontal radius of gaussian blur (in pixels (0 <= horizontal <= 500)
plug-in-gauss-iir2: vertical: Vertical radius of gaussian blur (in pixels (0 <= vertical <= 500)
plug-in-gauss: horizontal: Horizontal radius of gaussian blur (in pixels (0 <= horizontal <= 500)
plug-in-gauss: vertical: Vertical radius of gaussian blur (in pixels (0 <= vertical <= 500)
plug-in-gauss-rle2: horizontal: Horizontal radius of gaussian blur (in pixels (0 <= horizontal <= 500)
plug-in-gauss-rle2: vertical: Vertical radius of gaussian blur (in pixels (0 <= vertical <= 500)
plug-in-gauss-iir: radius: Radius of gaussian blur (in pixels (0 <= radius <= 500)
plug-in-gauss-rle: radius: Radius of gaussian blur (in pixels (0 <= radius <= 500)

:yesnod 500 is an historical limit in the main gauss procedures!

Anyway, replace all calls of plug-in-gauss-rle2 in Aqua Btn with our new "gauss" function:
(define (gauss run-mode image drawable horizontal vertical)
   (plug-in-gauss-rle2 run-mode image drawable (min horizontal 500) (min vertical 500))
)

gauss calls plug-in-gauss-rle2 with the same parameters but within the limit of 500.
The entire region will be not processed in the giant Aqua pill but the issue is solved.
Drawing is longer. :zzz However maybe the final result is also acceptable :paint


Top
Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Error with ICCII's Random Blends Script

6



* Login  



Powered by phpBB3 © phpBB Group