Episode: 3230 Title: HPR3230: Introduction to Layers Source: https://hub.hackerpublicradio.org/ccdn.php?filename=/eps/hpr3230/hpr3230.mp3 Transcribed: 2025-10-24 19:13:08 --- This is Hacker Public Radio Episode 3,230 for Friday 18 December 2020. Today's show is entitled Introduction to Layers and as part of the series Gimp, it is hosted by Ahuka and is about 21 minutes long and carries a clean flag. The summary is Layers are the most important concept in using Gimp. This episode of HPR is brought to you by Ananasthos.com. Get 15% discount on all shared hosting with the offer code HPR15, that's HPR15. Better web hosting that's honest and fair at Ananasthos.com. Music Hello, this is Ahuka, I'm coming you to Hacker Public Radio and another exciting episode and I'm going to be continuing my series on Gimp today with an episode called Introduction to Layers. Important concept here. Now if you ever had a chance to see how classical animation like the old Disney films was done, you might have learned that they used what are called animation cells where cell is short for celluloid. The idea was that a background would be painted on a clear transparent sheet of celluloid and then a foreground character painted on another sheet of celluloid. Then the frame would be photographed with the foreground sheet on top and the background sheet under it. This was efficient because for many of the photographed frames the background would not change. But you could change the foreground sheet to create animation with a series of new celluloid sheets and not have to keep repainting the static background. Now layers in Gimp work in a similar way, but they can do a lot more of course. But if we stick with the metaphor for just a moment longer we can make an important point. Once the cells have been stacked up and photographed, you could not easily edit the final photograph. If there was something wrong with the frame, you would need to shoot a new one. But as long as you kept all the original cells, you could always make a change to one of the cells and then shoot a replacement frame. Gimp has analogous considerations. The equivalent of the cells is what we call layers. And as long as you keep the layers distinct in your Gimp file, you can always go back and make edits. But two things can mess you up if you are not careful. So here's a couple of rules I would suggest to avoid gotchas in Gimp. And the first one, always keep your Gimp Native file separate from your final output. Now Gimp Native files are what you get when you click save on the file menu, and they have the file extension .xcf. Now xcf stands for experimental computing facility, which was the group at the University of California at Berkeley where Gimp was created. My own approach is to keep two sets of files. One of Gimp originals, the other of output files like .jpg or .png. You get output files when you click export. And those are like the photographed frames in animation that are no longer easily editable. Now I say no longer easily editable rather than just no longer editable because in rasterized images you can always edit them if you're willing to put in hours going pixel by pixel. Personally I would like to avoid that. I'm guessing you'd like to avoid that. So one way to avoid that is to keep your native file and retain that. I think storage is pretty cheap these days. In any case I have a network attached storage device that I put all of mine on. It's a DROBO5N. And I think I've got 16 terabytes of storage on there, or something like that, and I'm nowhere near using it up. Now the other thing I would point out is there's something called merge. And you want to be very careful with that and resist using the merge command if you aren't certain of what you're doing. Merge will take those separate layers and combine them all into one image again doing essentially what the photograph does in animation. You may be able to undo, depending on what you've saved the file yet, but only by undoing everything you have done to go back to a point before you merged. Now being the cautious type, even if I am going to do a merge, I would save a pre-merge copy of my file just in case I need to go back. We'll cover doing merges, but always keep this caution in mind. And there's nothing wrong with having a series of saved files, you know, dash 1, dash 2, dash 3. Sometimes I even put in the ISO conforming date. You know, 2020-08-07 is the date I'm recording this, for instance. Now, plugins. It should come as no surprise that GIMP has a variety of plugins available and some of them should be useful for working with layers. So the best place to look for plugins now is through your distro repository. On my Kabuntu installation, I went and added the package GIMP-plug-registry. Now, there used to be a plugin registry within GIMP. They decided to close it. I've gone to the site and there's a message there saying, well, you know, we might bring it back in some other form. Okay. So it's a little harder to find some of these things than it used to be, but Google is your friend. But on my Kabuntu box, you know, it's already in the repo for my distro. So I just added it, installed the package. Now, when you install the package, you want to reopen GIMP to see the results. And when I did that, I saw two new menus. One says FX-Foundry, and the other is script-foo. So I think that's handy to have these things around. Now, transparency is the next concept we need to learn in order to work with layers in GIMP. Layers can use transparency in a variety of ways. Layers are, for instance, used in layer masks, which is an important technique. They're most frequently found in backgrounds since they let you place elements like text on an image without obscuring other parts of the image. Again, using our cell metaphor, the sheets of celluloid are transparent to begin with. When the artist paints an image on the cell, the image itself may be opaque, but the rest of the cell remains transparent. And that is why you can stack them to get the final image you want for the photographed frame. Now, a related concept in computer graphics is something called the Alpha Channel. I went to Webapedia that had a wonderful definition, so I'm just going to repeat it here. And link in the show notes, I've got links to several things that we've talked about that are in the show notes. So here is their definition of Alpha Channel. In graphics, a portion of each pixel's data that is reserved for transparency information. 32-bit graphics systems contain four channels. Three 8-bit channels for red, green, and blue, the famous RGB, and one 8-bit Alpha Channel. So that's a total of four channels, each of which has 8 bits of information combined those 32 bits. So the Alpha Channel is really a mask. It specifies how the pixels' colors should be merged with another pixel when the two are overlaid, one on top of the other. Typically, you wouldn't define the Alpha Channel on a pixel by pixel basis, but rather per object. Different parts of the object would have different levels of transparency depending on how much you wanted to the background to show through. This allows you to create rectangular objects that appear as if they are irregular in shape. You define the regular edges as transparent so that the background shows through. This is especially important for animation where the background changes from one frame to the next. Rendering overlapping objects that include an Alpha value is called Alpha Blending. Now, the key point for now is that when you start working with layers, you want to become comfortable with transparency. When you create an image, for instance, one of the options for the background is transparency. You create a new image if you go to File, and then New, and then a pop-up window comes out. There is something called Advanced Options, which is a drop-down, so you have to click it before it opens up for you. When you click it, you will see a number of things, but one of them is a fill with box, which again is a drop-down. When you click the drop-down, you see a number of options, like white or background color or foreground color, but one of the options is transparency. If you select that, you will start with an image that has a transparent background. Well, that would be hard to work with, wouldn't it? What GIMP does is create a pattern, which is a gray-scale checkerboard pattern. The final image when you export it and view it in any image viewer or put it on a web page or whatever, that checkerboard pattern disappears. It's simply there right now to let you know what you're working with. So it's kind of a standard way of doing it in most graphics programs. You can make it a little bit better, I think, if you go into the Preferences, and that's another thing we're introducing here, Preferences. The goody-bim, for most of the settings in GIMP, is found in the Edit menu under Preferences. So you go there, you click on that, that opens up a window, and there's a lot here. I could do one very long boring episode by simply going line by line through all of this, and I'm not going to, because I think it better to do kind of just in time teaching, you know, introduce things as they're needed. So that's how I'm going to cover Preferences. I'm going to bring them in when they're relevant to the topic we're talking about. So for transparent background settings, if you go to Display, the first thing you see is Transparency settings. Now personally, I set mine to Light Checks, the default is Medium, and that is the check style that I'm going to use. And then for Check Size, I set it to Small. Now try it for yourself, see if that works for you. With these settings, I can still see where the transparency is without having it overwhelm other objects like text or other image elements. Now the other area in Preferences that I'll address right now is Undo Levels. This is reached through the first Preferences option, Environment. There's two key settings to look at, the number of levels and the maximum memory allocation. Now Undo Levels matter because that's how many things you can undo. Remember we talked earlier about Merges, and what happens if you merged and decided it was a mistake, and well you'd have to go back to a previous version. And that's dependent on how many Undo Levels you have. It's easy to run out. Now the default is five Undo Levels. That's not a lot. Unless you are really constrained on your RAM, I would say increase it. Now what does RAM constraints look like? You'd have to have an old machine, I think, to be that constrained. But right now, I'm having my installation on a Kabuntu machine. It's a desktop. The motherboard I have only allows 16 gigabytes of RAM, so that's how much I have. Now whenever I need to purchase a new motherboard, I will certainly get one that lets me install 32 gigabytes of RAM, which I would love to have. But for now, this machine is working fine, and I don't really feel the need to spend money, particularly in this difficult time, on upgrades that I don't really need. Now even with only 16 gigabytes of RAM, I can afford to allocate more. So I have multiplied both of these settings by 10, so that means I've set mine for 50 Undo Levels rather than five. And I've allocated 640 megabytes of RAM instead of 64 megabytes. I can certainly afford that. You should check out what works for you. But basically, one of the first things I do with any piece of software that I work with is increase the Undo Levels. It just makes your life easier. And if you've ever listened to my Libra Office tutorials that I did previously, I made the same point there to increase the Undo Levels. Now finally, the Layer tab. This is located in the upper right on a standard screen. Now, I've mentioned it before, but I'll remind you, I went to the Windows menu in GIMP and selected Single Window Mode. By default, when you first install GIMP, you've got floating windows all over the place that appear to be unconnected to each other. I don't like that. If you like it, that's fine. But when I'm referring to where things are located with respect to that single window mode. And you know, you can move all of these things around. These are what are called dockable windows. So just because it's in the upper right, when you set it up, it doesn't mean as to stay there. It can be the lower left if that's where you want it. The point is, I would stick with kind of a default until you get a little more experience just because it's going to make it a lot easier if I say this isn't the upper right or this isn't the lower left. We all know what we're talking about. Now, being on the upper right, it's in the section above the brushes, patterns, and gradient selectors. We looked at previously. Now, the number of tabs, but the very first one is the Layers tab. So if you click that very first tab, now if you don't see the Layers, you might note that there are left and right pointing arrows. And so you may need to use those to scroll a little bit because you can have more by default. I'm seeing three tabs at any one time, but I might have six tabs that are actually in there and I can scroll back and forth. In any event, have the Layers tab open. If you're working with Layers, that's just basic. Now, the main area, which is what takes up most of the screen, is where you will see each layer separately. And you can click on anyone to select it, make it active, and then start working with it. Now, this is useful for editing multiple layer images. And of course, most of the images you'll work with in GIMP are probably going to be multiple layer if you're going to do anything interesting. A mode is something that will require more attention later. It's a little more than I want to do on this introductory lesson, but it essentially governs how multiple layers will combine into the final picture when you're mixing them together. A lock is under that, and that has two buttons. The one that looks like a paintbrush is the lock pixels button, and it basically locks the entire layer, everything on it. Next to it is a button with the checkerboard pattern, and we already know that denotes transparency. This is the button to lock the alpha channel. So, these buttons can be useful in a shared environment, for instance, to stop someone from changing your image. And it could be something you might want to use yourself if it will just stop you from making a mistake if you're in a hurry. Now, at the bottom of this, there's more buttons. From the left, they are first create a new layer, something you'll do a lot of. Next to it is something that says create a new layer group. Now, layer groups were added in GIMP 2.8, and allow layers to be linked as a unit. They will display in the window in tree style, with one layer on top, and several sub-layers indented under it. This means you can move a group of layers as if it was one layer, and still have the component layers separate for later editing. Then there are the raise and lower buttons, raise the layer, lower the layer, and remember, layers are like transparent sheets, and what is on one layer can be partly obscured by the one above it. Just as with the animation, the background sheet would be on the bottom, and the character sheet on top of it. So the order of layers really matters, and there are times you need to raise or lower layers to get the result you want. Then there's a button that says create a duplicate of the layer. This is something you do frequently with many of the techniques in GIMP, such as making masks. Then there's one that says anchor a floating layer. GIMP lets you create temporary layers called floating layers, but before you can switch to working on a different layer, you have to anchor the floating layer. So this button would let you do that. And then the last one, delete the layer. And so there are IP times where you used something, maybe a floating layer or whatever, that you wanted to accomplish a task, and now you don't need it anymore. Well, you want to delete it before you create the final image. So in this tutorial, we have not only introduced layers, we introduced the idea of plugins, and we introduced the idea that there are preferences settings. That's rather a lot for one lesson, so we'll end it here. But we do have an awful lot more to talk about, and we will talk about it. So this is a hook-up for hacker public radio signing off, and encouraging you to support free software. Bye-bye. You've been listening to Hacker Public Radio at Hacker Public Radio.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 dog 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 status, today's show is released on the create of comments, attribution, share a light, free.or license.