After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 699738 - Grid size not consistent
Grid size not consistent
Status: RESOLVED DUPLICATE of bug 588512
Product: GIMP
Classification: Other
Component: General
2.8.4
Other All
: Normal minor
: ---
Assigned To: GIMP Bugs
GIMP Bugs
: 730429 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2013-05-06 05:39 UTC by harri_pellikka
Modified: 2014-05-21 18:43 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description harri_pellikka 2013-05-06 05:39:52 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.
Comment 1 Michael Schumacher 2013-05-06 10:27:18 UTC
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.
Comment 2 Michael Natterer 2013-05-06 11:24:02 UTC
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.
Comment 3 Michael Schumacher 2013-05-06 13:16:54 UTC
Unit-dependent grid spacing is handled in bug #588512.

Not sure if this applies here, though - harri?
Comment 4 harri_pellikka 2013-05-06 13:32:41 UTC
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.
Comment 5 harri_pellikka 2013-05-06 13:35:02 UTC
Oh, forgot to mention, my grid size defaults to 16x16. Changing the grid size to, say, 17x17 and back to 16x16 fixes the problem.
Comment 6 jimbo1qaz 2013-06-08 19:10:20 UTC
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.
Comment 7 jimbo1qaz 2013-06-08 22:23:49 UTC
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.
Comment 8 jimbo1qaz 2013-10-15 03:49:56 UTC
Any progress?
Comment 9 Michael Natterer 2014-02-07 22:34:46 UTC
Harri, is this the same as bug 588512 ?
Comment 10 Michael Natterer 2014-05-21 08:04:52 UTC
*** Bug 730429 has been marked as a duplicate of this bug. ***
Comment 11 Michael Natterer 2014-05-21 18:42:53 UTC
And yes this is the same as bug 588512.

*** This bug has been marked as a duplicate of bug 588512 ***