; Scale 524 is a script for The GIMP ; ; Description: scales the image down to 525x393 and applies unsharp mask in two steps ; ; Copyright (C) 2004 Dr. Martin Rogge ; Modified by Yop Nono from scaling 25% to 50% ; and Tanked Up Underwater Imaging add scaling to 524 x 393 ; ; 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. ; Only tested on v2.2.11 ; define script name and variables (define (script-scale524 img draw) ; start an undo for rescale (gimp-image-undo-group-start img) ; flatten image (gimp-image-flatten img) ; set the width and height scaling, in this case 2 which is divide by 2 (50%) (set! width (/ (car (gimp-image-width img)) 2)) (set! height (/ (car (gimp-image-height img)) 2)) ; scale the image to 50% (gimp-image-scale img width height) ; end the undo for rescale (gimp-image-undo-group-end img) ; set image to action (set! draw (car (gimp-image-get-active-drawable img))) ; unsharp mask image to Radius 1.0 Amount 0.3 Threshold 0 (plug-in-unsharp-mask 1 img draw 1.0 0.3 0) ; start an undo for rescale (gimp-image-undo-group-start img) ; flatten image (gimp-image-flatten img) ; scale the image to desired size, in this case width 524 and height 393 (gimp-image-scale img 524 393) ; end the undo for rescale (gimp-image-undo-group-end img) ; set image to action (set! draw (car (gimp-image-get-active-drawable img))) ; unsharp mask image to Radius 1.0 Amount 0.3 Threshold 0 (plug-in-unsharp-mask 1 img draw 1.0 0.3 0) ; clean (gimp-displays-flush) ) (script-fu-register "script-scale524" _"/Script-F_u/_Underwater Photos/Scale _524x393" "Scale 2xxx width image to 524x393 and unsharp mask (Radius 1.0 Amount 0.3 Threshold 0) in two steps" "www.tankedup-imaging.com" "Tanked Up Underwater Imaging" "08 July 2006" "RGB*" SF-IMAGE "Image" 0 SF-DRAWABLE "Drawable" 0 )