How to make the background colour transparent using GIMP

… and create a handwritten signature image for signing documents …

Sometimes you want take a picture of an item and have it without the distracting background to be able to use it in a document or presentation, or maybe you want to create an image file of your signature to include in document without the need to print the file, sign it and than scan the document again (loosing the possibility to index or search inside the document in the future).

So first take a picture of the thing where you want to make the background transparent.

Crop image (use crop tool in the upper left toolbar):

Now you need to adjust the curves a little to make the not-so-white background cut-off to pure white. The better job you did taking the picture on a white background with good lighting the less adjustment is necessary. In my example the white is more like a light grey:

Colours > Curves …

… moving the upper threshold until the background is pure white and emphasizing the important part by bending the middle part of the curve as seen below:

adjusting the curves

Now you can proceed to select the colour for transparency. There is no need to add an alpha channel by going to Layer > Transparency> Add Alpha Channel (the alpha channel is how transparency is handled in images). You can do directly to …
Layer > Transparency> Colour to Alpha
… and it will work automatically:

Layer > Transparency> Colour to Alpha
White background is automatically removed.

By default this works very well with white background as you can see above. There are some options to play around if you want. Just go ahead and click OK.

This will also introduce semi-transparency for the other parts of the image, in this case the writing itself. For a purpose of creating a signature it is OK. If you don’t want this, you can do the selection by colour or some other way (lasso, magic wand …). See the reference at stackexchange.

Now save the image in some image type that support transparency (JPG does not). I recommend PNG. Go to File > Export As …

Then select the path where you want to save it, choose a filename, ending with .png and leave “Select File Type by Extension” checked. This brings up the export pop-up:

Clock Export and you’re done!

Open a document where you want to paste the signature and just do it the usual way …
Insert > Image
… scale to size and move to appropriate position. You can set the image to hover above the text and position it so it looks more natural:

Export document to PDF and you’re done!