Gimp 2.8.14 grid lines

I have a question about grid lines. I find the auto generated grid lines to be distracting and know how to remove them, however when I remove them the lines I set manually are also removed. Is there a way to just set any lines manually and not have the auto generated grid show?

Thank You

Can you show us a screenshot showing what you are referring to?

The appearance of the image grid is configurable, and showing or not showing it is independent from showing or not showing guides, which may be what you refer to by “lines I set manually”, but I am not sure.

1 Like

There is no particular difficulty in creating a grid using a separate program and importing it into a GIMP file as a layer. Then you can make it visible or invisible, change it’s position in the stack of layers, modify it, etc., just like any other layer.

The following ad hoc MetaPost program will create a 20cm x 10cm grid. Of course, many other graphics programs could be used instead.


prologues := 3;
outputtemplate := “”;

pen medium_pen;
medium_pen = pencircle scaled .5mm;

path p<left square bracket, right square bracket>; % Brackets aren’t
% displaced correctly by the forum software

p0 = (0, -5cm) – (0, 5cm);
p1 = (-10cm, 0) – (10cm, 0);


pickup medium_pen;

fill (-10cm, -5cm) – (10cm, -5cm) – (10cm, 5cm) – (-10cm, 5cm) – cycle withcolor white;

for i = -10 upto 10:
draw p0 shifted (i*cm, 0);

for i = -5 upto 5:
draw p1 shifted (0, i*cm);


To run this program, call this command from the command line:

mpost -numbersystem=“double”

There are a couple of complications: MetaPost can also generate PNG and SVG files, but PNG the only format where you can specify a color format with an alpha channel or turn off antialiasing. I often use these features but in this example I got poor results because the lines were not all of the right thickness. Presumably, this happened during scan conversion and it might be possible to fix it by shifting the entire image slightly in one direction or another.

However, I decided just to create PostScript output instead. In this case, the option “Graphic antialiasing” must be set to “none” when importing the file into GIMP. The command “prologues := 3;” in the MetaPost file causes MetaPost to produce “standalone” rather than encapsulated PostScript. For GIMP, there is no significant difference (and maybe no difference at all), but generating standalone PostScript makes it possible to view the image in PostScript viewers that can’t handle EPS that isn’t embedded in a standalone PS file.

The option -numbersystem=“double” in the call to mpost is probably not needed for this example, but if it’s not used, MetaPost uses the default low precision for arithmetical operations, which was a concession to the limitations of computers in the mid 1980s.

Unfortunately, PostScript doesn’t support transparency, but there is no difficulty in changing the white background to be transparent in GIMP.

The grid can be aligned in various ways with the original image. Values can be set in the MetaPost or the layer can be shifted or otherwise transformed in GIMP and there may be other ways of doing this.

Of course, units other than cm can be used and the values don’t have to be integers.

If I set guide lines and then try to do a rotate I get the, in this case, white grid lines which are very visually confusing to me.

If I turn off the grid lines all the lines disappear including the ones I set. I just want to keep the lines I set.

Thank you

I don’t use GIMP’s grid feature but if you don’t want the grid lines to be rotated along with the image, then I think it would be better to have them in a separate layer. If, on the other hand, you do want to rotate them along with the image, then you could still have grid lines in a separate layer and rotate both layers. I have no idea why they would change color. My guess is that this has something to do with the way this feature is implemented in GIMP and that it could be avoided by using an image with lines in a separate layer, as I described.

I think in GIMP 2.8 the grid lines that appear when using the rotate tool cannot be changed/removed. Is there any reason not to update to a more recent version of GIMP? Current version is 2.10.38 and does not show grid lines when rotating.

If you don’t want the guide lines that show up with the rotate tool (and other transform tools…) then just set the option in the Tool options:

If I do that then the ones I set as references disappear also and I want the lines I set.

Not for me, the image guides are kept while the Rotate tool guides don’t show: