Following is my "Urban Acid" Script-Fu program. It attempts to simulate the famous Photoshop Urban Acid action, which dramatically alters the color curves.
The program worked well in GIMP 2.2, but is buggy in v2.4. I am having the following problems: * The first time, it runs but the working layer shows no difference. Indeed, even the mode is not set to overlay. * The second time executed, not seems to happen. Not even a copy layer is created. * GIMP seems to increasingly act weird after that. Scripts may or may not run. The entire experience looks like a memory over run. I am now running GIMP 2.4.1 under Windows, but I saw the same thing in 2.4under Windows and also Ubuntu (Gutsy Gibbon). Thanks for any help. Source follows. Dave -------------------------- ; Urban Acid ; David Hathaway <[EMAIL PROTECTED]> ; ; A script to fake the "Urban Acid" look within The Gimp version 2. ; ; This script is based on: ; http://www.scrapjazz.com/community/jazzclub/showthread.php?t=89073&page=3&pp=15 ; ; 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. ; ; Version 0.5 - first working version ; Version 0.6 - modified to work on GIMP 2.4 (define (urban-acid img drawable) ; set some system variables (let* ( (copy-layer) (splineValue) (splineRed) (splineGreen) (splineBlue) (a) ) ;7) create a duplicate layer of the base layer. (set! copy-layer (car (gimp-layer-copy drawable 0))) (gimp-layer-set-name copy-layer "Copy") (gimp-image-add-layer img copy-layer 0) (define (splineValue) (let* ((a (cons-array 10 'byte))) (set-pt a 0 0 0) (set-pt a 1 44 27) (set-pt a 2 99 117) (set-pt a 3 195 229) (set-pt a 4 255 255) a ) ) (gimp-curves-spline copy-layer VALUE-LUT 10 (splineValue)) (define (splineRed) (let* ((a (cons-array 10 'byte))) (set-pt a 0 0 0) (set-pt a 1 51 6) (set-pt a 2 151 137) (set-pt a 3 204 228) (set-pt a 4 255 255) a ) ) (gimp-curves-spline copy-layer RED-LUT 10 (splineRed)) (define (splineGreen) (let* ((a (cons-array 10 'byte))) (set-pt a 0 0 0) (set-pt a 1 38 31) (set-pt a 2 125 129) (set-pt a 3 197 223) (set-pt a 4 255 255) a ) ) (gimp-curves-spline copy-layer GREEN-LUT 10 (splineGreen)) (define (splineBLue) (let* ((a (cons-array 8 'byte))) (set-pt a 0 0 0) (set-pt a 1 22 33) (set-pt a 2 149 126) (set-pt a 4 255 255) a ) ) (gimp-curves-spline copy-layer BLUE-LUT 8 (splineRed)) (gimp-layer-set-mode copy-layer HARDLIGHT-MODE) (gimp-layer-set-opacity copy-layer 80) ) ; let* ; Flush the display (gimp-displays-flush) ) (script-fu-register "urban-acid" "U_rban Acid" "This script sets the curves based on the Urban Acid formula" "David Hathaway <[EMAIL PROTECTED]>" "(c) David Hathaway" "2007 11 01" "RGB*" SF-IMAGE "Image" 0 SF-DRAWABLE "Layer to start on (unused)" 0 ) (script-fu-menu-register "urban-acid" "<Image>/Filters/Dave77459") ; "<Image>/Script-Fu")
_______________________________________________ Gimp-user mailing list Gimp-user@lists.XCF.Berkeley.EDU https://lists.XCF.Berkeley.EDU/mailman/listinfo/gimp-user