I have a script-fu which works nicely in the standard mode.  Its
transforms pictures into a customized "old fashioned" look with the
effortlessy.

I just can't figure out the command line which will get the Gimp (I
upgraded to bleeding-edge 1.1.23 because 1.0.4 wasn't doing it) to
properly run my script.

A batch script is waiting to accept this command line so it can
transform a few hundred pictures while I sleep.

Any help would be greatly appreciated.

Thanks,
Daniel Herring
[EMAIL PROTECTED]

P.S.  Here's the script (Blazenly hacked from Chris's old-photo
script...)

;
; old-photo
;
;
; Chris Gutteridge ([EMAIL PROTECTED])
; At ECS Dept, University of Southampton, England.

; This program is free software; you can redistribute it and/or modify
; it under the terms of the GNU General Public License as published by
; the Free Software Foundation; either version 2 of the License, or
; (at your option) any later version.
; 
; This program is distributed in the hope that it will be useful,
; but WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
; GNU General Public License for more details.
; 
; You should have received a copy of the GNU General Public License
; along with this program; if not, write to the Free Software
; Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

; Define the function:

(define (script_fu_CMFilter inFile outFile noise)

        (set! inImage (car (gimp-file-load 1 inFile inFile)))
        (set! theImage inImage)
        (set! theLayer (car (gimp-image-flatten theImage)))

        (gimp-by-color-select theLayer '(255 0 255) 0 2 0 0 0 0) ;Pull
out the transparency color
        (gimp-selection-invert theImage)

        (begin (plug-in-noisify TRUE theImage theLayer TRUE noise noise
noise noise)
                (gimp-desaturate theLayer)
                (gimp-brightness-contrast theLayer -20 -40)
                (gimp-color-balance theLayer 0 TRUE 30 0 -30)
        )

    (gimp-selection-none inImage)
;       (gimp-display-new theImage)
;       (gimp-displays-flush theImage)
        (set! theLayer (car (gimp-image-flatten theImage)))
        (file-bmp-save 1 theImage theLayer outFile outFile)
        (gimp-layer-delete theLayer)
        (gimp-image-delete theImage)
)

; Register the function with the GIMP:

(script-fu-register
    "script_fu_CMFilter"
    "<Toolbox>/Xtns/Script-Fu/Decor/CMFilter"
    "This script is being designed to automatically add graininess to a
picture and switch the colors to those of an old photo"

    "Daniel Herring"
    "2000, Daniel Herring / EECS dept, University of Kansas, USA"
    "15th June 2000"
    "RGB RGBA GRAY GRAYA"
    SF-VALUE "Input File" "\"/home/nuntius/Desktop/CMDemoPics/337.bmp\""
        SF-VALUE "Output File"
"\"/home/nuntius/Desktop/CMDemoPics/test.bmp\""
    SF-VALUE "Noise" "0.3"
)

Reply via email to