Re: [Gimp-user] Printing from a batch

2009-02-26 Thread Decimator Doseven

On Wed Feb 25 13:50:21 PST 2009 Sven Neumann wrote:

>It would help to make some suggestions for the parameters that need to

>be added.

>Until we have changed this, you could work around the missing parameters
>by having your script modify the files print-settings and
>print-page-setup as found in the ~/.gimp-2.6 folder.

Well, the most important parameters would be:
Destination printer, copies, the four margins, DPI, paper size,
and how to fit a large image on a page.
Shrink, crop, tile over multiple pages, or tile multiple images on a page.
Portrait or landscape would also be useful.



  
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] Printing from a batch

2009-02-25 Thread Decimator Doseven

It appears that I was mistaken, and the script used a command that gimp does 
not have:
"file_print_gimp"

http://lists.xcf.berkeley.edu/lists/gimp-user/2006-April/007923.html

I assumed(obviously incorrectly) that the name of the command had changed.

In this case, is this there a command that allows me to change the destination 
printer for gimp?
I have succeeded in making gimp print via a batch, using file-print-gtk, but it 
prints to the last used printer.
I also need a command to modify the margins, as gimp currently cuts off part of 
the image.



Sven Neumann on Tue Feb 24 12:09:08 PST 2009

>What does it not do that you need? I am pretty sure that the API of
>file-print-gtk did not change, so I wonder what those scripts would do
>differently.


  
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


[Gimp-user] Printing from a batch

2009-02-23 Thread Decimator Doseven
Could someone tell me the proper syntax for "file-print-gtk"?

I am building a script to clean up scanned pdfs.  (the originals are carbon 
copies, blech)

I have a working script to clean up tiff files, and am now trying to make it 
work on pdfs.

I want to open the pdf file with gimp, run the operations, and then print it 
back to a pdf file.

I have only been able to find non-working scripts for this purpose.



  
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


Re: [Gimp-user] curves spline batch

2009-02-11 Thread Decimator Doseven
- Original Message 

From: Sven Neumann 
To: Decimator Doseven 
Cc: gimp-user@lists.XCF.Berkeley.EDU
Sent: Tuesday, February 10, 2009 4:11:21 PM
Subject: Re: [Gimp-user]  curves spline batch


On Tue, 2009-02-10 at 13:23 -0800, Decimator Doseven wrote:

>> (gimp-curves-spline image
>> HISTOGRAM-VALUE 6 my-curve)

>You are passing the image ID to the gimp-curves-spline procedure but it
>expects the drawable ID.


The script is now working.  I fixed the issue you mentioned, and also found 
that I needed to change the command I was using to call the script.

The windows batch command I am using to call the script is now:
gimp-console-2.6.exe -i --verbose -b "(color-curve 
\"C:\\gimpbatchtest\\*.tiff\")" -b "(gimp-quit 0)"


And the script itself:

(define (color-curve pattern)
(let* ((filelist (cadr (file-glob pattern 1
(while (not (null? filelist))
(let* ((filename (car filelist))
(image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))
(write filename)
(drawable (car (gimp-image-get-active-layer image
(let* (
(my-curve (make-vector 6 'byte))
)
(vector-set! my-curve 0 0)
(vector-set! my-curve 1 0)
(vector-set! my-curve 2 208)
(vector-set! my-curve 3 17)
(vector-set! my-curve 4 255)
(vector-set! my-curve 5 255)
(gimp-curves-spline drawable
HISTOGRAM-VALUE 6 my-curve)
)
(gimp-file-save RUN-NONINTERACTIVE image drawable filename 
filename)
(gimp-image-delete image))
(set! filelist (cdr filelist)


Again, thanks for all the help, I was utterly clueless before.

-Byron


  
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


[Gimp-user] curves spline batch

2009-02-10 Thread Decimator Doseven
Ok, I have made progress.  It appears that Gimp 2.6 does not like "aset!", so I 
had to change it to "vector-set!" to make gimp take it.
Note this page stating that "aset" was deprecated back in gimp 2.4: 
http://www.gimp.org/docs/script-fu-update.html

Script-fu gives me much better error messages.  With my current script, I get 
this response, which I think means null:
() 

The image does not appear to have been modified at all, so there is still 
something wrong.

Currently, I am using this line, via script-fu, to run my script:

(color-curve "C:\\gimpbatchtest\\*.tiff")


And the script itself:

(define (color-curve pattern)
(let* ((filelist (cadr (file-glob pattern 1
(while (not (null? filelist))
(let* ((filename (car filelist))
(image (car (gimp-file-load RUN-NONINTERACTIVE filename filename)))
(drawable (car (gimp-image-get-active-layer image
(let* (
(my-curve (make-vector 6 'byte))
)
(vector-set! my-curve 0 0)
(vector-set! my-curve 1 0)
(vector-set! my-curve 2 208)
(vector-set! my-curve 3 17)
(vector-set! my-curve 4 255)
(vector-set! my-curve 5 255)
(gimp-curves-spline image
HISTOGRAM-VALUE 6 my-curve)
)
(gimp-file-save RUN-NONINTERACTIVE image drawable filename 
filename)
(gimp-image-delete image))
(set! filelist (cdr filelist)

Thanks in advance.

-Byron



  
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user


[Gimp-user] curves spline batch

2009-02-10 Thread Decimator Doseven
I am attempting to set up a batch that automatically runs gimp-curves-spline on 
a set of images.  However, I have never used Scheme before and therefore am not 
sure why my script is returning "batch command experienced an execution error"

Here is the command I am using to call the script(via a windows .bat file)

gimp-2.6.exe -i --verbose -b "(color-curve \"C:\\gimpbatchtest\\*.tiff\")" -b 
"(gimp-quit 0)"


And the script itself:

  (define (color-curve pattern)
  (let* ((filelist (cadr (file-glob pattern 1
(while (not (null? filelist))
   (let* ((filename (car filelist))
  (image (car (gimp-file-load RUN-NONINTERACTIVE filename 
filename)))
  (drawable (car (gimp-image-get-active-layer image
(gimp-curves-spline RUN-NONINTERACTIVE image HISTOGRAM-VALUE 3 
'(0 0 64 200 128 46))
 (gimp-file-save RUN-NONINTERACTIVE image drawable filename 
filename)
 (gimp-image-delete image))
   (set! filelist (cdr filelist)


Any help will be greatly appreciated, thank you.

-Byron



  
___
Gimp-user mailing list
Gimp-user@lists.XCF.Berkeley.EDU
https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user