OVERVIEW OF THE GIMP-GAP
This "tutorial" was written in response to discussions that took place in another thread. It is not a true tutorial because it does not particularly instruct on how to accomplish a specific task or create any graphic as a result; it merely covers some of the basic operations of the GIMP-GAP.
----
The GAP is more than just a plug-in, it an entire collection of plug-ins whose main purpose is to keep track of a group of files and allow you to be able to switch between them. It also allows manipulations of the files (which are called "frames") by applying the same filter on these frames, one at a time without the user having to do it manually.
Let us assume that you have captured some images from your camera and they are on your hard drive as the files "Capture_0001.jpg", "Capture_0002.jpg", "Capture_0003.jpg", "Capture_0004.jpg", "Capture_0005.jpg", and "Capture_0006.jpg". To start editing this sequence of frames in the GIMP-GAP, open up
the first file just like you would any other file. The GIMP itself makes no distinction between this "video frame" and any other image; but the GAP commands do. When you perform a "Video->Goto->Last frame", for example, the GAP looks on the hard drive for the last file that meets the filename template of "Capture_####.jpg" and closes the current file and opens that one (although it does it in the same edit windows). At any point in time, you are still just editing an image like any "normal" image.
The first thing to do is to convert all these frames to .XCF files. While you can use the GAP to edit JPGs, PNGs, and GIFs, you basically turn it into a "flipbook" and cripple its functionality. Trust me, you will want to use XCFs.
Perform "Video->Frames convert" and change the extension to XCF. It is a good idea to make sure that the Image Mode is set to RGB (many filters and GAP functions do not work with Indexed images). You can change the name and location of the file as well using the Basename's "..." button. Also, note the "From frame" and "To frame" entries which allow you to save just portions of your sequence. This "conversion" actually loads each frame from disk, converts it, and saves it back to disk (for
each and every frame in the specified range). "Video->Frames convert" doesn't really care if no conversion takes place, so you can also use it to save a backup copy of all you frames. This "backing up" ("backupping"?) is often useful because most GAP operations can not be UNDOne.
Once all the frames are copied to disk (it is a copy operation, your JPGs are still there), a window opens with the first frame of the new sequence ("Capture_0001.xcf"). You can close "Capture_0001.jpg" and forget about it; it is no longer needed for anything (unless you find you want to start over).
It is at this point that I usually go through (using the VCR Navigator) and delete or re-arrange any frames that need it (perhaps you have a bad camera shot that has your hand in front of the lens). Navigate to the frame that needs deleting (for example, "Capture_0004.xcf") and perform a "Video->Frames delete". This command deletes from the current frame to the last frame specified by the slider (there is no way to specify the "starting frame" other than navigating to it and making it the current frame). If you are deleting just the current frame then "Capture_0004.xcf" will be deleted and the remaining frames will be renumbered. This means that the files on the hard drive "Capture_0005.xcf" and "Capture_0006.xcf" will actually be renamed to "Capture_0004.xcf" and "Capture_0005.xcf" respectively. I usually write down which frames I delete for possible later reference. You could have performed this step on your JPG files if you were confident that you will not be needing them;
there is no UNDO for deleting frames, as you can see, the files are actually deleted from the hard drive.
My next step is to duplicate the layer (once again, for each and every frame). This duplicate layer will serve as a "working copy" and allow me to restore a part (or all) of the original image if it is accidently removed (or perhaps intentionally while performing a filtering function).
Duplicating layers is performed by using the "Video->Frames modify" command. This command is
extremely powerful; it is used whenever you wish to repeat an operation for
each and every frame (or a subset thereof). You will find that 90% of what you do will be using the Frames Modify command; it is worthwhile to learn it in depth. Here is a screen shot of this splendid command:
Here is a breakdown of the individual parameters that you can specify:
[*] 1 - Frame Range: The range of frames on which to perform the function. By default, this starts out as all the frames from the first to the last. This setting allows you to just perform your operation on a portion of your "video".
[*] 2 - Layer Pattern: A string pattern that can be used to specify the particular layers on which to perform the function. Many times you just want to perform your operation on one layer, but sometimes you will want to do it on multiple layers. (A specific case would be when "merging" layers, combining them into one composite layer). The entries here can be layer numbers, layer names, or just part of a layer name. Layer numbers range from "0" to one less than the number of layers in the frame; "0" is
always the top-most layer, "1" is the layer underneath, et cetera.
[*] 3 - Layer Selection: Specifies on which layers to perform the function. It may or may not make use of the "Layer Pattern" described in the previous paragraph (for example, "All Visible" ignores the pattern and operates on any layer which has the "eyeball" set. The "Invert Layer Selection" can be used to choose the unspecified layers (for example, all the "hidden" layers).
[*] 4 - Function Parameter: This allows you to add any text that a particular function might need. It is usually "grayed out" and is currently only used for layer names when duplicating layers (as shown in the screen shot) or when renaming layers. For our example, I have typed in the string "Work" so that the new layers will be named "Work".
[*] 5 - Function: Specifies what particular function you wish to perform. For our example, we wish to Duplicate Layer(s).
Once you have all of your parameters specified, you can click on the "OK" button. (The first time I used the Frames Modify function, I spent about an hour trying to get it to work because after I selected the Function, nothing happened. I must have opened and closed the Frames Modify dialog twenty times and thought for sure that the program was broken. To this day, I sometimes sit back after choosing my Function before realizing that I still have to click "OK".)
After you have a duplicate layer on each of your frames, you will notice that both layers are visible. We only need one layer (or "Work" layer) so let us use the Frames Modify command to make the "Background" layer hidden. Open the Frames Modify dialog, the Frame Range (#1) should already be set so that ALL frames are processed. Change the Layer Pattern (#2) from "0" (the topmost layer) to "1" (the layer underneath, which is the "Background" layer). Leave the Layer Selection (#3) set at "Pattern is a list of layerstack numbers". For the Function (#5) choose "Layer Attributes->Set Layer(s) to invisible". Click OK and the Background layer for all of your frames will become invisible.
----
Well, that was a WHOLE lot of effort expended and we still haven't gotten very far; but fear not, you now know about 90% of what you need about using the GAP. Take a minute to absorb all of it and consider that just about anything you are able to do with a single image in the GIMP, you will be able to repeat for any number of images with very little additional effort. Have some comfort cake to celebrate and ponder this fact and then we can continue in my next post.