gimp

add text with black color to gimp image


When I try to add a text to image with GIMP, the color of text not clear! How can I insert text with full black color?

enter image description here


Solution

  • Your text color is black... However you are using a small font, and you are using anti-aliasing.

    enter image description here

    In your small font, all pixels are near an edge, so subject to anti-aliasing, that plays tricks with color blends. So you choice is between a smooth but slightly gray anti-aliased text (top), and a pitch black but pixellated text (bottom):

    enter image description here

    Zoomed in, with the theoretical character shape as the red line, showing that most pixels are partially outside it, which is why they are gray:

    enter image description here

    If you are generating the text in a script-fu/python script, you have use the antialias parameter when creating the layer:

    text_layer = pdb.gimp_text_fontname(image, drawable, x, y, text, border, antialias, size, size_type, fontname)
    

    or, when you have the layer (still as a text layer), you can set the anti-aliasing with

    pdb.gimp_text_layer_set_antialias(layer,False)