Quick n’ Dirty Gimp Tutorial

Originally posted by goblin. Okay, maybe not so quick. 😕

I am assuming that a user knows at least the very basics – how to open a file etc.

Okay, I’ve just recently had to switch to Linux as the computer fairy skull fucked my hard drive. I’ve used Linux a lot before, however during the time I was using Linux I wasn’t doing art on computers. I don’t tend to use computers at all for most stencil/art related stuff, I prefer using a sharpie or gouache, however the other day I decided to run cutout for a comment I was writing in another forum. It was at this stage that I discovered that there is no cutout filter in gimp and that posterise works quite differently to Photoshop.

I’m sure that some people will have noticed that with the posterise function is pretty hard to get an accurate result from a normal image, the thing that makes gimps posterise function odd for a PS user is that it averages colors, it seems to try to keep the colors at even distances from each other, thus the middle tone can swing wildly as you add or reduce the number of colors. Photoshop on the other hand looks for the most common color ranges and averages the range rather than the whole color spectrum.

This tute is just a work around which tries to simulate photoshops posterise and cutout functions. I know that many people dislike the cutout function, to that I’d say tough, it’s handy sometimes. These techniques are based upon my observations and experiments, if I have something wrong then tell me & I’ll fix it, if you know a better way of doing it then write a tute yourself. My use of color indexing is a technique I picked up years ago to basically posterise images before I started using Photoshop, I originally learned to do it in command line.

All of this can be done in photoshop if you wish, or indeed any reasonably advanced image editor. I tend to use the save for web function for stencils in PS.

Right nuff said – into it.

preparation of the image.

I decided to use this lovely pic of a pussycat, just cos.

The first thing that I always do with an image is to clean it up, the main thing here is to remove the background, leaving just the tiger, if the background is left in then it makes it hard to index the colours (explained later) and it’s a good habit to clean images up before you start.

You could just paint in the background white if you wanted, but I tend to use quickmask for this, it’s more accurate for really fiddly stuff and it only selects, rather than editing the image. It’s also usefull to know if you want to change a background rather than just removing it.

Make sure that the image is deselected menu “Select – None”. Now go into quick mask. This is in the menu “Select – Toggle Quick mask”. When you switch it on you’ll see something like this;

Make sure that your pallet colours are set to black and white and use the brush tool to remove the red from the background, if the red stays there when you use the brush then swap your colours, White is remove red, black adds red. When you have removed the red totally from the background go back and toggle the quick mask back off (same menu). Now you will have the background selected and you can just paint it in white.

Now you have a nice clean image and your ready to start actually working on it. So save the file and keep going.

Posterise function from indexed colors.

When we posterise an image in Photoshop we reduce the number of colours to a user defined number. In Photoshop this is perceptive, In gimp it works differently, so I won’t use the gimp posterise function, that works best with greyscale images, not so well with colour. Instead I’m going to use the index colour function, this is closer to how Photoshop does it.

Now there’s a bit of judgement coming into play here as we dont see the result until it’s already done, it’s easier to have a couple too many colours than not enough though, In this case I can see 5 distinct colours in the image – Black, White, Grey, Orange and Brown. So that’s the number I’m going for.

Taking the image we go to the menu “Image – Mode – Indexed color” which brings up a box like this;

So I select the number of colours that I want. In this case 5. And I select “No colour dithering” cos I don’t want crap loads of random pixels everywhere.

The image is now indexed to five colours, this will give you an image that looks like this;

and there we have a basic replication of Photoshops posterise function. If you’re curious about what gimps posterise looks like then it looks like this;

Lot’s of random jaggy pixels and the colour in the mid tones tends to green. With three colours the green is incredibly pronounced. All in all this is much more difficult proposition to turn into a stencil.

If you had to specify a larger number of colours in order to get particular colours included then you can go back into it with a brush and clean up the colours you don’t want.

Replicating the cutout filter from photoshop.

The cutout filter simplifies an image. It does this by looking at gradients and drawing edges between colours along the mid points, there are times that it’s usefull to have this simplification as a tool, not often but ocasionally, I’ll show how to replicate it.

Take the indexed image that you have already created the five colour tiger in this case. Go to menu “Image – Mode – RGB” this allows you to use filters on the image.

Now in the filters choose gausian blur – Menu “Filters – Gausian Blur” (I used IIR, but I have no idea what IIR & RLE mean) Set the pixels to 1 and click okay. You may need to do this several times before the image begins to blur usefully (with high resolution images set the pixels higher).
I blurred by 1 pixel three times here;

So when I colour index the image again the linework is simpler than it was with just the first colour index on it’s own.



The bigger the pixel blur and the more often the blur is run the more the image will be simplified – A repetitive blur at one pixel would equate to the edge fidelity slider in PS’s cutout filter, whereas blurring at 5 pixels would equate to the simplification slider

Just to make it less fiddly I’m going to keep working on the cutout version from here.

Setting up for printing.

What I’m going to be doing here is seperating the image out into layers in preperation fot printing (and cutting), the first thing I need to decide is the order which the image will be sprayed in. This involves a bit of practice and some judgement. For the purposes of this I’ll refer to the colours as Black, White, Grey, Orange and Brown, you should be able to work out what I’m talking about.

As I see it the layer that would be the biggest pain in the ass would be the grey layer, so I’ll put that down first, this way I can just block in the whole thing in grey and not worry about the details. The next worst would be the dark brown, After that the light brown would be the worst – then I’d do black and then white which will be the easiest.

Before I do anything else I put in some registration marks, this will allow me to line the layers up as I spray them. I need to make sure that the registration marks are present as I do each layer, if I do a deselect by colour and they are deselected then I need to reselect them with the magic wand tool (this can only happen a maximum of once with the technique I use).

So I select the whole tiger (not the background) and in the menu select “Layer – New Layer” this will create a new transparent layer with an active selection which I can fill in with black to create the grey layer. Like so;


I’m not wanting to print yet, I’m still setting up the layers, so I go to the layers menu and click on the “view layer” eye icon for this layer and click on the first layer to keep working there – I repeat this as I do each layer for print, like so;

So now I go on to the second layer, this is all of the colours bar the background and the grey, I still have the selection active, so I click on the “Select by colour” tool or go to menu “Select – By colour” and hold down the CTRL key as I click on a grey area of the image – this deselects the grey. Then I repeat the steps of creating a new layer and filling it with black – the result is like this;

The black areas are what I would cut out, as you can see there are Islands here, they will need to be bridged in to the design securely. If you don’t know what that means then look in the tutorials. Some of the bit’s that look like islands don’t matter though – like the gap between the tigers legs, cow I’m planning white for the last layer it can just be ignored.

I then repeat the above processes for each successive layer – orange, then black then white. – When finished the image is 6 layers, like so;

So you save the file.

To print each layer you just make sure that only the layer you want to print is visible (none of the other layers have eyes next to them) and print that layer.

The layers will need bridges designed into them, I find that easier to do when they’re printed out. It’s easier if

you cut from the last layer through to the first (order they are to be sprayed) this allows you to judge bridge placement a bit easier.

That’s all folks.

Quick n’ dirty Gimp tutorial. – Stencil Revolution

Read More