Post Reply 

Layer1 RGB + layer2 alpha?

Feb 7, 2014, 05:17
Post: #1
Layer1 RGB + layer2 alpha?
Topic. I've managed to get images the way I want them. Layer1 is strictly the RGB component with no alpha channel. Layer2 is the alpha channel only which was made with GIMP's ColorToAlpha function. This changed layer2's RGB to black. Now I want to combine them and end up with an image that has the RGB of layer1 and the Alpha of layer2.

Unfortunately, since layer2 is not actually alpha-only and has a black image for the RGB, obviously this results in the RGB of the merged result to be a combination of layer1's RGB and black, which means it's darker than what it started as.

What I seem to be missing is the method for making channels invisible on a per-layer basis. If this is an option, it's well-hidden, and if it's not, then I really don't get why not. But either way, I'm after a solution to this conundrum.

Thanks in advance!
Find all posts by this user
Quote this message in a reply
Feb 7, 2014, 05:48
Post: #2
RE: Layer1 RGB + layer2 alpha?
I'm not quite sure what you are trying to achieve, but I don't believe your use of the 'Color to Alpha' function is what you are after as it just makes a layers pixels transparent that match the chosen color. See documentation here.
Perhaps the Channels dialog is what you are after. See documentation here.
Find all posts by this user
Quote this message in a reply
Feb 7, 2014, 06:04
Post: #3
RE: Layer1 RGB + layer2 alpha?
I figured a diagram might be in order. Here's what I currently get if I merge my layers:

Layer1: . . . . Layer2: . . . . . . . Result:
R . . . . . . . . . (black) . . . . . . . R (too dark)
G . . . . . . . . . (black) . . . . . . . G (too dark)
B . . . . . . . . . (black) . . . . . . . B (too dark)
n/a . . . . . . . . A . . . . . . . . . . . .A (same as layer2)

And here is what I'm actually trying to get:

Layer1: . . . . Layer2: . . . . . . . Result:
R . . . . . . . . . (ignore) . . . . . . R (same as layer1)
G . . . . . . . . . (ignore) . . . . . . G (same as layer1)
B . . . . . . . . . (ignore) . . . . . . B (same as layer1)
n/a . . . . .. . . A . . . . . . . . . . . .A (same as layer2)

Pretty much that.
Find all posts by this user
Quote this message in a reply
Feb 7, 2014, 07:26
Post: #4
RE: Layer1 RGB + layer2 alpha?
Incidentally, the closest solution I've been able to find with Googling is to: Paste the alpha-only image in as a mask layer for the RGB-only image, and then apply the layer. Unfortunately, since this isn't precisely the process I am after, the results are a bit off. For example, a given spot in the original image with an alpha of 118 ends up shifted to 137 (and the entire alpha channel image is shifted accordingly). I couldn't even guess where GIMP is getting this shift from, but it's definitely applying it.
Find all posts by this user
Quote this message in a reply
Feb 7, 2014, 08:54
Post: #5
RE: Layer1 RGB + layer2 alpha?
Dad did the trick, thanks!

Still reckon I'd have saved the last 7 hours if Gimp let folks make channels invisible on a per-layer basis. ;p
Find all posts by this user
Quote this message in a reply
Feb 7, 2014, 10:03
Post: #6
RE: Layer1 RGB + layer2 alpha?
Well, the situation I had required heavy use of the clone tool. GIMP unfortunately gives you two choices when it comes to RGB+A: You either let the app _accumulate_ transparency with each swipe, or you don't use the clone tool on RGB+A. No option to simply _clone_ the transparency value just like it's cloning the R G and B values. Therefore I was pretty much forced to split my image into an RGB image and an Alpha image, perform my edits twice, and then recombine the results.

Anyway, couldn't have ultimately gotten it done without your help.
Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Scaling layer does not scale alpha! WallyZ 1 167 Apr 3, 2018 06:22
Last Post: blighty
  remove alpha channel on export? peekofartertainment 1 417 Jul 22, 2017 08:08
Last Post: ythgilb
  Color to alpha really weird Sagemode 13 1,167 Sep 16, 2014 05:49
Last Post: Sagemode
  Alpha channel from inverted selection WhyDoIHaveToCreateAnAccount 3 463 Aug 31, 2014 19:12
Last Post: WhyDoIHaveToCreateAnAccount
  Alpha channel? Diriel 9 802 Aug 13, 2014 19:51
Last Post: iForStyle007

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS