GNOME Bugzilla – Bug 699738
Grid size not consistent
Last modified: 2014-05-21 18:43:17 UTC
If I enable the grid and set it to, say, 16x16 pixels, without any offset, the grid will not be consistent. Some cells may be 15 pixels wide, while majority is 16. These smaller cells appear anywhere on the canvas, not just the edges. A workaround is to go to the grid settings, set the offset to something, click OK, and go back to the grid settings and change the offset back to zero.
Can you reproduce this reliably? If the column or row of 15px is always at the same location for some image size, it could help to spot that - right now I'm looking at a default 640x400px image with grid set to 16x16px without any obvious defect.
There is an older bug about the same, and it was about the image's unit causing the off-by-ones. We clearly need a numerically stable way of doing the grid stuff.
Unit-dependent grid spacing is handled in bug #588512. Not sure if this applies here, though - harri?
I could reproduce it by doing this: Create a new canvas, 1600 pixels wide, 900 pixels high. Show grid, set it to 16x16. If you go and check the rightmost edge, there's two-pixel margin, even though with 16-pixel grid and 1600 pixels of width on the canvas, it should be exactly 100 grid cells. I chased the horizontal row, and seems that the first one from the left is 15 pixels wide, and the cell starting from between 991th and 1006th pixels is also 15 pixels wide. I also tried it out with a simpler canvas, 48x48, and the top-left cell in the grid is both 15 pixels wide and 15 pixels high, leaving a one-pixel marging to the right and the botttom edges.
Oh, forgot to mention, my grid size defaults to 16x16. Changing the grid size to, say, 17x17 and back to 16x16 fixes the problem.
I also have a similar problem. The grid size is set by (modified) default to 16x16. I change it to 64x64 and the first row is only 63 units TALL. I don't know if it already happened before. Windows 7 x64 with GIMP 2.8.4 on Ivy Bridge CPU.
And the grid sometimes changes when I move between the buttons around the grid configuration dialog. For example, I set the grid size to 8, click on a textbox or button and the grid shows up correctly. I then click on another textbox or button, and the grid shifts one pixel up and left. And for some reason, snap-to-grid and the move tool don't work properly. That's probably another bug, though.
Any progress?
Harri, is this the same as bug 588512 ?
*** Bug 730429 has been marked as a duplicate of this bug. ***
And yes this is the same as bug 588512. *** This bug has been marked as a duplicate of bug 588512 ***