Done using GIMP 2.8 on Kubuntu Linux 18.04 LTS
The Canvas is where all of the work in GIMP takes place. It is in the center of the screen, with the Tools next to it on the left, and next to it on the right are the Layers, the Brushes, etc. If you are working with an existing photo or image, that will determine what your canvas is (unless you open the image in a layer), but if you are creating something from scratch your first decision will be to choose the size of the Canvas. To start a new canvas, go to File–>New, and you will see a window for setting up your canvas:

The Template section up top is a dropdown that lets you pick from a number of pre-selected images sizes. These include common screen sizes like 640×480, document sizes like A4 (the standard letter size in Europe), and so on. Templates can save you time since they combine a number of settings into one Template, but you don’t have to use Templates. If you click the Advanced Options it opens up even more.
You can pick either RGB color or Grayscale for your color space, for instance, and if you are going to be printing on a standard black-and-white printer there is no benefit to using RGB color. But the thing I want to focus on here is the resolution, which is defined by pixels per inch (or per centimeter, per pica, per point, and so on. Note that it is a drop down.) It helps if you know where the image will be used. You might make different choices if this is for print than you would for a Web graphic. But there is one other thing about resolution worth commenting on. Images can be resized when you are working with them, and if you start with a small image and later decide to make it larger, the image will get more fuzzy because the number of pixels or points is fixed. So an image that is sharp and clear at a small size will not look good when the size is increased. But if you start with a larger image and later shrink it you can get better results.
That is one of the key distinctions between raster-based and vector-based graphics. Vector-based graphics use equations (such as Bezier curves) to define the image, and can be resized to any scale without any loss of clarity. For that reason, a graphic that you want use in a number of sizes with flexibility should be done in a vector-based format. A good example might be a logo. You might want to print that on stationary, on envelopes (in various sizes), use as a Web graphic, place on a banner, and so on. If you started with a raster-based graphic you will not be happy with the result. As we mentioned last time, an open source vector-based graphics program is Inkscape, so check it out!
But photos are made up of pixels and are raster-based objects, so a raster-based editing program like GIMP is perfect. And since one of my main use cases is for fixing up photos, this is the answer.
So, if you were a painter, for instance, one of the first decisions you would make before beginning a new painting is to choose the size of the canvas. So doing this in GIMP is not so odd. But the advantage of doing it in software is that you can make changes later. If you need to change the size of your canvas, go the Menu bar up top, and find the Image menu.
Notice that one of the options is Canvas Size. This lets you revisit some of the choices you made earlier.
Photos
If you do not create a canvas first, but simply open a photo by going to File–>Open, you will open the photo on a canvas that is the size of the photo. But the photo and the canvas are still two separate objects. If you resize the Canvas by going to Image–>Canvas Size, and then increasing the Width, you will see a space on the side that represents the blank canvas expansion. Click the Resize button and you will be looking at this added space as a gray checkerboard pattern. Now go back and add some vertical space in a similar manner, and you will see added canvas at the bottom, with your original photo in the upper left corner. If you cannot see the whole canvas at this point, you can zoom out by going to View–>Zoom, or what I do is to hold down the control key and use the scroll wheel on my mouse.
Now you can experiment little with this by using the Move tool (Tools–>Transform Tools–>Move) which lets you use your cursor to click and drag the photo. Or you can simply press the “m” key since that is the keyboard shortcut. You can drag it off to one side, for instance, and when you do the part of the image that is not within the canvas will disappear. This is not permanent since you can just drag it back on to the canvas. You can move the photo around the canvas with the Move tool, and that is fine, but suppose you want to be a but more precise?
Go back to Image, but this time select Fit Canvas to Layers. This will bring the canvas back to the size of the photo and get rid of that extra space. Now return to Image–>Canvas Size, and this time add space to the canvas as needed, but then before you accept the resize take a look below the Width and Height boxes. The Offset boxes let you specify the position down to the pixel. The X offset is how far from the left side the photo will be on the canvas, and the Y offset is how far from the top edge the photo will be. If you are used to graphing coordinates the Y-offset will be the opposite of what you expect, but there it is.
If you simply want the photo centered, don’t bother with setting any offsets, just click the button for Center, and it will be centered both vertically and horizontally.
If you had originally created a canvas size smaller than the photo, and then opened the photo, one of two things will happen depending on how you do it. If you simply use Open, the photo will open and the canvas will increase to match the photo. But if you use Open as Layers, you will only see a portion of your photo. It is, in essence, “cropped” to fit the canvas size. But the whole photo is still there. If you use the Move tool to click and drag, you can bring different portions of the photo onto the canvas where it will be visible. An alternative way to accomplish this is to make a selection using the Selection tool at the top of the Tools sidebar on the left. You have three selection tools, Rectangular, Oval, and Free Form, but for now let’s use the Rectangular. Make your selection, then choose Image–>Fit Canvas to Selection
Now, why does all of this matter? It matters because at some point you will want to export your image, and when you do, only those things visible on the canvas will be exported. So while an image may be all available in the working file to click and rag around, Export is when you lose anything not visible in the canvas.
This brings us an important concept, that when you are working in GIMP you will be working in layers. We’ll delve into them in more detail, but you must always keep in mind that the Canvas is in some sense the overall container or filter, but that the layers are separate objects with their own properties. The dimensions of a canvas are not the same as the dimensions of a layer. If your canvas has the same dimensions as your layer, it will be easy to work with them, but to do many of the things you will want to do they will be different. If you canvas is smaller than your layer, only a portion of the layer will come through. If your layer is smaller than your canvas, you will need to pay attention to placement of the layer within the canvas. This is something that trip up newbies to GIMP.
The other thing to keep in mind is that unlike most Office programs, there is a distinction between your working files and your final product. Your GIMP file can contain different layers, and these layers can be moved around on the canvas, but one you export the image the final image loses a lot of that. You cannot Edit a JPEG image you created and recover all of that information. For that reason, you should always keep your working files (they are the ones with the *.xcf file extension) if there is even the remotest chance you will want to do more editing in the future. But when you want to upload to social media, export to an image format like *.jpg, *.png, or *.gif.
Listen to the audio version of this post on Hacker Public Radio!