[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


Re: [Gimp-user] Re: Placement of pasted selections

2005-12-29 Thread Joao S. O. Bueno Calligaris
On Thursday 29 December 2005 08:37 am, Tristan Miller wrote:
 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.


I see you had not actually tried it. :-)
The GIMP can handle this quite efficiently. First, neither the GIMP 
nor any program I know actually make a memory copy of an object that 
was copied to the clipboard - the clipboard is just given a reference 
to the object.

And when pasting, as far as the tiles are not changed, the same data 
in memory is shared by both images. 

So, all you have to do is paste the new layer, close the original 
image, and then crop the pasted layer. The memory in use will not 
exceed the memory needed to keep both images open at the same time.

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.


JS
--

 Regards,
 Tristan
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Re: Placement of pasted selections

2005-12-29 Thread Vytautas P.
If images are equal size and coordinates are the same, you can do this  
manually, I think. Just remember coordinates from selection. Select area  
in first image, copy it, make selection of the same size and location in  
second one and then paste. And you can make separate layer from that  
pasted part for fine tuneing. I'd do so if I were you :)


On Thu, 29 Dec 2005 12:43:25 +0200, Tristan Miller  
[EMAIL PROTECTED] wrote:

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,

--
Using Opera's revolutionary e-mail client: http://www.opera.com/mail/
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


[Gimp-user] Image Resolution

