Re: [Gimp-user] Script-Fu for batch image conversion

2010-07-24 Thread saulgoode
Quoting Dillon : > Sorry for being unclear - when I said "this line" I was referring to: > > (set! num-layers (car (gimp-image-get-layers newimage))) > > > On Sat, Jul 24, 2010 at 9:50 AM, Dillon wrote: >> Here is the code: >> : >> : >> (set! newimage (car (gimp-file-load RUN-NONINTERACTIVE file

Re: [Gimp-user] Script-Fu for batch image conversion

2010-07-24 Thread Dillon
leparts)) >>> (set! xcfname (string-append (unbreakupstr fileparts ".") ".xcf")) >>> (gimp-message "The new filename will be: ") >>> (gimp-message xcfname) >>> ; set image from the file, and then get the first layer and set it to >>> newimage >>&g

Re: [Gimp-user] Script-Fu for batch image conversion

2010-07-24 Thread Dillon
gt;> (set! newimage (car (gimp-file-load RUN-NONINTERACTIVE filename >> filename))) >> (set! num-layers (car (gimp-image-get-layers newimage))) >> (set! layerIDs (cadr (gimp-image-get-layers newimage))) >> >> ; set drawable to the newimage >> (gimp-message &qu

Re: [Gimp-user] Script-Fu for batch image conversion

2010-07-24 Thread Dillon
) > > ; set drawable to the newimage > (gimp-message "Setting the Drawable.") > > (set! drawable (car (gimp-image-flatten newimage))) > > > ; save the drawable from newimage as xcfname > (gimp-message "Saving the new file.") > (gimp-file-sav

Re: [Gimp-user] Script-Fu for batch image conversion

2010-07-24 Thread Kevin Cozens
Dillon wrote: > (set! num-layers (car (gimp-image-get-layers newimage))) > (set! layerIDs (cadr (gimp-image-get-layers newimage))) What error messages do you get when the above lines are included? > (define (batch-save-as-xcf pattern) > (let* ( > (filelist (cadr (file-glob pattern 1))) >

Re: [Gimp-user] Script-Fu for batch image conversion

2010-07-23 Thread Dillon
newimage))) ; save the drawable from newimage as xcfname (gimp-message "Saving the new file.") (gimp-file-save RUN-NONINTERACTIVE newimage drawable xcfname xcfname) (set! filelist (cdr filelist)) ) ) ) Date: Sun, 06 Jun 2010 17:46:15 -0400 From: saulgo...@flash

Re: [Gimp-user] Script-Fu for batch image conversion

2010-06-07 Thread Dillon
That's the conclusion I came to as well. I am still figuring out how to do raw CR2 files, but the script below does handle multi-page TIFFs just fine. It's a PowerShell (Windows) wrapper around ImageMagick. Not elegant, and the formatting on blogger kinda sucks (I'll fix that someday), but here

Re: [Gimp-user] Script-Fu for batch image conversion

2010-06-07 Thread Deniz Dogan
2010/6/6 Dillon : > Someone off-list suggested ImageMagick.  Some googling shows this command: > convert mulitple.tif single%d.tif > > I think this will create multiple files, each representing a page from the > tif. > Since I planned on wrapping all my script-fu in PowerShell, I could insert a > c

Re: [Gimp-user] Script-Fu for batch image conversion

2010-06-06 Thread saulgoode
Quoting Dillon : > The reason I'm writing my own script-fu, rather than using Daves Batch > Processor, is that my TIF files are multi-page, and when I load the image > and flatten it to a drawable, I end up with both pages flattened into one > drawable. I only want one of the pages (I think the f

Re: [Gimp-user] Script-Fu for batch image conversion

2010-06-06 Thread Dillon
Someone off-list suggested ImageMagick. Some googling shows this command: convert mulitple.tif single%d.tif I think this will create multiple files, each representing a page from the tif. Since I planned on wrapping all my script-fu in PowerShell, I could insert a call to imagemagick to create

Re: [Gimp-user] Script-Fu for batch image conversion

2010-06-06 Thread Deniz Dogan
2010/6/6 Dillon : > Thanks Saulgoode, that worked!  It solved both of my problems.  Interesting. >  I'll have to puzzle through why it worked later, but now I'm on to my next > challenge. > The reason I'm writing my own script-fu, rather than using Daves Batch > Processor, is that my TIF files are

Re: [Gimp-user] Script-Fu for batch image conversion

2010-06-06 Thread Dillon
Thanks Saulgoode, that worked! It solved both of my problems. Interesting. I'll have to puzzle through why it worked later, but now I'm on to my next challenge. The reason I'm writing my own script-fu, rather than using Daves Batch Processor, is that my TIF files are multi-page, and when I load

Re: [Gimp-user] Script-Fu for batch image conversion

2010-06-06 Thread saulgoode
Quoting Dillon : > I am trying to perform batch conversions of images, including scanned tifs > (multi-page), JPGs, and .CR2 raw files. > > My workflow is as follows: > 1) scan/acquire "raw" images to disk > 2) batch convert to XCF > 3) hand-edit selected XCFs > 4) batch convert to flattened JPG/P

[Gimp-user] Script-Fu for batch image conversion

2010-06-05 Thread Dillon
Hello folks, I am trying to perform batch conversions of images, including scanned tifs (multi-page), JPGs, and .CR2 raw files. My workflow is as follows: 1) scan/acquire "raw" images to disk 2) batch convert to XCF 3) hand-edit selected XCFs 4) batch convert to flattened JPG/PNG/etc I am workin