Hi, "dd.galimberti@xxxxxxxxx" <dd.galimberti@xxxxxxxxx> writes: > I would like to highlight my modifications to the Chris Gutteridge's script "old-photo". > The modifications are little but (IMHO) very useful and consists in the addition of border-size adjustment and mottle-size adjustment. > I have seen that one of that modifications (border size) is request in the "list of enhancement proposals" of gimp's bugzilla(http://bugzilla.gnome.org/show_bug.cgi?id=62087) and I worked on that modifications before that request... (the request date is 2001-10-10 and my script's date is 2001-01-16). well, we can't include the script as is but it is easy to do the necessary changes. While doing them I wondered if it is really necessary to have a toggle to enable the border if there's a border size slider where you can set the border to zero. Same goes for Mottle Size. BTW, what is this Mottle thing supposed to be? It looks horrible and I wonder if this is because some part of gimp-1.3 doesn't work as it used to do. Anyway, below is my version of the script. Before inclusion in gimp-1.3, I'd like to change the PDB and menu names from old_photo_2 back to old_photo: Salut, Sven ; ; old-photo ; ; ; Chris Gutteridge (cjg@xxxxxxxxxxxxxxx) ; 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. ; --------------------------------------------------------------------- ; Davide Galimberti (dgali@xxxxxxxxxxxxx) ; 16-jan-2001 At Torino, Italy. ; ; Added 'Border Size' adjustment ; Added 'Mottle Size' adjustment ; ; ; Special thanks to Daniele Medri (madrid @ linux . it) ; --------------------------------------------------------------------- ; Define the function: (define (script-fu-old-photo-2 inImage inLayer inDefocus BorderSize inSepia MottleSize inCopy) (gimp-selection-all inImage) (set! theImage (if (= inCopy TRUE) (car (gimp-image-duplicate inImage)) inImage) ) (set! theLayer (car (gimp-image-flatten theImage))) (if (= inDefocus TRUE) (plug-in-gauss-rle TRUE theImage theLayer 1.5 TRUE TRUE) () ) (if (> BorderSize 0) (script-fu-fuzzy-border theImage inLayer '(255 255 255) BorderSize TRUE 8 FALSE 100 FALSE TRUE) () ) (set! theLayer (car (gimp-image-flatten theImage))) (if (= inSepia TRUE) (begin (gimp-desaturate theLayer) (gimp-brightness-contrast theLayer -20 -40) (gimp-color-balance theLayer 0 TRUE 30 0 -30) ) () ) (set! theWidth (car (gimp-image-width theImage))) (set! theHeight (car (gimp-image-height theImage))) (if (> MottleSize 0) (begin (set! mLayer (car (gimp-layer-new theImage theWidth theHeight RGBA_IMAGE "Mottle" 100 DARKEN-ONLY))) (gimp-image-add-layer theImage mLayer 0) (gimp-selection-all theImage) (gimp-edit-clear mLayer) (gimp-selection-none theImage) (plug-in-noisify TRUE theImage mLayer TRUE 0 0 0 MottleSize) (plug-in-gauss-rle TRUE theImage mLayer 5 TRUE TRUE) (set! theLayer (car(gimp-image-flatten theImage))) ) () ) (if (= inCopy TRUE) (begin (gimp-image-clean-all theImage) (gimp-display-new theImage) ) () ) (gimp-selection-none inImage) (gimp-displays-flush theImage) ) ; Register the function with the GIMP: (script-fu-register "script-fu-old-photo-2" _"<Image>/Script-Fu/Decor/Old Photo 2..." "Makes the image look like an old photo (more configurable)" "Chris Gutteridge - Modification by Davide Galimberti (dgali@xxxxxxxxxxxxx)" "1998, Chris Gutteridge / ECS dept, University of Southampton, England. - 2001, Davide Galimberti (dgali@xxxxxxxxxxxxx)" "16th April 1998" "RGB* GRAY*" SF-IMAGE "The Image" 0 SF-DRAWABLE "The Layer" 0 SF-TOGGLE _"Defocus" TRUE SF-ADJUSTMENT _"Border Size" '(20 0 200 1 10 0 1) SF-TOGGLE _"Sepia" TRUE SF-ADJUSTMENT _"Mottle Size" '(0.5 0 10 0.1 10 2 1) SF-TOGGLE _"Work on Copy" TRUE )