Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Modifying DivideScannedImages Batch-Mode
#2
yeah, script-fu death by a thousand parentheses

Maybe a starting point adding a line to set inFileName to the image name. about line 207

Code:
(set! inFileName  (car (gimp-image-get-name img)))

            (set! newFileName (string-append targetDir pathchar inFileName
                                     (substring "00000" (string-length (number->string (+ inFileNumber numextracted))))
                                     (number->string (+ inFileNumber numextracted)) saveString))

Unfortunately that uses the full name including the file extension, so a chunk of code needed to parse the file name - maybe somebody can advise.

That for example on a couple of png test images gives
a.png -> a.png00001.jpg a.png00002.jpg
b.png -> b.png00003.jpg b.png00004.jpg b.png00005.jpg
Reply


Messages In This Thread
RE: Modifying DivideScannedImages Batch-Mode - by rich2005 - Yesterday, 08:27 AM

Forum Jump: