In article <[EMAIL PROTECTED]>, David Herman wrote:
>> Say I have two images of the same size (9952×7016) open. I
>> select an arbitrary region from the first image and Edit->Copy
>> it. Then I switch to the second image and Edit->Paste.
>> Unfortunately, GIMP seems to put the selection wherever it wants;
>> I would rather it appear in the exact same place as in the
>> original image. Since the images are so big, it's difficult for
>> me to drag the selection with the mouse to the exact spot it
>> should appear. Is there some way I can modify GIMP's default
>> selection placement behaviour?
> Use one of your selection tools to select the desired portion of
> your image
> go to the menu, Script-Fu -> Selection -> To Brush
> follow the directions in the dialog (give the brush a name and a
> file name) and spacing info if needed.
> Press ok and wait while your brushes are updated. Then you can use
> your selection as a brush wherever you desire.
This saves some time and memory, but then you still have the problem of
having to manually place the brush (i.e., copied selection) in the new
image at the right place. The images I'm working with are too large for
me to do this accurately.
It occurs to me, however, that if one assumes that the selection is
rectangular, then there must be a way to use a script-fu program to do
this copy/paste automatically. It would need only implement the following
algorithm, which assumes there are two images open and a selection is
active in the active window:
1. Store the top left coordinates (x,y) of the selection.
2. Copy the selection.
3. Switch to the second image.
5. Move the selection to (x,y).
6. Anchor the selection.
The only trouble is, since I don't know Scheme and don't know the script-fu
Gimp API, writing this six-line program will probably take me a few hours
of research. I will eventually end up doing this unless someone here can
come up with a better solution, or perhaps generously offer to write the
script for me. :)
_V.-o Tristan Miller [en,(fr,de,ia)] >< Space is limited
/ |`-' -=-=-=-=-=-=-=-=-=-=-=-=-=-=-= <> In a haiku, so it's hard
(7_\\ http://www.nothingisreal.com/ >< To finish what you
Gimp-user mailing list