[Gimp-developer] copy-paste: position shift with alpha images

2002-10-30 Thread Martin Bernreuther
Hello,

I just wantet to copy a rectangle area from a source-layer to a target layer
of an image. That's what I done first:

(gimp-rect-select image 0 0 layer-width height REPLACE FALSE 0)
(gimp-edit-copy source-layer)
(let ((floating-sel (car (gimp-edit-paste target-layer FALSE 
(gimp-floating-sel-anchor floating-sel))

This works for a lot of cases BUT if I have an image showing a figure on
a transparent background (with alpha channel), something strange happens:
The position of the figure on the target-layer is shifted
(an the only the figure itself is selected)
It only works if the bounding box of the visible parts equal the selection.
I got the same results using the GUI (also with select-all).

How can I avoid this?

Is there a faster way to transfer the layer contents to another layer,
avoiding the intermediate step of the buffer?

Thanks
Martin
-- 
__
Martin Bernreuther  [EMAIL PROTECTED]

___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer



[Gimp-developer] script-fu-scheme: Full implementation of Scheme?

2002-10-30 Thread Martin Bernreuther
Hello,

the tutorials I found cover a small portion of the Scheme language.
Often there's not even a conditional call (if) or loop like (while) explained
(but they are nice introductions!).

At
http://www.swiss.ai.mit.edu/projects/scheme/documentation/scheme.html
there's a reference manual, but I didn't manage to get some functions... to 
work. How about e.g. the (do) statement or
(floor -4.3)
(round -4.3)at scheme_5.html#SEC56
..? It didn't work at the GIMP 1.2.3 script-fu console

Is there a reference manual of the script-fu implemented Scheme?

Thanks
Martin
-- 
__
Martin Bernreuther  [EMAIL PROTECTED]

___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer



Re: [Gimp-developer] script-fu-scheme: Full implementation of Scheme?

2002-10-30 Thread Nathan Carl Summers
On Wed, 30 Oct 2002, Martin Bernreuther wrote:

 At http://www.swiss.ai.mit.edu/projects/scheme/documentation/scheme.html
 there's a reference manual, but I didn't manage to get some functions...
 to work. How about e.g. the (do) statement or
 (floor -4.3)
 (round -4.3)  at scheme_5.html#SEC56
 ..? It didn't work at the GIMP 1.2.3 script-fu console

 Is there a reference manual of the script-fu implemented Scheme?

Gimp currently uses SIOD, which is a nonstandard implementation of Scheme
with some of the standard Scheme functions, some functions imported from
C, and some just plain strange stuff (what is the MD5 calculator doing in
a lightweight scheme implementation?).  A hodgepodge of stuff, really.
Then, of course, there is the gimp extensions to it, which are rather
strange in of themselves...

Anyway, the definative reference for SIOD is now
http://people.delphiforums.com/gjc/siod.html (it took some poking around
to find that site -- most people refer to an older document at
indiana.edu)

Rockwalrus

___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer



Re: [Gimp-developer] script-fu-scheme: Full implementation of Scheme?

2002-10-30 Thread Kevin Myers
However, not all of SIOD is implemented in the GIMP.  Specifically, all of
the stuff that requires a platform specific implementation is missing.
These functions were marked with a U in the old Indiana doc.  I don't know
if that's true on the newer site referenced below.

s/KAM


- Original Message -
From: Nathan Carl Summers [EMAIL PROTECTED]
To: Martin Bernreuther [EMAIL PROTECTED]
Cc: [EMAIL PROTECTED]
Sent: Wednesday, October 30, 2002 4:32 PM
Subject: Re: [Gimp-developer] script-fu-scheme: Full implementation of
Scheme?


 On Wed, 30 Oct 2002, Martin Bernreuther wrote:

  At http://www.swiss.ai.mit.edu/projects/scheme/documentation/scheme.html
  there's a reference manual, but I didn't manage to get some functions...
  to work. How about e.g. the (do) statement or
  (floor -4.3)
  (round -4.3) at scheme_5.html#SEC56
  ..? It didn't work at the GIMP 1.2.3 script-fu console
 
  Is there a reference manual of the script-fu implemented Scheme?

 Gimp currently uses SIOD, which is a nonstandard implementation of Scheme
 with some of the standard Scheme functions, some functions imported from
 C, and some just plain strange stuff (what is the MD5 calculator doing in
 a lightweight scheme implementation?).  A hodgepodge of stuff, really.
 Then, of course, there is the gimp extensions to it, which are rather
 strange in of themselves...

 Anyway, the definative reference for SIOD is now
 http://people.delphiforums.com/gjc/siod.html (it took some poking around
 to find that site -- most people refer to an older document at
 indiana.edu)

 Rockwalrus

 ___
 Gimp-developer mailing list
 [EMAIL PROTECTED]
 http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer

___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer



Re: [Gimp-developer] script-fu-scheme: Full implementation of Scheme?

2002-10-30 Thread Nathan Carl Summers


On Wed, 30 Oct 2002, Kevin Myers wrote:

 However, not all of SIOD is implemented in the GIMP.  Specifically, all of
 the stuff that requires a platform specific implementation is missing.
 These functions were marked with a U in the old Indiana doc.  I don't know
 if that's true on the newer site referenced below.

The big U is in the new doc as well.  It's not completely reliable, though
-- a few of the big U's are in script-fu, and a few of the functions not
marked with a U as missing as well.  datlength and datref are the only
ones I can remember that aren't marked with a U and aren't present.
(Which is annoying, since datref can be useful for parasites.)

Rockwalrus

___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer



Re: [Gimp-developer] copy-paste: position shift with alpha images

2002-10-30 Thread Jeff Trefftzs
Hi Martin -

First, your questions would be better directed to the gimp-user (instead of 
gimp-developer) list.  And I can also recommend the script-fu group on yahoo.

To answer your question: you can avoid creating the intermediate variable by 
doing
(gimp-floating-sel-anchor 
  (car (gimp-edit-paste target-layer FALSE)))

To ensure that your selection winds up in the same place in the new layer, try 
(if you can)
making sure that the layer from which you get your selection is the same size 
as the image, using (perl-fu-layer-to-image-size 1) .  This works on the 
active layer only, and may not work on windows systems lacking perl-fu support.

HTH,

-- 
--Jeff

Jeff Trefftzs [EMAIL PROTECTED]
http://www.tcsn.net/trefftzsHome Page
http://gug.sunsite.dk/gallery.php?artist=68 Gimp Gallery
http://trefftzs.topcities.com/  Photo Gallery 



___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer



Re: [Gimp-developer] script-fu-scheme: Full implementation of Scheme?

2002-10-30 Thread Jeff Trefftzs
I've posted the siod documentation that I use on my website at

http://trefftzs.topcities.com/siod.html

It also shows functions that are not available in the Gimp, but fewer than 
your source. I seem to remember that I had to roll my own floor, ceil, and 
round functions.

Good luck.

-- 
--Jeff

Jeff Trefftzs [EMAIL PROTECTED]
http://www.tcsn.net/trefftzsHome Page
http://gug.sunsite.dk/gallery.php?artist=68 Gimp Gallery
http://trefftzs.topcities.com/  Photo Gallery 



___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer



[Gimp-developer] how does undo currently work

2002-10-30 Thread Hunter Peress
Suppose 100 actions are done to an image of size T
Would gimp's memory increase by 100T ?

Or is there some intelligence done for the undoing?





___
Gimp-developer mailing list
[EMAIL PROTECTED]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer