It is currently Thu Nov 12, 2026 11:55 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2
Author Message
 Post subject: Re: Find x,y coord of darkest and lightest spots in image
PostPosted: Sun Aug 16, 2015 10:13 pm  (#21) 
Offline
GimpChat Member
User avatar

Joined: Aug 13, 2015
Posts: 312
Location: Somewhere between lost and found.
Having spent a few days perusing these forums I realize that what I am about to say is nothing new.

ofnuts, :yes YOUR ARE A GENIUS! :bigthup

I was totally unaware that it was possible to select individual paths (strokes) from a path. In fact this whole vectors thing is new to me!

A 16 x 16 selection would have a perimeter of 64, so assuming an irregular shape, using a perimeter of around 40 should be perfect!

On a side note (because I am going to use something like this script thank you ever so much) is the same type of extraction possible with selections attained via select by color? (If possible no exemplar code is needed, but a point to the procedure would be nice... ;) )

Also, your python-fu shows you know the python bindings way better than I do. Do you perhaps know of a thorough set of documentation for the classes and members (public API stuff)?

_________________
The answer was 42. The question is long forgotten. The computer that solved it is now destroyed.
The MK-2 has been built. Should this be the next question?
(Solve if you can ... ;) )
Image


Top
 Post subject: Re: [Solved] Help get x,y coord of select (or sub-select based on size
PostPosted: Mon Aug 17, 2015 3:37 am  (#22) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4812
Quote:
On a side note (because I am going to use something like this script thank you ever so much) is the same type of extraction possible with selections attained via select by color? (If possible no exemplar code is needed, but a point to the procedure would be nice... ;) )


The origin of the path is completely irrelevant to the script...

Quote:
Also, your python-fu shows you know the python bindings way better than I do. Do you perhaps know of a thorough set of documentation for the classes and members (public API stuff)?


Just experimenting with the Python-fu console. Use type(object) and dir(object) to list attributes/methods, these are mostly a rather thin layer over PDB functions (same parameters(*), except the object itself of course).

(*) with the usual difference that in Python you use the objects directly instead of their IDs (there are a couple of exceptions to this).

My path-related scripts, with a short write-up on Paths:

http://gimp-path-tools.sourceforge.net/

_________________
Image


Top
 Post subject: Re: [Solved] Help get x,y coord of select (or sub-select based on size
PostPosted: Mon Aug 17, 2015 11:46 pm  (#23) 
Offline
GimpChat Member
User avatar

Joined: Aug 13, 2015
Posts: 312
Location: Somewhere between lost and found.
ofnuts wrote:
Quote:
On a side note (because I am going to use something like this script thank you ever so much) is the same type of extraction possible with selections attained via select by color? (If possible no exemplar code is needed, but a point to the procedure would be nice... ;) )


The origin of the path is completely irrelevant to the script...


:gaah Dooh... Of course, apply the same technique... Although I was referring to using the selection object directly as in :
for select in fullSelection.selections:

But since it can be done via the paths, it really isn't needed. I just wondered if I had overlooked something obvious (again)

_________________
The answer was 42. The question is long forgotten. The computer that solved it is now destroyed.
The MK-2 has been built. Should this be the next question?
(Solve if you can ... ;) )
Image


Top
Post new topic Reply to topic  [ 23 posts ]  Go to page Previous  1, 2

All times are UTC - 5 hours [ DST ]



* Login  



Powered by phpBB3 © phpBB Group