Michael Schumacher writes:
 > the "erase every other row" script-fu seems to be
 > broken. Sometimes, the wrong row is deleted. A sample image showing
 > this effect is available here:
 > http://www.gimp.de/1044969327/1045147200/1045173183/streifen.png

Jean-Louis Hamel writes:
 > Conclusion: there is a bug in the last version of GTK+, probably a 
 > rounding error when computing the dimensions of a selection rectangle 
 > (or perhaps the feather option always applied...).

I can confirm this bug, but I find it very hard to believe that it
would be caused by some bug in GTK+. GIMP's selections (especially
when created programmatically, from script-fu, and not via user input)
have nothing to do with GTK+.

It's easy to demonstrate the essence of this bug by creating a small
image, say 10x20 pixels, zoom it up so you can see the pixels, fill it
with black, and enter in the Script-Fu console:

; (this is a comment) Show the image's ID, assuming you have only one
; image open. If this is a fresh GIMP, it's typically 0
(aref (cadr (gimp-image-list)) 0)

; Show its single layer's drawable ID. Typically 2.
(gimp-image-active-drawable <image>)
; where <image> is the number printed above

(gimp-rect-select <image> 0 12 10 1 REPLACE FALSE 0)
(gimp-edit-clear <drawable>)

This should clear pixel row 12 to white, and does so.

(gimp-rect-select <image> 0 14 10 1 REPLACE FALSE 0)
(gimp-edit-clear <drawable>)

This should clear pixel row 14, but in fact clears row 13!

Has anybody noticed this with a recent CVS GIMP 1.2 on Unix?


Gimp-developer mailing list

Reply via email to