RSS/Atom feed Twitter
Site is read-only, email is disabled

Copy/Paste problem between layers

This discussion is connected to the gimp-developer-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

4 of 4 messages available
Toggle history

Please log in to manage your subscriptions.

Copy/Paste problem between layers Thierry Tracol 09 Aug 17:27
  Copy/Paste problem between layers Simon Budig 09 Aug 20:16
Copy/Paste problem between layers Thierry Tracol 12 Aug 17:40
  Copy/Paste problem between layers Simon Budig 12 Aug 18:26
Thierry Tracol
2002-08-09 17:27:33 UTC (over 21 years ago)

Copy/Paste problem between layers

With Gimp for Windows - version 1.2.3, I do the following operations : 1. Start with a base image
2. Make an elliptical selection (I have also the problem with other kinds of selection).
3. Copy it, clear it.
4. Put the floating selection into a new layer L1 5. In layer L1, go to step 2 throw step 4 and create layer L2 6. ....

This way, layers L1,L2, L3, L4, ... are created.

In theory, the base image should be split into the different layers. With all the eye icons on, we should see the original base image. In practice, there is a gap appearing in the position of the pasted selections.
This gap appears sometimes at the level layer L4, sometimes L5 or L6.

Thanks for any support.

Simon Budig
2002-08-09 20:16:29 UTC (over 21 years ago)

Copy/Paste problem between layers

Thierry Tracol (thierry.tracol@thales-tts.com) wrote:

With Gimp for Windows - version 1.2.3, I do the following operations : 1. Start with a base image
2. Make an elliptical selection (I have also the problem with other kinds of selection).
3. Copy it, clear it.
4. Put the floating selection into a new layer L1 5. In layer L1, go to step 2 throw step 4 and create layer L2 6. ....

Although I have problems to follow your steps (after step 3 there is no floating selection) I guess I know what your problem is: It is inherent to the way most image manipulation programs handle layers and not a bug in the GIMP.

In theory, the base image should be split into the different layers. With all the eye icons on, we should see the original base image.

Nope, this is not true and ignores, that there is the concept of partially selected pixels - where "partially" means a percentage and not a specific part of a pixel.

The problem is the same as in the following procedure:

1) Create new (white) image and select an (antialiased) ellipse 2) fill the ellipse with black
3) fill the ellipse with white.

Step 3 is the opposite of step 2 - so the image should be completely white. But if you disable the selection you see that there is a faint gray border around the former ellipse. The reason for this is, that some of the pixels at the border have been partially selected.

Lets look at a pixel that is selected 50%.

In step 1 it is white. After filling it with black it is 50% black (since it was not fully selected). Now we fill it with white again: it becomes 25% black ((1 - 0.5) * original color + 0.5 * new color). So we have a slight gray pixel there and it is perfectly reasonable...

The same can happen when you place two partially transparent pixels on top of each other in two layers: 50% opacity in the first and 50% opacity in the second layer does not sum up to 100% opacity, it is around 75% opacity (the math is basically the same). So if you cut out an ellipse and place it in a second layer on the very same place you will get a slightly transparent border around the ellipse.

There is no way to fix this except filling the area in the lower layer with a background color.

Hope this helps.

Bye, Simon

Thierry Tracol
2002-08-12 17:40:45 UTC (over 21 years ago)

Copy/Paste problem between layers

Date: Fri, 9 Aug 2002 20:16:29 +0200 From: Simon Budig
To: gimp-developer@lists.xcf.berkeley.edu Subject: Re: [Gimp-developer] Copy/Paste problem between layers

Thierry Tracol (thierry.tracol@thales-tts.com) wrote:

With Gimp for Windows - version 1.2.3, I do the following operations : 1. Start with a base image
2. Make an elliptical selection (I have also the problem with other kinds of selection).
3. Copy it, clear it.
4. Put the floating selection into a new layer L1 5. In layer L1, go to step 2 throw step 4 and create layer L2 6. ....

Although I have problems to follow your steps (after step 3 there is no floating selection) I guess I know what your problem is: It is inherent to the way most image manipulation programs handle layers and not a bug in the GIMP.

To be more precise, step 4 should be : "Paste (ctrl-v), rename the floating selection L1"

In theory, the base image should be split into the different layers. With all the eye icons on, we should see the original base image.

Nope, this is not true and ignores, that there is the concept of partially selected pixels - where "partially" means a percentage and not a specific part of a pixel.

The problem is the same as in the following procedure:

1) Create new (white) image and select an (antialiased) ellipse 2) fill the ellipse with black
3) fill the ellipse with white.

Step 3 is the opposite of step 2 - so the image should be completely white. But if you disable the selection you see that there is a faint gray border around the former ellipse. The reason for this is, that some of the pixels at the border have been partially selected.

Lets look at a pixel that is selected 50%.

In step 1 it is white. After filling it with black it is 50% black (since it was not fully selected). Now we fill it with white again: it becomes 25% black ((1 - 0.5) * original color + 0.5 * new color). So we have a slight gray pixel there and it is perfectly reasonable...

I have tried your procedure. It works well if you remove the antialiasing option with the elliptical selection tool. The problem I have described still happens with no antialiasing selected. The gap which appears between layers positions can be much more than one pixel.

In fact, it is not a problem specific to Gimp, since the same manipulation with Photoshop gives the same kind of problems.

The same can happen when you place two partially transparent pixels on top of each other in two layers: 50% opacity in the first and 50% opacity in the second layer does not sum up to 100% opacity, it is around 75% opacity (the math is basically the same). So if you cut out an ellipse and place it in a second layer on the very same place you will get a slightly transparent border around the ellipse.

There is no way to fix this except filling the area in the lower layer with a background color.

Hope this helps.

Bye,
Simon
--
Simon.Budig@unix-ag.org http://www.home.unix-ag.org/simon/

--__--__--

Simon Budig
2002-08-12 18:26:18 UTC (over 21 years ago)

Copy/Paste problem between layers

Thierry Tracol (thierry.tracol@thales-tts.com) wrote:

I have tried your procedure. It works well if you remove the antialiasing option with the elliptical selection tool. The problem I have described still happens with no antialiasing selected. The gap which appears between layers positions can be much more than one pixel.

Hmm - *maybe* you are bitten by another problem: The paste operation is not guaranteed to be at the same place where the cut happened. This is sometimes a bit surprising and there is already a bug filed against this.

If this isn't it, I have no idea what's happening. Maybe you could create an image where this error occured and put it somewhere online.

Bye, Simon