RSS/Atom feed Twitter
Site is read-only, email is disabled

Sample points

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

5 of 5 messages available
Toggle history

Please log in to manage your subscriptions.

Sample points Ofnuts 08 Mar 11:56
  Sample points Bill Skaggs 08 Mar 13:54
   Sample points Ofnuts 08 Mar 14:10
    Sample points Michael Schumacher 09 Mar 20:50
     Sample points Ofnuts 10 Mar 08:24
Ofnuts
2015-03-08 11:56:55 UTC (over 9 years ago)

Sample points

On 08/03/15 09:42, Kevin Payne wrote:

Is is possible to access the position of the sample points from within a script? I can't find any reference to them in the Procedure browser.

No way AFAIK. Scripts that require image coordinates usually ask the user to draw a path and use the path anchor coordinates.

Bill Skaggs
2015-03-08 13:54:15 UTC (over 9 years ago)

Sample points

It would be straightforward to add that functionality, though. All that would be needed is to add a function gimp_image_get_sample_points_invoker() to app/pdb/image-cmds.c, which would call gimp_image_get_sample_points(), and then glue it to a procedure called gimp-image-get-sample-points. That would be a good exercise for a developer who wants to gain familiarity with the pdb. (It would also be necessary to add documentation, of course.)

Bill

On Sun, Mar 8, 2015 at 6:56 AM, Ofnuts wrote:

On 08/03/15 09:42, Kevin Payne wrote:

Is is possible to access the position of the sample points from within a script? I can't find any reference to them in the Procedure browser.

No way AFAIK. Scripts that require image coordinates usually ask the user to draw a path and use the path anchor coordinates.

_______________________________________________ gimp-developer-list mailing list
List address: gimp-developer-list@gnome.org List membership: https://mail.gnome.org/mailman/listinfo/gimp- developer-list
List archives: https://mail.gnome.org/archives/gimp-developer-list

Ofnuts
2015-03-08 14:10:31 UTC (over 9 years ago)

Sample points

I wondered about that at the time, but the Path technique has several advantages over the sample points:

* you are not limited to 4 points * you can keep points and target layer in synch using the links * you have sub-pixel accuracy

On 08/03/15 14:54, Bill Skaggs wrote:

It would be straightforward to add that functionality, though. All that would be needed is to add a function gimp_image_get_sample_points_invoker() to app/pdb/image-cmds.c, which would call gimp_image_get_sample_points(), and then glue it to a procedure called gimp-image-get-sample-points. That would be a good exercise for a developer who wants to gain familiarity with the pdb. (It would also be necessary to add documentation, of course.)

Bill

On Sun, Mar 8, 2015 at 6:56 AM, Ofnuts wrote:

On 08/03/15 09:42, Kevin Payne wrote:

Is is possible to access the position of the sample points from within a script? I can't find any reference to them in the Procedure browser.

No way AFAIK. Scripts that require image coordinates usually ask the user to draw a path and use the path anchor coordinates.

_

Michael Schumacher
2015-03-09 20:50:13 UTC (over 9 years ago)

Sample points

On 03/08/2015 03:10 PM, Ofnuts wrote:

I wondered about that at the time, but the Path technique has several advantages over the sample points:

* you are not limited to 4 points

You are not limited to 4 sample points.

* you can keep points and target layer in synch using the links

If this is the goal. Keeping them fixed in relation to the image might be a different goal.

* you have sub-pixel accuracy

If this is so desired, then it is an advantage for paths.

Neither paths nor sample points are what you really want it you need markers in an image, though - the numbering would be really nice, fixing them to either the image, a layer, a path would be useful as well.

In that regard, the ingenuity of script writers to use paths for that sort of input plays out as a disadvantage for GIMP, because otherwise someone might have implemented such markers already.

Regards,
Michael
GPG: 96A8 B38A 728A 577D 724D 60E5 F855 53EC B36D 4CDD
Ofnuts
2015-03-10 08:24:38 UTC (over 9 years ago)

Sample points

On 09/03/15 21:50, Michael Schumacher wrote: On 03/08/2015 03:10 PM, Ofnuts wrote:

I wondered about that at the time, but the Path technique has several advantages over the sample points:
* you are not limited to 4 points

You are not limited to 4 sample points.

Well, I stand corrected, you can indeed create more than 4. So you can create more that 4 "markers", but I couldn't find a way to make the "Sample points" dialog show more that the first 4 so you would really have only four "sample" points :)

* you can keep points and target layer in synch using the links

If this is the goal. Keeping them fixed in relation to the image might be a different goal.

* you have sub-pixel accuracy

If this is so desired, then it is an advantage for paths.

Neither paths nor sample points are what you really want it you need markers in an image, though - the numbering would be really nice, fixing them to either the image, a layer, a path would be useful as well.

In that regard, the ingenuity of script writers to use paths for that sort of input plays out as a disadvantage for GIMP, because otherwise someone might have implemented such markers already.

... so we would have sets of points, that can be saved (since creating them can take time), therefore possibly edited, definitely managed ("Markers" dialog), passed as parameters to scripts (PF_MARKERS), or acted upon from the management list ( menu location...). This starts to look a lot like polygonal paths except that you cannot get a selection from them...

Now give me a set of points, with call-backs to a plugin when the points are moved, and that could be a very different story...