[Gimp-user] Re: Placement of pasted selections

2005-12-29 Thread Tristan Miller
Greetings.

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.
4. Paste.
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. :)

Regards,
Tristan

-- 
   _
  _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
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


[Gimp-user] Re: Placement of pasted selections

2005-12-29 Thread Tristan Miller
Greetings.

In article [EMAIL PROTECTED], Sven Neumann wrote:
 (It was previously suggested to me that I copy the entire image and
 paste it as a new layer in the second image, and then copy between
 layers
 instead of between images.  However, this is undesirable due to the
 large
 size of images I'm working with.  It can take over a minute to copy the
 entire image into a new layer; I just want to be able to copy small
 areas of one image into another.)
 
 Are you using a clipboard daemon such as Klipper? It shouldn't take
 that long to create a copy.

No, I'm not using a clipboard daemon.  When you're working with huge images
(24-bit 600 dpi A3 or A4 scans) and don't have the latest and greatest in
hardware, then yes, it certainly can take a long time to create a copy. 
Keep in mind that the method proposed above more than triples the amount
of memory used (100% to create the clipboard copy, plus 133% to create a
new layer with alpha channel, plus who knows how much for the undo
history).  On a system without much RAM this can cause a lot of swapping
and possibly even thrashing.

Regards,
Tristan

-- 
   _
  _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
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


[Gimp-user] Re: Placement of pasted selections

2005-12-29 Thread Tristan Miller
Greetings.

In article [EMAIL PROTECTED], Joao S. O. Bueno
Calligaris wrote:
 I see you had not actually tried it. :-)

Well, I had, but I was making assumptions about the causes of any delays.

 You can also work a python-fu /script-fu script to do a paste
 located stuff - the  way I can think of you will have toi manually
 type in the destination coordinates, but I think it will suit your
 needs for know.
 
 Let me know if you'd need such a script, and tell me if you have
 gimp-python running - as I'd prefere doing it in Python than in
 script-fu.

Sure, I would be grateful for any help in making a script to do this work. 
I don't have gimp-python, but I suppose I could install it.  As I
mentioned in another post, I think the script will be very simple to
write, provided one already knows script-fu (or python-fu):

Assuming 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 (or: pop up a dialog asking the user to
select the destination image).
4. Paste.
5. Move the selection to (x,y).
6. Anchor the selection.

Regards,
Tristan

-- 
   _
  _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
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


[Gimp-user] gimp-python source wanted

2005-12-29 Thread Tristan Miller
Greetings.

I'm looking for the source package for the latest version of gimp-python. 
The official FTP distribution site at
ftp://ftp.daa.com.au/pub/james/pygimp/ is rejecting connections.  If
someone could point me to an FTP or HTTP mirror, that would be great.

Regards,
Tristan

-- 
   _
  _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
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


[Gimp-user] Re: smooth a 2 color image

2005-12-29 Thread Tristan Miller
Greetings.

In article [EMAIL PROTECTED], mickeydog wrote:

 I have an image in 2 colors (bw, no greys).
 How do I smooth the edges while maintaing 2 colors?
 
 For example, suppose the following represents a segment of the image
 (where B = black pixel and W = white pixel)
 
 WWWBW
 WWWBW
 WBBBW
 WWWBW
 WWWBW
 
 i would like the image to be like this:
 
 WWWBW
 WWBBW
 WBBBW
 WWBBW
 WWWBW
 
 (the 3rd pixel in line 2 and the 3rd pixel in line 4 changed from W to
 B, thus smoothing from edge from line 1, pixel 4 to line 3, pixel 2)

Most filters don't operate on 1-bit images.  Would it be feasible for you
to convert your image to grayscale, use a smoothing filter, and then
converting back to 1-bit?

Regards,
Tristan

-- 
   _
  _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
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


[Gimp-user] Placement of pasted selections

2005-12-28 Thread Tristan Miller
Greetings.

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?

(It was previously suggested to me that I copy the entire image and paste
it as a new layer in the second image, and then copy between layers
instead of between images.  However, this is undesirable due to the large
size of images I'm working with.  It can take over a minute to copy the
entire image into a new layer; I just want to be able to copy small areas
of one image into another.)

Regards,
Tristan

-- 
   _
  _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
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user