Many thanks! Your advice was VERY helpful and saved many hours of head
banging on the wall.

After some more edits, I've got my script working perfectly. My only
remaining question now is if there is a way to disable the Gimp Output
cmd window that appears in Windows XP when running in batch mode. I
plan to set it up as an automated job, and I don't want windows being
flooded with cmd windows that say "Press a key to close this window".
Any way to disable the window or have it close automatically when the
script finishes?

> ------------------------------
>
> Message: 3
> Date: Tue, 08 Dec 2009 11:12:43 -0500
> From: saulgo...@flashingtwelve.brickfilms.com
> Subject: Re: [Gimp-user] Help scripting transform and copy/paste        for
>        photobooth automation?
> To: gimp-user@lists.XCF.Berkeley.EDU
> Message-ID:
>        <20091208111243.oct60j1bkssog...@flashingtwelve.brickfilms.com>
> Content-Type: text/plain;       charset=ISO-8859-1;     DelSp="Yes";
>        format="flowed"
>
> The greatest problem with your code is that 'gimp-image-resize' does
> NOT scale the image to a different size, it merely changes the canvas
> size of the image. If you want to scale your "captured" image, you
> should use 'gimp-image-scale' or 'gimp-image-scale-full'.
>
> Also, there is not much point to performing a rectangle select on the
> target image. I suspect that your intent in doing so is to have the
> upper-left corner of the pasted buffer align with the upper-left
> corner of the selection; however, this is not how 'gimp-edit-paste'
> works.
>
> Instead, you should change the offsets of the floating selection after
> pasting:
>
>   (set! sel-float (car (gimp-edit-paste drawable FALSE)))
>   (gimp-layer-set-offsets sel-float 20 20)
>   (gimp-floating-sel-anchor sel-float)
>
> As long as your copy buffer is the proper size, there is no need to
> perform a rectangle select of the targeted region. However, if you'd
> rather be absolutely certain that nothing outside the targeted region
> gets modified, you should select the region and use the Paste Into
> option of 'gimp-edit-paste' (it is still necessary to change the
> offsets).
>
>   (gimp-rect-select image 20 20 563 368 REPLACE 0 0)
>   (set! sel-float (car (gimp-edit-paste drawable TRUE)))
>   (gimp-layer-set-offsets sel-float 20 20)
>   (gimp-floating-sel-anchor sel-float)
>
_______________________________________________
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user

Reply via email to