tags:

views:

557

answers:

2

Is it possible to copy guide lines from one image to another?
I need this because I have several images that need exactly the same composition, so I want to use the guide lines for this.
There's no option to select & copy a guide line, so I must add them manually.

It would be nice, if there's a little script-fu script.

Okay, there are some interesting functions I found:

(gimp-image-find-next-guide image index)
(gimp_image_add_hguide image xposition)
(gimp_image_add_vguide image yposition)
(gimp_image_get_guide_orientation image guide)
(gimp_image_get_guide_position image guide)

Thanks in advance!

+3  A: 

I'd really like to help you but I'm not sure I understand what you are trying to do. Could you edit the question to provide more details?

At a guess (pending more information) are you looking for something like this?

guide = 0
while guide = gimp_image_find_next_guide (image_1,guide) != 0
     position = gimp_image_get_guide_position (image_1,guide)
     if gimp_image_get_guide_orientation (image_1,guide) == 0
          gimp_image_add_hguide (image_2,position)
        else
          gimp_image_add_vguide (image_2,position)

Note that this is pseudo-code, since the functions you mentioned seem to be part of an API that is using a syntax other than scheme-ish script fu.

But the first question is what are you trying to accomplish? -- after that we can worry about the details of how.

MarkusQ
Could you please reanswer this question with _exactly_ this answer? I cannot accept your answer as the right answer. I want to finish this question and give you the right rep.
furtelwart
Done, but I"m not sure I understand why.
MarkusQ
The bounty has run out without an accepted answer. So I cannot accept ANY answer as the correct one, even if your answer is the right one. I thought that if a new answer was posted I would be able to accept this new one. This was wrong, I contacted the SO-Team. Thanks a lot for your help!
furtelwart
No problem, hope it worked out for you. And thanks for following up regarding the scoring. Should I delete the duplicate answer?
MarkusQ
+1  A: 

I'd really like to help you but I'm not sure I understand what you are trying to do. Could you edit the question to provide more details?

At a guess (pending more information) are you looking for something like this?

guide = 0
while guide = gimp_image_find_next_guide (image_1,guide) != 0
     position = gimp_image_get_guide_position (image_1,guide)
     if gimp_image_get_guide_orientation (image_1,guide) == 0
          gimp_image_add_hguide (image_2,position)
        else
          gimp_image_add_vguide (image_2,position)

Note that this is pseudo-code, since the functions you mentioned seem to be part of an API that is using a syntax other than scheme-ish script fu.

But the first question is what are you trying to accomplish? -- after that we can worry about the details of how.

MarkusQ