112 lines
10 KiB
Plaintext
112 lines
10 KiB
Plaintext
|
|
Episode: 3400
|
||
|
|
Title: HPR3400: Normal Layer Modes: Normal, Dissolve, Color Erase
|
||
|
|
Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr3400/hpr3400.mp3
|
||
|
|
Transcribed: 2025-10-24 22:43:13
|
||
|
|
|
||
|
|
---
|
||
|
|
|
||
|
|
This is Haka Public Radio episode 3400 for Friday the 13th of August 2021.
|
||
|
|
Today's show is entitled Normal Layer Modes, Normal, Dissolved, Colorary and is part of the series Gimp.
|
||
|
|
It is hosted by AYUKA and is about 13 minutes long and carries a clean flag.
|
||
|
|
The summer is, we begin to look at the layer modes in Gimp.
|
||
|
|
This episode of HBR is brought to you by An Honest Host.com.
|
||
|
|
Get 15% discount on all shared hosting with the offer code HBR15. That's HBR15.
|
||
|
|
Better web hosting that's honest and fair at An Honest Host.com.
|
||
|
|
Hello, this is AYUKA, welcoming you to Hacker Public Radio in another exciting episode
|
||
|
|
in our continuing series on Gimp.
|
||
|
|
What we're going to do today is start looking at some of the layer modes.
|
||
|
|
Turns out I'm not going to be able to explain all of the layer modes because some of them have not been documented.
|
||
|
|
We'll see those as we get through.
|
||
|
|
There are a few occasions where maybe I can do some experimentation and figure out what's going on.
|
||
|
|
It would be nice if I had the documentation but it is what it is.
|
||
|
|
Now, I'm going to say that I'm using Gimp 2.10.20 and I did this using Kabuntu Linux 1804LTS.
|
||
|
|
So I have, it's an older version of the operating system but it's the most current version of Gimp at the time I'm recording this.
|
||
|
|
Now, as we saw in the previous tutorial I've prepared two images that I will use for examples.
|
||
|
|
One of them is a dog and the other is an image of a toy.
|
||
|
|
Now, for the sake of consistency in this particular episode, I will always make the toy image, the bottom layer and the dog image, the top layer.
|
||
|
|
And that means I'll be making my layer mode choice with the dog image selected because your layer modes are always selected by the top layer.
|
||
|
|
Now, with that, when you first have some layers and a project in Gimp open, you take a look at mode.
|
||
|
|
The mode is in the window for layers and it's just about the top of that window and it will say by default normal.
|
||
|
|
Now, what normal is, it means that the top layer will entirely cover the bottom layer in the resulting image because there is no transparency in the top layer.
|
||
|
|
Now, if I just had that and take a look at the image I have, it's simply the picture of the dog because it's going to cover entirely that bottom layer of the toy.
|
||
|
|
Now, if we reduced the opacity of the top layer or added some areas of transparency, then of course some of the bottom layer would show through.
|
||
|
|
None of it comes through solely because of the layer mode.
|
||
|
|
So, you know, there are basically three ways of achieving some amount of transparency.
|
||
|
|
You can reduce the opacity of a layer and that's going to make it more transparent and if you reduce the opacity all the way down to zero, it's completely transparent.
|
||
|
|
Not quite sure why you do that, but yeah.
|
||
|
|
Then you can make areas of the layer transparent by using something like a layer mask and that lets you pick specific parts of that layer, parts of that image that you want to make transparent and then whatever is underneath it would show through.
|
||
|
|
Layer mode is the third way of doing it, so there are various ways.
|
||
|
|
Now, the dissolve is the first of the normal layer modes that let you do this and this dissolves the top layer into the bottom layer by means of a partial transparency.
|
||
|
|
So, you know, first if you leave it in normal mode and then reduce the opacity, you get an image with the bottom showing through the top.
|
||
|
|
Something we've already looked at how to do that, but when you do that, what is happening is that every single pixel of the final image is a combination of the pixels in each layer.
|
||
|
|
Disolve is a little bit different.
|
||
|
|
What dissolve is doing is it is kind of a random process taking pixels from each of the layers and deciding which one is going to show through.
|
||
|
|
So, you get a speckled pattern.
|
||
|
|
One pixel might be a pixel from the image of the dog, the one right next to it might be a pixel from the image of the toy and so on.
|
||
|
|
And so, the layer chosen for each particular pixel is random, interesting effect.
|
||
|
|
Now, doing this as a layer mode means you're doing it to the entire image.
|
||
|
|
What about only doing it to part of the image?
|
||
|
|
Well, the key is to apply the transparency selectively. Select dissolve mode for the top layer as before, but leave the opacity of this layer at 100%.
|
||
|
|
Then use the erase tool.
|
||
|
|
Now, I did this setting the opacity of the eraser tool to 50% and drew a streak across the dog.
|
||
|
|
That gave me a dissolve effect only where I drew with the erase tool.
|
||
|
|
Now, you can get an interesting effect if you set the opacity of the erase tool to 100%, set the top layer opacity to 100%, and then set the top layer to dissolve mode.
|
||
|
|
Then erase on the top layer and you create an area where only the bottom image is showing, but around the edges you will get a dissolve effect because the erase tool feathers the edges.
|
||
|
|
And so, with those three settings, you're going to get through the middle of the streak a perfectly solid view of the underlying layer, and then a little bit of speckled dissolves random stuff around the edges, and then outside of that the top layer image of the dog.
|
||
|
|
Now, there's another way you can get a dissolve effect, and that is with the paintbrush tool.
|
||
|
|
But the difference is, instead of the bottom layer showing through, it would be your foreground color that shows up.
|
||
|
|
So, select the paintbrush tool, choose your foreground color, and then select dissolve as the mode for the paintbrush.
|
||
|
|
This is in the paintbrush properties. Now, remember that for all of the tools, there is a properties area underneath the tool selector area.
|
||
|
|
And if you take a look at paintbrush, you're going to see that there are modes for the paintbrush tool, and one of them is dissolve.
|
||
|
|
So, I did an image, you can link in the show notes, you can see this, and I chose red as my foreground color, drew a streak across the dog, and I get this speckled streak, where some of the pixels are red and some of them are the image of the dog.
|
||
|
|
Now, the next one I want to talk about is something called color erase. Now, color erase works by taking the colors from the top layer, and removing them from the bottom layer.
|
||
|
|
So, when you choose color erase as your layer mode for the top layer, GIMP will immediately show the bottom layer with this eraser in place.
|
||
|
|
I did this with the dog photo as the top layer, and got kind of an interesting effect out of it. Now, the problem I have is that this is one of those ones the GIMP team has not gotten around to documenting.
|
||
|
|
So, I was a little uncertain what's really going on, but I was able to work it out by doing some experimentation.
|
||
|
|
It's not as simple as just looking for a color match between the two images. I think there's something going on involving the numbers here.
|
||
|
|
Now, recall that digital images are defined by numbers that express the red, green, blue, and alpha, and each number is composed of two hexadecimal digits.
|
||
|
|
Well, 16 by 16 is 256, so we know that it's handled in binary mathematics by 1 8-bit byte.
|
||
|
|
4 channels at 8 bits gives you 32 bits, so we call these 32-bit color.
|
||
|
|
A precise color match would, at the very least, mean the six hexadecimal digits for the RGB match precisely, otherwise nothing is erased.
|
||
|
|
And that's not really what's going on here, I don't think.
|
||
|
|
So, then I had the idea of using one image to erase colors on the other one.
|
||
|
|
That turned out to be complicated for figuring out what's going on.
|
||
|
|
So, instead of using the dog image as the top layer, I created another layer and put that on top of the toy.
|
||
|
|
Now, using that as the top layer, I filled it with a pure red, FF0000.
|
||
|
|
And using that as the top layer, I got an image that is distinctly different in coloration.
|
||
|
|
Everything is still there in terms of the image, but the colors are much different.
|
||
|
|
The image had red in the buckle on the wizard's hat, that's gone.
|
||
|
|
The wizard's staff had red in it, that's gone.
|
||
|
|
So, everything in the photo is in shades of blue, green, and a kind of washed out yellow.
|
||
|
|
Now, normally a pure yellow is a combination of red and green, FF00.
|
||
|
|
But with the red removed and some blue in there, it gets washed out.
|
||
|
|
So, next I tried doing it with a pure green top layer.
|
||
|
|
So, that would be 00, FF00, and I got something that is distinctly purple.
|
||
|
|
Well, that makes sense, because red plus blue makes purple.
|
||
|
|
So, with all the green erased, you should wind up with a purple tinged image.
|
||
|
|
And that's exactly what I got.
|
||
|
|
Then, for the sake of completeness, let's try it with a blue layer on top.
|
||
|
|
And what I got was something that was very yellow.
|
||
|
|
Now, again, this makes sense since we saw above that red plus green makes yellow in the RGB display space.
|
||
|
|
So, after experimenting, my guess is that the algorithm involves taking the pixel colors from the top image,
|
||
|
|
subtracting them from the bottom layer, but only as far as 0 since you can't go into negative numbers.
|
||
|
|
Still, I'd like to see it documented at some time.
|
||
|
|
Now, this raises the question of where I would use this, and right now I don't have a use case in mind.
|
||
|
|
But there probably is a use for it because they did put it in Gimp.
|
||
|
|
Now, as before with the dissolve mode, there is a way to use color erase with other tools like paintbrush.
|
||
|
|
Select the paintbrush tool, go down to the properties area, just like we did before,
|
||
|
|
and go into mode and select it to select color erase.
|
||
|
|
Now, again, it's going to take your foreground color, so I set it to pure green, 00FF00,
|
||
|
|
drew on my image, and I got a purple streak where I drew, but only where I drew.
|
||
|
|
So, this might be more useful than doing it in layer mode, but in any case, you do have a few options here.
|
||
|
|
So, this is Huka for Hacker Public Radio, signing off, and as always, encouraging you to support free software.
|
||
|
|
Bye-bye.
|
||
|
|
You've been listening to Hacker Public Radio at HackerPublicRadio.org.
|
||
|
|
We are a community podcast network that releases shows every weekday Monday through Friday.
|
||
|
|
Today's show, like all our shows, was contributed by an HPR listener like yourself.
|
||
|
|
If you ever thought of recording a podcast, then click on our contributing to find out how easy it really is.
|
||
|
|
Hacker Public Radio was founded by the Digital Dove Pound and the Infonomicon Computer Club,
|
||
|
|
and is part of the binary revolution at binrev.com.
|
||
|
|
If you have comments on today's show, please email the host directly, leave a comment on the website or record a follow-up episode yourself.
|
||
|
|
Unless otherwise stated, today's show is released under Creative Commons, Attribution, Share a Life, 3.0 license.
|