It is currently Fri Jul 26, 2024 3:14 am


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 18 posts ] 
Author Message
 Post subject: shrinking to the middle
PostPosted: Sat Sep 14, 2013 7:56 pm  (#1) 
Offline
GimpChat Member
User avatar

Joined: Jul 17, 2012
Posts: 2770
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


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: shrinking to the middle
PostPosted: Sat Sep 14, 2013 8:25 pm  (#2) 
Offline
GimpChat Member
User avatar

Joined: Jul 17, 2012
Posts: 2770
thanks, but too difficult

you can do it quite easily on paper with a triangle ruler, so there must be a way to do it digitally


Top
 Post subject: Re: shrinking to the middle
PostPosted: Sat Sep 14, 2013 8:31 pm  (#3) 
Offline
Script Coder
User avatar

Joined: Apr 23, 2010
Posts: 1553
Location: not from Guildford after all
You can try "Filters->Generic->Dilate" (or Erode to shrink blacks), or "Filters->Distorts->Value Propagate". The results may not be what you want aesthetically, though, because it is a purely mathematical operation.

_________________
Any sufficiently primitive technology is indistinguishable from a rock.


Top
 Post subject: Re: shrinking to the middle
PostPosted: Sat Sep 14, 2013 9:34 pm  (#4) 
Offline
GimpChat Member
User avatar

Joined: Jul 17, 2012
Posts: 2770
saulgoode, i tried the Dilate filter before
you are right is not what im really looking for

the Value Propagate was new to me
i was able to do it with Alpha, but its more or less the same as Dilate, isnt it ?

i tried the same with repeated Insets in Inkscape, but thats the same again

it must be possible to write a script that creates a line in the middle of a letter


Top
 Post subject: Re: shrinking to the middle
PostPosted: Sat Sep 14, 2013 10:19 pm  (#5) 
Offline
Script Coder
User avatar

Joined: Feb 18, 2011
Posts: 4827
Location: Bendigo Vic. Australia
I wish I was smart enough to do so, but it would need the skille of Saulgoode, RobA or Ofnuts to write such a script or plugin

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


Top
 Post subject: Re: shrinking to the middle
PostPosted: Sat Sep 14, 2013 10:21 pm  (#6) 
Offline
GimpChat Member
User avatar

Joined: Jan 10, 2013
Posts: 863
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 viewtopic.php?f=23&t=8550&start=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!

_________________
bbbbbbbbbbbImage
bbbbbbbbbbb Be patient, English is not my language.


Top
 Post subject: Re: shrinking to the middle
PostPosted: Sat Sep 14, 2013 10:52 pm  (#7) 
Offline
GimpChat Founder
User avatar

Joined: May 22, 2008
Posts: 5242
Location: Gimpville
Using a script to create an inlay/line via shrinking the selection, would work fine on a subset of solid fonts, where the widths are fairly consistent, but determining "The Middle" on other fonts is subjective and would be practically impossible to script.

Image

_________________
“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: Sat Sep 14, 2013 11:25 pm  (#8) 
Offline
GimpChat Member
User avatar

Joined: Sep 22, 2012
Posts: 2089
Location: US
I'd run into that problem before and it was real PITA.
Actually, comparable results could be achieved with both pixel pushing techniques and paths [inkscape a bit
better than GIMP path tool] but not to the perfection you're seeking. At the end of day the results are always crappy.

The problem with vectors is that many letters [A,B,O,P etc.] are compound paths, defining 'middle of a letter' is a big question.
E.g., capital B is actually a compound path of 3 separate paths. I don't see how script can determine the middle
between the three. How about shrinking the entire text? Big doubts.

I ended up using Xtreme Path plugin for AI. Yet, it's not a kind of plugin that does it all by clicking a
single button. It's a set of path manipulation tools, but makes the task very easy. It's the best way I know of
for this particular task.

P.S. Before Xtreme path plugin I would bevel text in AI and draw the curves over, more precise than drawing by eye
but time consuming.


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

Joined: Jul 17, 2012
Posts: 2770
interesting its so difficult


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

Joined: Aug 30, 2012
Posts: 2174
Interesting thread Esper and I myself have tried and failed to effectively create a single pixel line in the centre of a Letter. For my own purposes I did construct a single path Alphabet but so far it only has capital letters and the number 1 & 2 as that was all I required, maybe I'll try and create a complete set and post in the resources.

_________________
Image


Top
 Post subject: Re: shrinking to the middle
PostPosted: Sun Sep 15, 2013 8:04 am  (#11) 
Offline
GimpChat Member

Joined: Mar 04, 2011
Posts: 2446
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) 
Online
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4759
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) 
Online
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4759
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