Hi to both,

thanks for your help and thanks for the script! I tried the attached python
script
by using execfile("script.py") from the python-fu console. Unfortunately gimp
(2.6.7 on ubuntu) crashed. Do you have a hint, what I am doing wrong!?
Thanks!
Fab

>On Sat, Jan 2, 2010 at 11:50 AM, Fab <for...@gimpusers.com> wrote:
>> I am new to gimp's scripting and would like to automate the rectangle
>> selection tool by defining the position and size using a script.
>> Afterwards, I would like to extract the selection, 'paste as new image'
and
>> save the image as a png file without compression.
>>
>> It would be nice, if you can give me some hints, how to achieve this.
Maybe,
>> something similar exists already!?
>
>Hi,
>
>I've attached some code here - it's from a similar plug-in that I
>modified to (almost) do what you want.  It will need some work for it
>to be useful, but it should be pretty easy to follow and also modify
>to suit your needs.  I've only given it the barest amount of testing
>with gimp 2.6.6 on linux, but it should be cross-platform in theory
>(as long as Python+GIMP is correctly installed).
>
>Note that the gimp.file_png_save() call is most likely using
>compression - check the procedure browser for the right parameters.
>
>Also, I chose to duplicate/crop/save/destroy rather than
>select/copy/paste new/save/destroy - I just found that method simpler.
>
>Hope this helps and good luck!
>Chris
>
>

-- 
Fab (via www.gimpusers.com)
_______________________________________________
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user

Reply via email to