2005-12-29 Thread Demetrius Jones
Is there way to change the default image resolution in the Gimp for Windows so that I do not get the following message[URL="">
		Yahoo! Shopping 
Find Great Deals on Holiday Gifts at Yahoo! Shopping ___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Image Resolution

2005-12-29 Thread Sven Neumann
Hi,

Demetrius Jones [EMAIL PROTECTED] writes:

Is there way to change the default image resolution in the Gimp for
Windows so that I do not get the following message



[URL=http://imageshack.us][IMG]http://img247.imageshack.us/img247/3944
/gimpmessage7nk.jpg[/IMG][/URL]

You are getting this message because the image file you are opening
has an invalid image resolution. Changing the default resolution is
not going to change that. You better fix the image instead.


Sven
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Image Resolution

2005-12-29 Thread Tom Williams

Sven Neumann wrote:

Hi,

Demetrius Jones [EMAIL PROTECTED] writes:

  

   Is there way to change the default image resolution in the Gimp for
   Windows so that I do not get the following message



   [URL=http://imageshack.us][IMG]http://img247.imageshack.us/img247/3944
   /gimpmessage7nk.jpg[/IMG][/URL]



You are getting this message because the image file you are opening
has an invalid image resolution. Changing the default resolution is
not going to change that. You better fix the image instead.
  

How could he fix the image?

Peace...

Tom
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Image Resolution

2005-12-29 Thread Axel Wernicke


Am 29.12.2005 um 16:50 schrieb Tom Williams:


You are getting this message because the image file you are opening
has an invalid image resolution. Changing the default resolution is
not going to change that. You better fix the image instead.


How could he fix the image?


Hmm, probably by setting correct values for resolution? May be to  
doing a man convert with image magick would point into a direction  
possibly to go.


Greetings, lexA



Peace...

Tom
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user



---
Live is like a chocolate box, you never know what you wanna get...
GPG Signatur auf http://wernicke-online.net/Impressum/ prüfen



PGP.sig
Description: Signierter Teil der Nachricht
___
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


Re: [Gimp-user] Re: Placement of pasted selections

2005-12-29 Thread User1001
There is also a Perl interface for GIMPv2 at

http://search.cpan.org/~sjburges/Gimp-2.2pre1/Gimp.pm

but I have not coded anything to use it so can't offer any insight to
its use.


Tristan Miller wrote:
 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
 

___
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


Re: [Gimp-user] Placement of pasted selections

2005-12-29 Thread Owen
This probably comes up as a new thread as I don't have the original,
this is off the archives

Tristan Miller did write;

 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?

I think this is repeatable


1. Image 1 - Make selection
2. Selection to Path
3. Export Path
4. Go to second Image, make new tranparent layer
5. Import Path
6. Path to Selection
7. Go to image one and cut out selection
8. Go to image 2, paste into transparent layer

That places it in exactly the same spot as in image one


Owen
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Re: gimp-python source wanted

2005-12-29 Thread Manish Singh
On Fri, Dec 30, 2005 at 03:16:18AM +0100, Tristan Miller wrote:
 Greetings.
 
 In article [EMAIL PROTECTED], Manish Singh wrote:
 
  On Fri, Dec 30, 2005 at 12:47:43AM +0100, Tristan Miller wrote:
  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.
  
  It's distributed in the same tarball as the rest of GIMP, since, well,
  before GIMP 2.0.
 
 Hm... one does not get that impressed by Googling for gimp-python and
 reading the first site that comes up
 http://www.jamesh.id.au/software/pygimp/, which purports to be the
 official distribution site.

Given that the page talks about GIMP 1.0 and 1.1 and not anything newer,
you could also have assumed it's a bit dated.

Google doesn't always give the right answer either. Remember that.
 
 I'll try downloading the whole GIMP tarball and seeing if I can build just
 the gimp-python part.  I'm using a SuSE 9.3 system with gimp-2.2.9
 installed via the official RPMs, which don't include gimp-python.  Neither
 can I find any SuSE gimp-python RPM.  (apt-cache search gimp-python and
 related searches come up empty.)

It isn't very straightforward to build things piecemeal like that,
though it is *possible* if you know what you're doing. Better to file a
bug with SuSE and get them to package it.

-Yosh
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Re: gimp-python source wanted

2005-12-29 Thread Joao S. O. Bueno Calligaris
On Friday 30 December 2005 12:16 am, Tristan Miller wrote:
 Greetings.

 In article [EMAIL PROTECTED], Manish Singh wrote:
  On Fri, Dec 30, 2005 at 12:47:43AM +0100, Tristan Miller wrote:
  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.
 
  It's distributed in the same tarball as the rest of GIMP, since,
  well, before GIMP 2.0.

 Hm... one does not get that impressed by Googling for gimp-python
 and reading the first site that comes up
 http://www.jamesh.id.au/software/pygimp/, which purports to be
 the official distribution site.

 I'll try downloading the whole GIMP tarball and seeing if I can
 build just the gimp-python part.  I'm using a SuSE 9.3 system with
 gimp-2.2.9 installed via the official RPMs, which don't include
 gimp-python.  Neither can I find any SuSE gimp-python RPM. 
 (apt-cache search gimp-python and related searches come up
 empty.)


yes..Ther indeed is no way to get a bianry of GIMP-python for SuSE. 
(ijsut spent more time looking for it than it would take me to write 
the script for you. - but I oppened a request for it on SuSE's 
bugzilla).

You have to download the GIMP source, pass the configure script, with 
the --prefix parameter to be the same as in SuSE, and with the 
--enable-python option.

The configure script will spill out some errors due to missing 
packages (most likely py-gtk-devel and so on) Install the packages 
and retry until it finishes fine.

Then, just change to the dir plug-ins/pygimp and type make and make 
install (as root)

Then, it is a matter of pickingone the example scripts, and modify it 
to make the steps you described - just look in the PDB-browser (XTNS 
menu)  for the correct functions to call and its parameters. I will 
write it if I am available later.
 Regards,
 Tristan
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Re: gimp-python source wanted

2005-12-29 Thread Joao S. O. Bueno Calligaris
On Friday 30 December 2005 12:55 am, Manish Singh wrote:
 It isn't very straightforward to build things piecemeal like that,
 though it is *possible* if you know what you're doing. Better to
 file a bug with SuSE and get them to package it.


been there:
https://bugzilla.novell.com/show_bug.cgi?id=141117

but it will take a couple of months at least.

 -Yosh
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


[Gimp-user] Python-fu script for Placement of pasted selections

2005-12-29 Thread Joao S. O. Bueno Calligaris
On Thursday 29 December 2005 08:43 am, Tristan Miller wrote:
 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.


sel_transfer.py
Description: application/python
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user