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?

Code:
(define
    (heal-select points point_count)
    
    (let*
        (
            (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     
                                        image
                                        active-layer
                                        3
                                        0
                                        1)                                            
        (display points)
        (gimp-file-save RUN-NONINTERACTIVE image active-layer  "tmp2.jpg" "tmp2.jpg")
        (gimp-image-delete image)
    
    )
)

With the command line input:
Code:
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
https://www.gimp-forum.net
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 584 Nov 7, 2017 13:56
Last Post: paynekj
  Cant get Heal Selection to work ianp5a 1 385 Oct 9, 2014 20:04
Last Post: rich2005
  selection into pixels + gimp_image_get_layers t4u 1 486 Sep 20, 2014 22:07
Last Post: t4u
  mouse coordinate as input t4u 1 471 Sep 18, 2014 17:37
Last Post: t4u
  Polygon selection in script CarpetFarmer 1 603 May 21, 2014 00:30
Last Post: CarpetFarmer

Forum Jump:


GIMP ForumPortalArchiveContactTermsRSS