Post Reply 

Vector input for polygon selection

Feb 11, 2018, 19:39 (This post was last modified: Feb 11, 2018 19:40 by ss32.)
Post: #1
Vector input for polygon selection
I'm writing a plugin to call python-fu-heal-selection with inputs of the file and the points defining the polygon selection, but cannot get the polygon selection to work. I have tried using the square polygon select and it works fine, but the generic polygon selection does not accept my input; what's wrong with my script?

    (heal-select points point_count)
            (image         (car (gimp-file-load RUN-NONINTERACTIVE "tmp.jpg" "tmp.jpg")))
            (active-layer     (car (gimp-image-get-active-layer image)))            
        ;(gimp-image-select-rectangle     image CHANNEL-OP-ADD 122 67 138 81)    
        (set! active-layer (car (gimp-image-get-active-layer image)))    
        (define path-points (list->vector points))
        (gimp-image-select-polygon     image CHANNEL-OP-ADD point_count path-points)
        (python-fu-heal-selection     RUN-NONINTERACTIVE     
        (display points)
        (gimp-file-save RUN-NONINTERACTIVE image active-layer  "tmp2.jpg" "tmp2.jpg")
        (gimp-image-delete image)

With the command line input:
gimp -i -b "(heal-select '(122. 67. 138. 67. 138. 81. 122. 81. 122. 67.) 5)" -b "(gimp-quit 0)"

I have tried removing '(define path-points (list->vector points))' and passed it the points as #(1 2 3 4) and still get an error message hinting at the fact that the polygon isn't closed or is empty.
Find all posts by this user
Quote this message in a reply
Feb 11, 2018, 20:59
Post: #2
RE: Vector input for polygon selection
Why did you choose to join a forum that is so obviously dead and abandoned to spammers?

Better to join
Folk who were here have moved to that forum
Find all posts by this user
Quote this message in a reply
Post Reply 

Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Heal Selection / Resynthesizer Errors jitblass 1 1,249 Nov 7, 2017 13:56
Last Post: paynekj
  Cant get Heal Selection to work ianp5a 1 817 Oct 9, 2014 20:04
Last Post: rich2005
  selection into pixels + gimp_image_get_layers t4u 1 885 Sep 20, 2014 22:07
Last Post: t4u
  mouse coordinate as input t4u 1 838 Sep 18, 2014 17:37
Last Post: t4u
  Polygon selection in script CarpetFarmer 1 1,093 May 21, 2014 00:30
Last Post: CarpetFarmer

Forum Jump:

GIMP ForumPortalArchiveContactTermsRSS