HowTo: Create Artistic Backgrounds using the Gimp - Part 1
Novell Cool Solutions: Feature
Digg This -
Posted: 24 Nov 2004
|Learning to use Linux at Home and Work
Welcome to my ongoing series of HowTo articles designed to help Linux newbies get comfortable with Linux. Before trying any of these HowTos, take a few minutes to study the prerequisites so you can hit the ground running.
This HowTo is about using the Gimp to manipulate pictures to create an original that can be used as desktop backgrounds. You will use simple methods for selection tools, layers, copy and paste, changing the size and transparency of floating layers, and anchoring. The Gimp can do a lot more than is described in this simple HowTo, but here you will learn some of the basic and simple ways of doing things.
We are going to use the same method of acquiring the content as we did in the animations HowTo, although you can quite easily use scanned in or downloaded pictures, because we are going to change them enough so that they won't be subject to copyright. Of course, if you use pictures you have created, whether drawn, painted or photographed, they can still be recognisable as long as the subject does not incur copyright.
I am using 6 window shots from xscreensaver hacks. Instead of using the Gimp, I used ksnapshot to acquire them to find out if it was a better tool. I think the Gimp is better as you can click to acquire when you think the picture is good, whereas ksnapshot does it after a number of seconds, which adds randomness to the end result. The big benefit of ksnapshot is you don't have to save window decorations. (Something I forgot to turn off when I made my snapshots. Oh well! just a bit more editing) Try both methods and choose which you prefer.
I created a special directory $HOME/images/bgwork to save my window shots.
I chose a nice screen background for my first hack which uses the background to do its stuff. This one is called rotzoomer and creates a picture with box shapes which I filled with my other screensaver snapshots like this:
I used crystal, munch, penrose, greynetic and another one.
You can run the hacks in their own window by going to the directory /usr/X11R6/lib/xcreensaver in your file manager and clicking on the one you want to run.
Kill off the window using the x button at the top right, when you have grabbed your screen shot.
The first thing you have to do is resize or scale the picture which you are going to use as your background to the size of your screen. Mine is 1024 x 768. I have found it easier if you scale the other pictures to approximate the size they are going to be pasted. We will do that as we need to.
Start the Gimp and open up all the pictures. If they are all in one place, you can select all of them in the file open browser pop up by holding down the Ctrl key and clicking on all the ones you want, thus:
Minimise all pictures except for the rotzoomer one, using this button on the top right of the window.
You can see and maximise the other pictures when you need them by using the images list and right clicking on the image you wish to Raise. Open this from the Dialogs menu by clicking Images if it doesn't open automatically.
You will see that the Gimp has a menu bar across the top of each picture, which saves a bit of mouse travel.
To set the rotzoomer picture to your screen size, click the Image menu item and select Scale. This brings up the Resize pop up. Scale it to the size of your screen. In my case this is as shown.
If your picture height to width ratio is not the same as your screen ratio, click the lock icon open as shown with the words Unlock Here and put in your values.
This may distort your picture too much so it may be better to resize it to overflow the screen size and then use the rectangular selection to select a screen sized area, and use Image > Crop. If you don't get it right first time you can use Edit > Undo and try again.
Now I decide which picture I am going to paste and where I shall paste it. One of the middle squares would be nice to start with.
I select a picture to paste from the Images dialog window.
My picture has got the window decorations around it, which I don't want. I used the rectangle selection tool to select the part to keep i.e. All except the top blue bar and a little down each side and the bottom. Now I click Image - Crop which gets rid of those unwanted bits.
Looking at the top blue bar of each of the pictures we can see its name and also its zoom factor. Make both the same by using View > Zoom > Other and enter the ratio you need.
Now we can scale the paste picture to approximate the size where it's going to go.
I am going to be a bit clever and paste just the coloured bits into the rotzoomer picture. This will let the underneath show through. To do this we use the Select > By colour tool. Put the mouse pointer over the black background, and click. This selects all the black colour. Now click Select > Invert. This will select everything that is not black, i.e. All the colours, just what I want.
Click Edit > Copy to copy the selection to the clipboard.
Minimise the pictures so you can use them, as modified, again, and, more importantly, so they don't get selected by the layers dialog instead of the picture we are working on.
Now click the top blue bar of the rotzoomer picture to make it active and Click Edit > Paste. Your picture will now look like this.
The picture gets pasted into the centre. Move your mouse over the pasting until it changes to a cross. Hold the left button down and drag the picture to the area you want.
You will see that the picture probably isn't the same size as the target selection.
We click Tools > Transform tools > Scale as the tool to get it to fit.
The pasted picture will change with a grid over it like this. And an information window will pop up.
Click and drag the boxes at the corners of the grid to get it to fit the selection.
When you are satisfied click Scale in the information pop up.
Click the rectangle selector in the Gimp program window to turn off the transform tool.
Move the mouse to somewhere outside the paste region and the cursor will change to an anchor. Click the mouse to anchor the pasted layer and your picture will look like this.
Now better save it, so click File > Save As and give it a new name. Mine is called rotzoom1.png. I use the 1 so I can do more Save As files as I go on, in case I mess it up and have to go back, or if I want to go back a bit and try something else. For example, in the Transform tools menu there were other transforms for you to try out.
The next picture I am going to use is this one. I have changed this picture with Filters > Whirl > and Pinch.
This one doesn't have any area which is black so I'm going to use the layer transparency feature to get the underneath to show through, and I'm going to select an odd shape to paste into. The thing we have to do is make the selection of the area we are going to paste into, copy it and paste it as a new picture.
First make a rectangle selection covering the boundaries of the area, thus:
Now we have to subtract the areas we don't want in our selection. We do this by clicking the subtract icon mode in the Rect Select Options dialog and then dragging our subtract selection from a point outside the selection away from the side or corner we want to get rid of and moving it to cover the part we want to subtract. Releasing the mouse key will subtract the selected area covering the original selection. If you make a mistake Click Edit > Undo and start again.
You can subtract as many parts as you want in this way. Click the normal select icon in the Tool options dialog when done. You can also add bits by clicking the add icon instead. We only used the rectangle selection, but you can use the oval selection as well to make selections with curved sides, or if you start off with a lasso selection, you can use the rectangle or oval selector to add and subtract parts. There is also an intersection icon to experiment with.
Save As all your files.
In Part 2 we are going to use your selection shape to paste our second graphic in, so don't forget what you did because you are going to repeat it.
Novell Cool Solutions (corporate web communities) are produced by WebWise Solutions. www.webwiseone.com