[Gimp-developer] Translate Weirdness

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Sven -

Code snippet:

 (while (< y height)

	     (gimp-rect-select inImage 0 0 width y
			       REPLACE FALSE 0) ; select some pixels
	     (gimp-edit-copy maskchannel)	; copy the selection
	     (gimp-selection-translate inImage 0 y) ; shift down
	     (gimp-floating-sel-anchor
	      (car
	       (gimp-edit-paste maskchannel FALSE))) ; and paste back

	     (set! y (+ y y))		; move down by as much as we did
	     )

The snippet above no longer has the anomaly at y = 256; instead it's around y = 150.  

The snippet below has the anomaly at y = 2 ^ n:


 (while (< y height)

	     (gimp-rect-select inImage 0 0 width y
			       REPLACE FALSE 0) ; select some pixels
	     (gimp-edit-copy maskchannel)	; copy the selection
	     (gimp-selection-translate inImage 0 y) ; shift down
	     (gimp-floating-sel-anchor
	      (car
	       (gimp-edit-paste maskchannel TRUE))) ; and paste back

	     (set! y (+ y y))		; move down by as much as we did
	     )

The location of the anomaly depends on the second argument to gimp-edit-paste, which I don't really understand anyway.

The problem does not arise when the image's y dimension is a power of 2.  (Or maybe it's some multiple of the step size:  the initial step I've been using has been 4).

To make life more interesting, I can't find it when the initial step size is 5.

I'll continue to research this and file a bug report when I can figure out what's really going on.

-- 
--Jeff

Jeff Trefftzs <trefftzs@xxxxxxxx>
http://www.tcsn.net/trefftzs			Home Page
http://gug.sunsite.dk/gallery.php?artist=68	Gimp Gallery
http://trefftzs.topcities.com/home.html		Photo galleries





[Index of Archives]     [Video For Linux]     [Photo]     [Yosemite News]     [gtk]     [GIMP for Windows]     [KDE]     [GEGL]     [Gimp's Home]     [Gimp on GUI]     [Gimp on Windows]     [Steve's Art]

  Powered by Linux