It is currently Sun Jul 21, 2024 6:17 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 31 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Two Text Balloon Scripts
PostPosted: Sat May 14, 2011 1:33 pm  (#1) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
I have balloon.scm which is supposed to make text balloons in both circular and rectangular shapes. It is an old script and the rectangular shape puts forth this error.

Image

The newer script (FU_create-new_text-balloon.scm), which is compatible with v2.6, does not have the rectangle selection in the dialog. Whoever fixed the script eliminated it.

Can the rectangle balloon be resurrected?

I've zipped the two scripts and attached them.
  1. balloon.scm
  2. FU_create-new_text-balloon.scm


Attachments:
textballoonscripts.zip [1.89 KiB]
Downloaded 275 times

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein
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: Two Text Balloon Scripts
PostPosted: Sat May 14, 2011 1:43 pm  (#2) 
Offline
GimpChat Member

Joined: Apr 11, 2010
Posts: 545
Location: In the mini-chat, saying silly things
The old one works with 2.6 but the rectangle option gives error messages so I think whoever fixed it for 2.6, just removed that option.

You might like this font.
http://www.dafont.com/search.php?fpp=50 ... ka+bubbles

_________________
Image


Top
 Post subject: Re: Two Text Balloon Scripts
PostPosted: Sat May 14, 2011 1:55 pm  (#3) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
Thanks Jolie. There's a nice variety of text balloons in the font.

After reading the readme.txt file, I did a search in daFont for komika and there are some good comic text choices too.

http://www.dafont.com/search.php?q=komika&fpp=50

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Two Text Balloon Scripts
PostPosted: Sat May 14, 2011 2:03 pm  (#4) 
Offline
GimpChat Member

Joined: Mar 29, 2011
Posts: 346
Location: Wisconsin
Oregonian wrote:
Can the rectangle balloon be resurrected?

Simply a matter of removing the extra unused argument.

Registers in File>Create>Text Balloon...
p.s. I didn't change the script name, so be sure to remove the old one first.


Attachments:
balloon2-6.scm [2.71 KiB]
Downloaded 340 times

_________________
Image


Last edited by bkh1914 on Sat May 14, 2011 2:12 pm, edited 1 time in total.
Top
 Post subject: Re: Two Text Balloon Scripts
PostPosted: Sat May 14, 2011 2:07 pm  (#5) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
I'm trying to save that attachment and I can't get it to save. By chance did you save it as inline? It won't download.

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Two Text Balloon Scripts
PostPosted: Sat May 14, 2011 2:10 pm  (#6) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
Oregonian wrote:
Can the rectangle balloon be resurrected?


Delete the word "TRUE" from the line containing the following (in 'balloon.scm')
(gimp-rect-select img (* bw 0.1) (* bh 0.1) (* bw 0.8) (* bh 0.65) ADD TRUE FALSE 0) )


Personally, I should think using rounded rectangles would be offered as an option.

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: Two Text Balloon Scripts
PostPosted: Sat May 14, 2011 2:11 pm  (#7) 
Offline
GimpChat Member

Joined: Mar 29, 2011
Posts: 346
Location: Wisconsin
Yes I did. I'll fix it now.

_________________
Image


Top
 Post subject: Re: Two Text Balloon Scripts
PostPosted: Sat May 14, 2011 2:19 pm  (#8) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
saulgoode wrote:

Delete the word "TRUE" from the line containing the following (in 'balloon.scm')
(gimp-rect-select img (* bw 0.1) (* bh 0.1) (* bw 0.8) (* bh 0.65) ADD TRUE FALSE 0) )


Personally, I should think using rounded rectangles would be offered as an option.

That works saulgoode. Thanks. I agree, a rounded rectangle would be a nice option.

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Two Text Balloon Scripts
PostPosted: Sat May 14, 2011 5:46 pm  (#9) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4050
To get rounded rectangles, the fix is very simple:

replace these two if statements (there is one for round-balloon and one for round-think):

Replace this:

(if (= rect TRUE) (gimp-rect-select img (* bw 0.1) (* bh 0.1) (* bw 0.8) (* bh 0.625) 0 FALSE 0))

With this:

(if (= rect TRUE) (gimp-round-rect-select img (* bw 0.1) (* bh 0.1) (* bw 0.8) (* bh 0.625) 10 10 0 TRUE FALSE 0 0))


I thought a rounded corners of 10 x 10 would be sufficient, but you can always raise them higher, if you want.

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: Two Text Balloon Scripts
PostPosted: Sat May 14, 2011 7:25 pm  (#10) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
mahvin wrote:
To get rounded rectangles, the fix is very simple:

replace these two if statements (there is one for round-balloon and one for round-think):

Replace this:

(if (= rect TRUE) (gimp-rect-select img (* bw 0.1) (* bh 0.1) (* bw 0.8) (* bh 0.625) 0 FALSE 0))

With this:

(if (= rect TRUE) (gimp-round-rect-select img (* bw 0.1) (* bh 0.1) (* bw 0.8) (* bh 0.625) 10 10 0 TRUE FALSE 0 0))


I thought a rounded corners of 10 x 10 would be sufficient, but you can always raise them higher, if you want.
I did a search in the script for that first line and it isn't in the script.

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Two Text Balloon Scripts
PostPosted: Sat May 14, 2011 7:29 pm  (#11) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4050
That's because I altered mine after saulgoode's recommendation. The lines are there, O. It's the same line saulgood recommended changing. I am using the script you provided.

The only thing you are doing is replacing gimp-rect-select, with gimp-round-rect-select.

This, as Saulgoode suggested:
Delete the word "TRUE" from the line containing the following (in 'balloon.scm')

[code](gimp-rect-select img (* bw 0.1) (* bh 0.1) (* bw 0.8) (* bh 0.65) ADD TRUE FALSE 0) )
[/code]


With this:

(gimp-round-rect-select img (* bw 0.1) (* bh 0.1) (* bw 0.8) (* bh 0.625) 10 10 0 TRUE FALSE 0 0)

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: Two Text Balloon Scripts
PostPosted: Sat May 14, 2011 8:30 pm  (#12) 
Offline
GimpChat Member

Joined: Apr 11, 2010
Posts: 545
Location: In the mini-chat, saying silly things
Oregonian wrote:
Thanks Jolie. There's a nice variety of text balloons in the font.

After reading the readme.txt file, I did a search in daFont for komika and there are some good comic text choices too.

http://www.dafont.com/search.php?q=komika&fpp=50



Those are the ones I've been using lately. :)

p.s. Sorry. In my reply I just repeated what you already said. I should have read your post better.

_________________
Image


Top
 Post subject: Re: Two Text Balloon Scripts
PostPosted: Sat May 14, 2011 8:52 pm  (#13) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
mahvin wrote:
That's because I altered mine after saulgoode's recommendation. The lines are there, O. It's the same line saulgood recommended changing. I am using the script you provided.
As did I. But that line, I copied and pasted it in the text search and it doesn't come up.

I need to go back to the one I fixed and try again. It does work. It makes a rectangular balloon.

I see that the lines you put up still say TRUE in them.

Later: I used the original balloon.scm and searched for

(gimp-rect-select img (* bw 0.1) (* bh 0.1) (* bw 0.8) (* bh 0.65) ADD TRUE FALSE 0) )

It simply is not found in the script.

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Two Text Balloon Scripts
PostPosted: Sat May 14, 2011 9:00 pm  (#14) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4050
O: I am using the original balloon.scm, not the FU one. I'm sort of confused because all I did was change one line of code, the same line of code Saulgoode suggested for balloon.scm (removing TRUE).

Are we talking about a different file? Because I haven't done anything to make two whole lines of code to disappear from a script that is in your possession. I'd like to think I have those kind of powers, though, hahaha...

The lines with TRUE in them deal with the round parameters anti-aliasing, round-rect and rect are not exact, round requires parameters that rect does not.


Attachments:
balloon.scm.zip [926 Bytes]
Downloaded 119 times

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Last edited by mahvin on Sat May 14, 2011 9:07 pm, edited 1 time in total.
Top
 Post subject: Re: Two Text Balloon Scripts
PostPosted: Sat May 14, 2011 9:06 pm  (#15) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4050
Additionally, I am curious, my search function doesn't always work when I input an entire line of code, I have no idea why, but the file is so small I don't really need to use search.

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: Two Text Balloon Scripts
PostPosted: Sat May 14, 2011 9:07 pm  (#16) 
Offline
Retired Staff
User avatar

Joined: May 22, 2008
Posts: 6947
Location: Somewhere in GIMP
No, I, too am looking at the original balloon.scm script.

I think I see what the problem is.

This is the line in the script
(gimp-rect-select img (* bw 0.1) (* bh 0.1) (* bw 0.8) (* bh 0.625) ADD TRUE FALSE 0))

This is the line you put up:

(gimp-rect-select img (* bw 0.1) (* bh 0.1) (* bw 0.8) (* bh 0.65) ADD TRUE FALSE 0) )

So did you leave TRUE in the script? Your changed line still has it in it.

_________________
Image
World War IV will be fought with sticks and stones. - Albert Einstein


Top
 Post subject: Re: Two Text Balloon Scripts
PostPosted: Sat May 14, 2011 9:11 pm  (#17) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4050
Funny thing is, I never changed any code, other than removing TRUE, as saulgoode suggested.

And of course, adding the new round-rect option, but I never made any other changes to the code, even then.

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: Two Text Balloon Scripts
PostPosted: Sat May 14, 2011 9:13 pm  (#18) 
Offline
Global Moderator
User avatar

Joined: Oct 06, 2010
Posts: 4050
I have a habit of editing my last post, so check my last few comments. I even added my own updated file.

_________________
"In order to attain the impossible, one must attempt the absurd."
~ Miguel de Cervantes


Top
 Post subject: Re: Two Text Balloon Scripts
PostPosted: Sat May 14, 2011 9:25 pm  (#19) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14715
Location: USA
I think it was the removal of ADD, and giving the square(rect) parameters to follow that fixed it.
Anyways i fixed it so the script name shows in the pop-up, and the menu position is changed to Filters/Render/Text-Balloon.
; balloon
; creates a balloon like in comics
; it sucks a bit ;-)
; (C) Copyright 2000 by Michael Spunt <t0mcat@gmx.de>
;
; Updated to Gimp2.4 (11-2007) http://www.gimpscripts.com
;
;
(define (round-balloon img drawable bw bh rect np orientation revert lw)
(let* ((x 0))
(if (= np FALSE) (begin
(set! x (- (* bw 0.5) (* bw 0.2)))
(gimp-ellipse-select img x (* bh 0.5) (* bw 0.4) (* bh 0.4) REPLACE TRUE FALSE 0)
(set! x (- (* bw 0.5) (* bw 0.2) (* bw orientation -0.1)))
(gimp-ellipse-select img x (* bh 0.5) (* bw 0.4) (* bh 0.4) SUB TRUE FALSE 0)))
(if (= revert FALSE) (gimp-selection-translate img (* bw orientation 0.3) 0))
(if (= rect FALSE) (gimp-ellipse-select img (* bw 0.1) (* bh 0.1) (* bw 0.8) (* bh 0.65) ADD TRUE FALSE 0))
(if (= rect TRUE) (gimp-round-rect-select img (* bw 0.1) (* bh 0.1) (* bw 0.8) (* bh 0.65) 10 10 0 TRUE FALSE 0 0))
(gimp-edit-fill drawable 0)
(gimp-selection-shrink img lw)
(gimp-edit-fill drawable 1)))

(define (round-think-balloon img drawable bw bh rect np orientation revert lw)
(let* ((x 0))
(if (= np FALSE) (begin
(set! x (+ (* bw 0.5) (* bw -0.025) (* bw orientation 0.3)))
(gimp-ellipse-select img x (* bh 0.85) (* bw 0.05) (* bh 0.05) REPLACE TRUE FALSE 0)
(set! x (+ (* bw 0.5) (* bw -0.05) (* bw orientation 0.2)))
(gimp-ellipse-select img x (* bh 0.75) (* bw 0.1) (* bh 0.1) ADD TRUE FALSE 0)))
(if (= revert TRUE) (gimp-selection-translate img (* orientation bw -0.3) 0))
(if (= rect FALSE) (gimp-ellipse-select img (* bw 0.1) (* bh 0.1) (* bw 0.8) (* bh 0.65) ADD TRUE FALSE 0))
(if (= rect TRUE) (gimp-round-rect-select img (* bw 0.1) (* bh 0.1) (* bw 0.8) (* bh 0.625) 10 10 0 TRUE FALSE 0 0))
(gimp-edit-fill drawable 0)
(gimp-selection-shrink img lw)
(gimp-edit-fill drawable 1)))

(define (script-fu-balloon bw bh rect np think right revert lw)
(let* (
(orientation 1)
(side 1)
(img (car (gimp-image-new bw bh RGB)))
(balloon (car (gimp-layer-new img bw bh RGBA-IMAGE "Balloon" 100 NORMAL))))

(if (= right FALSE) (set! orientation -1))

(gimp-image-add-layer img balloon 1)
(gimp-display-new img)
(gimp-edit-clear balloon)

(if (= think FALSE) (round-balloon img balloon bw bh rect np orientation revert lw))
(if (= think TRUE) (round-think-balloon img balloon bw bh rect np orientation revert lw))

(gimp-selection-none img)
(gimp-displays-flush)))

(script-fu-register
  "script-fu-balloon"
  "<Image>/Filters/Render/text-Balloon"
  "Creates a balloon like used in comics. - balloon.scm"
  "Michael Spunt"
  "Copyright 2000, Michael Spunt"
  "May 20, 2000"
  ""
  SF-VALUE "Width"      "240"
  SF-VALUE "Height"      "160"
  SF-TOGGLE "Rectangle"      FALSE
  SF-TOGGLE "No pointer"   FALSE
  SF-TOGGLE "Think"      FALSE
  SF-TOGGLE "Right oriented"   FALSE
  SF-TOGGLE "Change side"   FALSE
  SF-VALUE "Line width"      "2"
)



As you can see the TRUE is still there it is the ADD that is gone replaced with size parameters instead.
(if (= rect TRUE) (gimp-round-rect-select img (* bw 0.1) (* bh 0.1) (* bw 0.8) (* bh 0.625) 10 10 0 TRUE FALSE 0 0))

You ninjad me Mahvin :lol

_________________
Image
Edmund Burke nailed it when he said, "The only thing necessary for the triumph of evil is for good men to do nothing."


Top
 Post subject: Re: Two Text Balloon Scripts
PostPosted: Sat May 14, 2011 9:29 pm  (#20) 
Offline
GimpChat Member
User avatar

Joined: Jul 04, 2010
Posts: 2253
Location: Retired Moderator Slowly Returning to the Living.
My computer is being stupid again. I have tried all of the scripts, and none of them even show in the menus.

_________________
Artists aren't crazy! We're eccentric! ~G.M. Ross

Image

My Sigs = My Photos
Check out my work at http://www.flickr.com/photos/photomastergreg.


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

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) New GEGL Glossy Balloon Text styling filter.

23

No new posts Attachment(s) very old scripts

11

No new posts Attachment(s) Elsamuko scripts

16

No new posts Former GIMP Scripts

8

No new posts Attachment(s) Editing scripts

7



* Login  



Powered by phpBB3 © phpBB Group