A First Look at Layers in GIMP (what are they and how do they work) Presented by Dave Mawdsley, DACS Member, Linux SIG Member January 18, 2012
1 Explanation I'm a fan of the writings of Carla Schroeder of Linux Magazine or Linux Today. I consider her writings to be top notch. She also has extensive knowledge of all things related to Linux. So she's my teacher and I listen when she has something to say or write about. That said, I've never really understood how to use layers in GIMP. I know it's important, but I couldn't get to first base with the topic for some reason. (GIMP's terrific, but I missed the bus when it stopped at my house.) A few days ago, Carla showed a first lesson on GIMP layers. Perfect! “Blending Multiple Images and Creating Captions in Gimp” at: http://blog.worldlabel.com/2012/blending-multiple-images-and-creating- captions-in-gimp.html is where her presentation be found.
Introduction 2 I'm going to be even more specific than she was when describing what to do—my way of learning it well for myself...by teaching it to others! ** First, imagine a stack of sheets of transparent glass that have different images on each sheet. If the stack were to be neatly piled, you could look down through it and see the separate images except for where they overlapped. GIMP assumes that you would like to work on each layer separately doing what you need to do—crop, resize, move, recolorize, etc. GIMP allows you do do that. When completely done with layers, you can flatten the image and save it in some image format such as .jpg. However, once flattened, you can't get the layers back unless you are successful at an immediate Undo command under the Edit menu. Once saved and closed, the .jpg file can't be put back in layered form, though you can create new layers. Edit > Undo... is your friend! ** I've got a quote to share, but I'll offer it later.
Saving Your Work & First Things to Know 3 Saving Your Work & First Things to Know myFirstLevels.xcf is a great way to save your first layers attempt because .xcf preserves the layers as you left them. When you load the file back into GIMP, the layers are ready to use. Save often as you work, sometimes using different filenames to keep track such as myFirstLevelsA.xcf, then myFirstLevelsB.xcf, etc. so you can get back to earlier stages that were correct. While working with say 3 layers, pay attention to how they are stacked such as their order 1, 3, 2. You may need to resort them. 1 is atop 3 which is atop 2. Each layer masks or cuts off part of the layers below it. Only one layer is selected even if you can see all of them. A thin rectangle highlights the current selection.
4 Some Free Resources Carla suggested some free open source graphics for our use that include a Tux penguin and a Red Hat. So download and save onto your desktop the first Tux Penguin from: http://www.isc.tamu.edu/~lewing/linux/ [Tux was created by Larry Ewing using GIMP.] Download to your desktop also the Red Hat at: http://commons.wikimedia.org/wiki/File:Red_Fedora.svg [Wikimedia Commons. This image is in the public domain.]
5 The Two Images Needed Tux and the Red Hat
Two Layers in GIMP 6 1. Choose File > Open as Layers. 2. In the box locate the Desktop and click on both image names. They should both enter the frame of the GIMP rectangle.
Move Them A Bit 7 3. From the Toolbox select the Move tool (two double arrows) 4. Move the two images a bit and note that the image in front was the first file you selected in step 2. It's the default layer. 5. Move Tux down to the left corner and then click on the Red Hat. We need the Red Hat as the selected layer.
Hat Selection 8 6. Select Layer > Stack > Select Next Layer. This selects the Red Hat. 7. We need to resize it. Select Layer > Scale Layer (use 130px X 130px)
Flip the Hat 9 8. Next, the hat is oriented wrong. Select Layer > Transform > Flip Horizontally. If you move the hat to Tux, it's shows that Tux is in front.
Oops! Tux is in front. 10 9. We need the hat as the selected layer. Layer > Stack > Select Previous Layer. Now move the hat onto Tux so it fits properly. OKAY!
Removing Transparencies 11 10. Next, we need to remove transparencies. First save the file next as an .xcf file. 11. Next use Layers > Stack > Select Next Layer Tux now is chosen. 12. Next use Layers > Transparencies > Remove Alpha Channel. 13. Next Image > Merge Visible Layers (choose Expand as Necessary) then Merge to include all. (The hat which still has the Alpha Channel.)
12 Finish Up 14. Next use Layer > Transparency > Remove Alpha Channel 15. Crop the image to look better. 16. Finally use Image > Flatten Image and save the file as a .jpg.
** The Quote 13 A few years ago, I came across: “If you really want to learn something, then teach it to someone else. If you really want to learn it well, then program the instructions for a robot.” I have no idea who said this!
A First Look at Layers in GIMP (what are they and how do they work) This OpenOffice.org Presentation 'gimplayr.odp' can be downloaded from http://madmod.com/freebies.html