It is currently Fri Jun 21, 2024 3:32 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 47 posts ]  Go to page 1, 2, 3  Next
Author Message
 Post subject: Words To Circles (scheme script)
PostPosted: Sat Sep 03, 2016 6:02 pm  (#1) 
Online
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3983
Location: Canada
Image
This is not really a new idea.
Since I was a very young age, I have seen text written in Vietnamese for "Happy New Years" and Other words for weddings fit inside circles.
So I thought I'd do a simple script that does this.
Warning: if your radius is too big it'll run out of space to fit inside image and I have experienced color spills not sure why yet.

But here it is, will be available under Images/Script-Fu/Words To Circles...
Attachment:
word_to_circle.scm [8.53 KiB]
Downloaded 553 times
(release #7)

It'll use current foreground color for the text, and you can choose background color to draw circles with.
here are options.
Image

Here's a sample run
Image

of course after it runs you can move layers around to place them however you like maybe downward vertically to create a more asian text feel.
Image
Enjoy.

_________________
TinT


Last edited by trandoductin on Sun Sep 04, 2016 11:14 am, edited 6 times in total.

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: Words To Circles (scheme script)
PostPosted: Sat Sep 03, 2016 6:05 pm  (#2) 
Online
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3983
Location: Canada
another for fun
Image

_________________
TinT


Top
 Post subject: Re: Words To Circles (scheme script)
PostPosted: Sat Sep 03, 2016 6:14 pm  (#3) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13063
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
:coolthup

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Words To Circles (scheme script)
PostPosted: Sat Sep 03, 2016 6:33 pm  (#4) 
Online
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3983
Location: Canada
I made the font size 200 before perspective-ing so that it's smoother previously size 50.
Image

_________________
TinT


Top
 Post subject: Re: Words To Circles (scheme script)
PostPosted: Sat Sep 03, 2016 7:26 pm  (#5) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
Trandoductin a no go on my P.C.,Wallace how did you go?

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: Words To Circles (scheme script)
PostPosted: Sat Sep 03, 2016 8:01 pm  (#6) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13063
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
Graechan wrote:
Trandoductin a no go on my P.C.,Wallace how did you go?

This is what I got and it's not good. :(
Image

Here's another try at it,
still not a go. :(
Image

It should work right out of the box with default settings.
To produce the circle and whatever text is typed in,
no?

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Words To Circles (scheme script)
PostPosted: Sat Sep 03, 2016 8:21 pm  (#7) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
Trandoductin using '(define' to create your variables is not a good practice always do this within your '(let* (' block or else it could clash with other scripts

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: Words To Circles (scheme script)
PostPosted: Sat Sep 03, 2016 8:38 pm  (#8) 
Online
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3983
Location: Canada
i'll change them to let and see if that improves

Edit: Okay done all let now and sets now instead of define.
Edit: Okay I also rounded values so maybe that'll solve the gdouble error that Wallace is seeing.

_________________
TinT


Top
 Post subject: Re: Words To Circles (scheme script)
PostPosted: Sat Sep 03, 2016 9:05 pm  (#9) 
Offline
Administrator
User avatar

Joined: Aug 10, 2012
Posts: 13063
Location: Native to NYC living in Arizona, Gimp 2.8 & 2.10, Win 11 PC.
This time it worked well out of the box. :smiley2
Image

_________________
Image
"A wise man learns more from a foolish question than a fool can learn from a wise answer"
Image


Top
 Post subject: Re: Words To Circles (scheme script)
PostPosted: Sat Sep 03, 2016 9:36 pm  (#10) 
Offline
Global Moderator
User avatar

Joined: Oct 02, 2014
Posts: 4502
Location: Sydney Australia
Oh dear - keeps crashing; details below.
Error message
GIMP Warning
Plug-In 'Words To Circles' left image undo in inconsistent state, closing open undo groups.

Words To Circles Warning
Error while executing script-fu-words-to-circles:

Error: ( : 1) Procedure execution of gimp-item-transform-perspective failed on invalid input arguments: Procedure 'gimp-item-transform-perspective' has been called with value '-1.#IND00' for argument 'y1' (#5, type gdouble). This value is out of range.

Screenshots of Script Details on a 1600 x 1200 canvas

Image

Image outcome

Image

_________________
Image

Respect should be offered freely but hard earned


Top
 Post subject: Re: Words To Circles (scheme script)
PostPosted: Sat Sep 03, 2016 9:45 pm  (#11) 
Online
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3983
Location: Canada
did you try the latest version...i thought rounding would've solved the gdouble problem.

_________________
TinT


Top
 Post subject: Re: Words To Circles (scheme script)
PostPosted: Sat Sep 03, 2016 9:52 pm  (#12) 
Offline
Global Moderator
User avatar

Joined: Oct 02, 2014
Posts: 4502
Location: Sydney Australia
Pretty sure it was the latest version I downloaded - it was only 30 minutes ago.

_________________
Image

Respect should be offered freely but hard earned


Top
 Post subject: Re: Words To Circles (scheme script)
PostPosted: Sat Sep 03, 2016 10:13 pm  (#13) 
Online
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3983
Location: Canada
i was able to reproduce this problem ... looking into it.

_________________
TinT


Top
 Post subject: Re: Words To Circles (scheme script)
PostPosted: Sat Sep 03, 2016 10:28 pm  (#14) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Didnt like my u or n but i like the filter.

Image

_________________
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: Words To Circles (scheme script)
PostPosted: Sat Sep 03, 2016 10:32 pm  (#15) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
To give your script every chance of working from default do some math for the user by adding or changeing
(let*
(
(width (car (gimp-image-width image)))
(height (car (gimp-image-height image)))
(center-x (if (= center-x -1) (/ width 2) center-x))
(center-y (if (= center-y -1) (/ height 2) center-y))
)

SF-ADJUSTMENT "Center X (-1 = Image X Center)" '(-1 -1 2000 1 10 1 0)
SF-ADJUSTMENT "Center Y (-1 = Image Y Center)" '(-1 -1 2000 1 10 1 0)

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: Words To Circles (scheme script)
PostPosted: Sat Sep 03, 2016 10:46 pm  (#16) 
Online
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3983
Location: Canada
Rod wrote:
Didnt like my u or n but i like the filter.

[ Image ]


That's a big problem.... there's something seriously wrong with my script and i don't know why it's doing it.. i am using pythagorean theorem and
getting the text width of the whole word before hand to calculate it to fit into a circle....but for some reason..it's returning x values that are outside of my radius... man...

_________________
TinT


Top
 Post subject: Re: Words To Circles (scheme script)
PostPosted: Sat Sep 03, 2016 10:52 pm  (#17) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
trandoductin wrote:
Rod wrote:
Didnt like my u or n but i like the filter.

[ Image ]


That's a big problem.... there's something seriously wrong with my script and i don't know why it's doing it.. i am using pythagorean theorem and
getting the text width of the whole word before hand to calculate it to fit into a circle....but for some reason..it's returning x values that are outside of my radius... man...

could you send me your changed script in a PM so I can see

_________________
Image
No matter how much you push the envelope, it'll still be stationery.


Top
 Post subject: Re: Words To Circles (scheme script)
PostPosted: Sat Sep 03, 2016 10:56 pm  (#18) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Ahh if i capitalize the word it throws the last letter off the circle. If i dont use a cap for first letter it works.

_________________
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: Words To Circles (scheme script)
PostPosted: Sat Sep 03, 2016 10:58 pm  (#19) 
Online
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3983
Location: Canada
The only thing i can think of is ... create a text layer with the whole word ...gives a different width
then the sum of widths of text layers of single letters.... but i don't know how to solve that right now.

_________________
TinT


Top
 Post subject: Re: Words To Circles (scheme script)
PostPosted: Sat Sep 03, 2016 10:59 pm  (#20) 
Offline
GimpChat Member
User avatar

Joined: May 16, 2010
Posts: 14709
Location: USA
Thats the ticket. You need to use all caps or all small letters in each word or you can use caps at the end or middle of the word. Weird.

_________________
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 new topic Reply to topic  [ 47 posts ]  Go to page 1, 2, 3  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Attachment(s) Falling snow animated Scheme Script for Gimp

121

No new posts Attachment(s) Words to shape

2

No new posts Replacing graphical words in pdf

1

No new posts Spin-art Grid kind'a like Kandinsky's circles but for any image

1

No new posts Attachment(s) Did something change in scheme in 2-10-20[Solved]

5



* Login  



Powered by phpBB3 © phpBB Group