GNOME Bugzilla – Bug 578729
gimp-free-select drops pixel from middle of single pixel line
Last modified: 2009-07-14 07:42:23 UTC
Please describe the problem: A GIMP free select leaves a gap in the middle for certain coordinates. Steps to reproduce: 1. Install script diagonal-select4a.scm in your Script-Fu path. 2. Run script "Test diagonal gradient with 4 points (alternative)" from (new) Debug menu. 3. Select > None Actual results: A diagonal single-pixel line is drawn. The pixel at X 49 Y 49 is white. Expected results: A diagonal single-pixel line is drawn. The pixel at X 49 Y 49 is black. Does this happen every time? Yes. Other information: 1. Install script diagonal-select4b.scm in your Script-Fu path. 2. Run script "Test diagonal gradient with 4 points (alternative B)" from (new) Debug menu. 3. Select > None Result: A diagonal single-pixel line is drawn. The pixel at X 49 Y 49 is black. So there is a work-around. The only functional difference is that the coordinates for the line draw the line 1 pixel further off the image in the b version than in the a version.
Created attachment 132531 [details] Script-Fu demonstrating the bug
Created attachment 132532 [details] Script-Fu demonstrating the work-around
These scripts pass a self intersecting polygon to gimp-free-select to create a selection. The difference is that in one case the intersection is exactly at the center of a pixel (thus not part of the selection), whereas in the other is at the corner of four pixels (two of which are inside and two outside of the selection). For me this is not a bug.