Animation tutorial: pencil test cleanup with the GIMP
This tutorial will teach you how to batch clean up a sequence of scanned frames. We are going to use the GIMP (it’s free software, download it from gimp.org) and GAP, the GIMP Animation Package.
In order to let GAP see the images as a sequence, the files must be named sequentially, like image-000001.xcf, image-000002.xcf, image-000003.xcf…
Let’s start by opening the first frame:
Now we need to make the dark lines darker, and to push the grayish background to pure white. We first have to play with levels adjustment and make some tests to find the right values for our image. A quick way to do this is by selecting Color > Levels… from the main menu, but without committing the changes. Once we know the right Input Levels values, we can run the batch action. Select Video > Frames Modify… from the main menu.
Change the function to Apply filter on layer(s). Set layer selection and frame range, then click OK.
We now have to select what function we want to run with our batch action. Let’s choose plug-in-wr-color-levels, then click on Apply Constant.
We now have to use the values found earlier. For my scans, I just set Low Input to 150 and High Input to 200, but you might need a different adjustment.
After confirming the action, every frame will be affected by the new levels adjustment. This is what you’ll get:
It’s now time to clean up the rough drawings, frame by frame. Pick the brush of your choice, set the foreground color to white, and start painting over the excess lines. You can add black strokes where needed.
Some people won’t need to go any further with the cleanup process, as we now have clean black and white drawings. In my case, though, I need solid black lines over transparent background. We can execute another batch action selecting Video > Frames Modify… from the main menu. This time, the function has to be set to plug-in-colortoalpha.
Confirm the default color setting (white), and we’re done!
If you don’t want this cleanup process to be performed on the whole image sequence, you can manually adjust the levels of each frame, and then run Colors > Color to Alpha… from the main menu.
I hope this tutorial can be useful to some animator out there!




















Nice work on the tutorial. If I ever have any questions about 2d animation you’ll be the first guy I ask, naturally. You’ve got it all figured out, its just a matter of time before I’m watching you’re producing your own show.