Re: [Gimp-user] Need a script to output position of images within image.

2012-05-31 Thread Kevin Cozens

On 12-05-30 08:44 PM, stephen wrote:

I created a jigsaw puzzle from an image.  All the pieces exist in
different layer.

Is there a way to get the position of the pieces (a script or a menu
command)?


I'm not sure anything exists to do that but you could write a script. If you 
autocrop each layer you could then get the layer offset for each piece (ie. 
layer).


--
Cheers!

Kevin.

http://www.ve3syb.ca/   |Nerds make the shiny things that distract
Owner of Elecraft K2 #2172  | the mouth-breathers, and that's why we're
| powerful!
#include disclaimer/favourite | --Chris Hardwick
___
gimp-user-list mailing list
gimp-user-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-user-list


[Gimp-user] Need a script to output position of images within image.

2012-05-30 Thread stephen
Hello,

I created a jigsaw puzzle from an image.  All the pieces exist in different 
layer.  

Is there a way to get the position of the pieces (a script or a menu command)?  
I realize I could use the ruler, however, I would like something that would be 
more exact and less tedious.

Thanks,
Stephen


-- 
stephen (via gimpusers.com)
___
gimp-user-list mailing list
gimp-user-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-user-list


Re: [Gimp-user] Need a script to output position of images within image.

2012-05-30 Thread Chris Mohler
On Wed, May 30, 2012 at 7:44 PM, stephen for...@gimpusers.com wrote:
 I created a jigsaw puzzle from an image.  All the pieces exist in different 
 layer.

 Is there a way to get the position of the pieces (a script or a menu 
 command)?  I realize I could use the ruler, however, I would like something 
 that would be more exact and less tedious.

With only one image open, from the python-fu console:

img = gimp.image_list()[0]

for layer in img.layers:
print layer.name, layer.offsets

Chris
___
gimp-user-list mailing list
gimp-user-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-user-list


Re: [Gimp-user] Need a script to output position of images within image.

2012-05-30 Thread Chris Mohler
On Wed, May 30, 2012 at 7:58 PM, Chris Mohler cr33...@gmail.com wrote:
 I created a jigsaw puzzle from an image.  All the pieces exist in different 
 layer.

 Is there a way to get the position of the pieces (a script or a menu 
 command)?  I realize I could use the ruler, however, I would like something 
 that would be more exact and less tedious.

 With only one image open, from the python-fu console:

 img = gimp.image_list()[0]

 for layer in img.layers:
    print layer.name, layer.offsets

I was curious to see how the forum has hooking to the mailing list
these days, and I'm sad to report that it munged the spacing on that
psuedo-code.  You'd be better off subscribing to the mailing list
directly.  Anyway, it should be like:

img = gimp.image_list()[0]

for layer in img.layers:
INDENTprint layer.name, layer.offsets

Where INDENT means indent via Tab key or spaces.

Chris
___
gimp-user-list mailing list
gimp-user-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-user-list


Re: [Gimp-user] Need a script to output position of images within image.

2012-05-30 Thread Chris Mohler
Well, I give up.  The forum ate that too.

Chris
___
gimp-user-list mailing list
gimp-user-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-user-list


[Gimp-user] Need a script to output position of images within image.

2012-05-30 Thread stephen
On Wed, May 30, 2012 at 7:44 PM, stephen for...@gimpusers.com wrote:
 I created a jigsaw puzzle from an image.  All the pieces exist in different 
 layer.

 Is there a way to get the position of the pieces (a script or a menu 
 command)?  I realize I could use the ruler, however, I would like something 
 that would be more exact and less tedious.

With only one image open, from the python-fu console:

img = gimp.image_list()[0]

for layer in img.layers:
print layer.name, layer.offsets

Chris

Fantastic!  that works.

Where is a good place to learn more about the functions that are accessible 
through scripts?

Stephen



-- 
stephen (via gimpusers.com)
___
gimp-user-list mailing list
gimp-user-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-user-list


[Gimp-user] Need a script to output position of images within image.

2012-05-30 Thread stephen
On Wed, May 30, 2012 at 8:08 PM, stephen for...@gimpusers.com wrote:
 Where is a good place to learn more about the functions that are accessible 
 through scripts?

Check Help-Procedure Browser

Chris

Thanks, I'll do that.

-- 
stephen (via gimpusers.com)
___
gimp-user-list mailing list
gimp-user-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-user-list


Re: [Gimp-user] Need a script to output position of images within image.

2012-05-30 Thread Chris Mohler
On Wed, May 30, 2012 at 8:11 PM, stephen for...@gimpusers.com wrote:
 Thanks, I'll do that.

Also you can do stuff like this in the console:

dir(gimp)

img = gimp.image_list()[0]
dir(img)

etc.

Chris
___
gimp-user-list mailing list
gimp-user-list@gnome.org
https://mail.gnome.org/mailman/listinfo/gimp-user-list