Mobile app version of vmapp.org
Login or Join
Annie732

: Changing text with drop shadow over a radial gradient in GIMP I want to change the text in the image below without modifying the background. I tried cutting the text and filling the gap

@Annie732

Posted in: #Gimp

I want to change the text in the image below without modifying the background.



I tried cutting the text and filling the gap with a new one, but it doesn't look nice. Is there a simpler way?

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Annie732

1 Comments

Sorted by latest first Latest Oldest Best

 

@Eichhorn212

OK, it looks like you have two problems: first, how to get rid of the current text, and second, how to replace it.

First, let's start with your original image:


Open it in the GIMP. Since it's a GIF image, it will be in indexed color mode. Change it to RGB mode (Image → Mode → RGB) first: many editing tools won't work on indexed color images, and those that do often produce surprising results.

Now, if the yellow background in your image was a single solid color, removing the text would be as easy as picking the color with the eyedropper tool and painting over the text with it. However, the background turns out to be a subtle gradient, as you can see if you equalize the colors (Colors → Auto → Equalize):

It's not even a linear gradient, so you can't simply use the clone tool to copy it from another part of the background. You could use the Blend Tool to recreate a new radial gradient, tuning it until it matches the original, but I'm going to cheat and use the Resynthesizer plugin instead.

The Resynthesizer is an extremely useful little tool for patching holes in images or removing unwanted obstructions. It used to be one of the few ways in which GIMP's feature set beat Photoshop's, until Adobe introduced their own "content-aware fill" tool, which does more or less the same thing.

So, let's start by selecting the text. You could just select a rectangle around it like I did to start with, but I wanted to be tidy and cut away some parts of the rectangle that didn't overlap with the text. Just make sure the selection covers all the pixels that the text touches at all:

If in doubt, it's better to make the selection too big than too small. At this point, we can also feel glad that the original image wasn't in JPEG format, since then you'd have to deal with compression artifacts around the text.

Now, you could either use Filters → Enhance → Smart remove selection... or just Filters → Map → Resynthesize... directly. I went with the latter, since it's such a small image, used the default settings and got this result:

Let's see how it looks equalized:

Not quite perfect, but not bad either. We could hand-tune the gradient further, but honestly, it's nearly invisible anyway.

Now, next we need to recreate the text. It's a good idea to first try to recreate the original "Repair" text as closely as possible, and only then change it to what we want to say.

Knowing the original font would help a lot. It looks like it might be Arial, which I don't happen to have on this Linux box, and in any case Linux and Windows (as well as different versions of each) do hinting differently, so we're unlikely to get a pixel-perfect match. However, a bit of experimentation shows that Liberation Sans Bold at 16px, with hinting disabled, gives a pretty good match, so I'll go with that:

To get the drop shadow, I first created a text layer with the text in white, setting text alignment to centered and extending the layer horizontally to each side of the image, and adjusting the vertical position to get the baseline to match. It helps to have a copy of the original image opened as a layer for this. This is also the point where you should tweak the text size, font and hinting settings to approximately match the original:


Next, I duplicated the text layer, changed the text color in the lower layer to black, and moved the layer one pixel to the right. This matched the original shadow in position, but made it look too dark, so I lowered the opacity of the lower layer until it looked good. 25% opacity seems to match the original pretty well:


Now, all that remains is to change the text to read "PC", or whatever else you want. Remember to do it to both of the text layers (but that'll be kind of obvious). Save the resulting image in XCF format for later editing, and a copy in PNG or GIF format for the web:


And there you go!

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme