It is currently Mon Apr 15, 2024 7:47 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 18 posts ] 
Author Message
 Post subject: Re: shrinking to the middle
PostPosted: Sun Sep 15, 2013 8:04 am  (#11) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2418
So far, Gimp has beaten me.

I can get this by generating a path from the text using autotrace, importing back into Gimp and stroking the path.

Image

Not exactly what was asked for but interesting.

autotrace -color-count 2  -centerline -corner-threshold 90 -output-format svg -output-file out.svg -report-progress sometext.bmp


Dare say one of the clever people, saulgoode, ofnuts might come up with something

_________________
Image


Top
 Post subject: Re: shrinking to the middle
PostPosted: Sun Sep 15, 2013 8:31 am  (#12) 
Offline
GimpChat Member
User avatar

Joined: Feb 17, 2011
Posts: 225
If you know how Conway's Life works, it can do it. It checks for each cell/pixel how "deep" inside in (mass of similar cells) it is, and either dies or continues.

I could write that in C or C++ but I have no clue how to do Gimp plugins, so... Anyone?

Search words: Conway, Game of Life, cellular automata


Top
 Post subject: Re: shrinking to the middle
PostPosted: Sun Sep 15, 2013 11:51 am  (#13) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4734
Esper wrote:
is there a technique or a script that shrinks an object or a letter to a very thin remainder ?

like in this font (Intro)

[ Image ]

it obviously doesnt work with normal shrinking of a selection

I went that route i the past... What you are looking for are "engraving" fonts, with single open strokes... But 2.8 completely broke the support for them (making them work in 2.6 required some hacking already).

The problem is that what you want is not a "remainder", it"s more accurately some "median line", for some definition of "median line" that can lead to a mathematical computation from the outline.

_________________
Image


Top
 Post subject: Re: shrinking to the middle
PostPosted: Sun Sep 15, 2013 8:15 pm  (#14) 
Offline
GimpChat Member
User avatar

Joined: Jul 17, 2012
Posts: 2770
ofnuts wrote:
The problem is that what you want is not a "remainder", it"s more accurately some "median line", for some definition of "median line" that can lead to a mathematical computation from the outline.

thanks ofnuts !

this median, its not the same as this, is it ?
http://dossy.org/2007/08/what-is-gimps- ... an-filter/


Last edited by Esper on Sun Sep 15, 2013 10:53 pm, edited 2 times in total.

Top
 Post subject: Re: shrinking to the middle
PostPosted: Sun Sep 15, 2013 10:38 pm  (#15) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5242
Location: Gimpville
rich2005 wrote:
I can get this by generating a path from the text using autotrace, importing back into Gimp and stroking the path.

That's not a bad result, actually. The font example I posted gave me these results.

Image

The main problem is that It created lots of branches. If I were to manually draw a center line, I think my brain would automatically toss the branches and I would attempt to make a single smooth connected line inside the font. I think that is were automation is going to fail because it's kinda subjective. Strictly speaking though, the results from creating a center line path from tracing isn't bad and certainly, this kind of thing could be done in GIMP.

As far as shrinking the selection to create an inlay, the Logo Toolbox script can do that with no problem. That technique only works on certain letters of certain fonts, because of course, the selection width varies with the font width.

Image

Image
I wondering what the results might be if a script were to continue to shrink the selection until you had only x number of pixels, always keeping x number of pixels at any point along the way.

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: shrinking to the middle
PostPosted: Sun Sep 15, 2013 10:42 pm  (#16) 
Offline
GimpChat Member
User avatar

Joined: Jul 17, 2012
Posts: 2770
GnuTux wrote:
I wondering what the results might be if a script were to continue to shrink the selection until you had only x number of pixels, always keeping x number of pixels at any point along the way.

that sounds perfect


Top
 Post subject: Re: shrinking to the middle
PostPosted: Sun Sep 15, 2013 10:51 pm  (#17) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5242
Location: Gimpville
I think that is easier said than done, Esper. :hehe

_________________
“If you reach for the stars, you just might land on a decently sized hill.” - Stuart Hill


Top
 Post subject: Re: shrinking to the middle
PostPosted: Mon Sep 16, 2013 2:17 am  (#18) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4734
Akros wrote:
Esper wrote:
is there a technique or a script that shrinks an object or a letter to a very thin remainder ?

like in this font (Intro)

[ Image ]

it obviously doesnt work with normal shrinking of a selection

Well .. my results in http://gimpchat.com/viewtopic.php?f=23& ... =0#p110549 , I simply used skrink selection, and created a similar result as of the font Intro.
But a method with better results would be welcome!

You method works OK because the letters have a rather constant thickness...

_________________
Image


Top
Post new topic Reply to topic  [ 18 posts ] 

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group