Urban Acid script v 0.6.5
This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.
This is a read-only list on gimpusers.com so this discussion thread is read-only, too.
| Urban Acid script v 0.6.5 | Dave 77459 | 08 Nov 17:30 | 
Urban Acid script v 0.6.5
Well, this version seems to work cleanly under GIMP 2.4.1 (Windows). I got a new definition of set-pt from a different source, but it looks exactly the same. I moved the (define outside the main (let* and removed the declaration of (a). I'll test to see if it runs under Ubuntu (2.4.0) when I get home.
Dave
------
; Urban Acid
; David Hathaway 
;
; 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
; Version 0.6.5 - modified to work on GIMP 2.4.1
(define (urban-acid img drawable)
  ; compatibility hack
  ; http://www.lefinnois.net/scriptfu_gimp24/chrominium.scm
  (define (set-pt a index x y)
      (begin
          (aset a (* index 2) x)
          (aset a (+ (* index 2) 1) y)
       )
  )
  ; set some system variables
  (let*
       (
          (copy-layer)
          (splineValue)
          (splineRed)
          (splineGreen)
          (splineBlue)
       )
;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 "
                    "(c) David Hathaway"
                    "2007 11 08"
                    "RGB*"
                    SF-IMAGE    "Image"         0
                    SF-DRAWABLE "Layer to start on (unused)" 0
                    )
(script-fu-menu-register "urban-acid"
                         "/Filters/Dave77459")

    
    
    




  
  