There are different ways to do this, but the way I would do it in GIMP is roughly:
- Color erase tool to remove the bulk of the sepia color.
- Manual erasing of dark spots which are darker than light "image" areas, as these can't be done using levels.
- Levels to tidy up.
- Final color adjustments based on the image properties
In your case, the blue areas might need to be re-saturated or otherwise boosted afterwards to restore intent, as it's pretty faint, even in the original.
Let's start with opening the file in GIMP. Then, add a white layer under the image to act as a backdrop when we start erasing things. Without that, you'd get a the checkerboard grid, which will drown out image details.
Now, re-select the original image layer (should be the top layer). Add an alpha channel to it (
Layer > Transparency > Add Alpha Channel). This is needed for
Color Erase to work. As we erase the color we don't like, the white backdrop will shine through.
Using the dropper tool, select a "representative" sample of the sepia background. We will erase this color from the image.
Now, select the
Paintbrush Tool, and in the options, put it into
Color erase mode. Choose a large size, and paint over the entire image. You should see the bulk of the sepia color fall away, leaving you with a fairly pale background and the image:
We now have a lot more contrast between background and image. There's still some color left in the background, which is because the color we erased isn't exactly the background color of the whole image. \
The top layer is now a gauzy mess of quite intense color with a low alpha. if you try to use the dropper tool on the background now, you'll see the color is much more intense than it looks. At this point, I remove the top layer alpha channel (
Layers > Transparency > Remove Alpha Channel), then add it back, to "reset" it. Then you can select a new background color and erase it again, repeating a few times if needed:
From here, it starts to get more fiddly. Most of the junk left now is actually darker than than the light areas of the image, which means that you can't just hit it with the eraser or levels and hope for the best.
The first thing to do is to use the normal
Eraser tool to wipe out major noisy features, for example the shadowed images and dark spots. You don't need to worry about anything significantly lighter than the lightest detail of the image, but it doesn't hurt to hit anything if you're in an area.
If you have defects in an image area, you might need to fix it manually, for example with the
Clone tool. There's not a lot that can be done about that automatically, as the image data and defects are very similar.
I'm not going to do the text here, as that's just more fiddling, but the concept is the same. It might need a bit more color erase too, as the top of the image has a different background tint.
For the second panel, that's going to need some similar care to remove the stains, but with the added complication of the background detail. The
Clone tool might help here.
Now we have all the background essentially wiped out, leaving just very pale noise. We will remove this with the
Colours > Levels... dialog, bring the white input level down a bit. Perhaps to around 247. This has the effect of "blowing" any color lighter than than that into pure white, and stretching out the rest of the scale to fit.
At this point you might also consider moving the black input level as well to deepen any "almost black" color to pure black. Adjusting the grey point can also help the image. In this case, moving the grey point down brings the blue of the sections out well, but you'd probably want to do that just for the right areas, as the second panel doesn't respond so well.
The last step I'd do is to manually adjust the color according to what we know of the image. The line drawings are all greyscale, so we'll desaturate them to remove any left-over color casts. If the image was pure greyscale, we could do the whole image using
Colour > Desaturate..., but it's not, so we'll use the
Paintbrush Tool in
And that's as far as I'll take it. The main remaining defect is the vertical "stripe" in the second panel. Fixing that isn't really a background-remove task. Just lightening and adjusting the color with
Color modes of the
Paintbrush, maybe with a bit of
Clone Tool might be enough.
Some areas, especially the blue ones, might need some artistic license to reconstruct the original intent. With more time and care in each step than I took here, you'll get a much better result: this is just a proof of concept.