/usr/share/gimp/2.0/scripts/torres-analogize.scm is in gimp-plugin-registry 7.20140602ubuntu3.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 | ;
; The GIMP -- an image manipulation program
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
;
; Analogize script for GIMP 2.4
; Copyright (C) 2005 Ismael Valladolid Torres <ivalladt@punkass.com>
;
; Tags: photo, old
;
; Author statement:
;; A script-fu for the GIMP that makes any picture look as if it had
;; been taken using an old analog camera. Exaggerates contrast and
;; saturation and creates a bright and a dark overlay randomly
;; placed. Think of it as kind of a Lomo Kompakt or Kodak instantmatic
;; faking effect. However it still can't make anything to emulate the
;; peculiar chromatism usually achieved using the real thing.
;;
;; Check http://analogize.berlios.de/ for more information.
;
;
; --------------------------------------------------------------------
; Distributed by Gimp FX Foundry project
; --------------------------------------------------------------------
; - Changelog -
;
; --------------------------------------------------------------------
;
; 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 3 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, see <http://www.gnu.org/licenses/>.
;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(define (script-fu-analogize img
drawable
contrast
saturation
bright-opacity
shadow-opacity
duplicate-shadow
flatten
copy)
(let* (
(image 0)
(layer 0)
(image-width 0)
(image-height 0)
(half-image-width 0)
(half-image-height 0)
(center-x 0)
(center-y 0)
(bright-layer 0)
(shadow-layer 0)
(shadow-layer2 0)
(width-factor 0)
(height-factor 0)
)
(set! image (if (= copy TRUE)
(car (gimp-image-duplicate img))
img))
(gimp-image-undo-group-start image)
(set! layer (car (gimp-image-flatten image)))
(set! image-width (car (gimp-image-width image)))
(set! image-height (car (gimp-image-height image)))
(set! half-image-width (/ image-width 2))
(set! half-image-height (/ image-height 2))
(set! width-factor (/ (- 85 (rand 170)) 100))
(set! height-factor (/ (- 85 (rand 170)) 100))
(set! center-x (+ half-image-width (* half-image-width width-factor)))
(set! center-y (+ half-image-height (* half-image-height height-factor)))
(gimp-brightness-contrast layer 0 contrast)
(gimp-hue-saturation layer 0 0 0 saturation)
(set! bright-layer (car (gimp-layer-new image
image-width
image-height
1 _"Brillo" bright-opacity 5)))
(gimp-image-add-layer image bright-layer 0)
(gimp-edit-clear bright-layer)
(gimp-context-set-foreground '(255 255 255))
(gimp-edit-blend bright-layer 2 0 2 100 0 0 FALSE FALSE 0 0 TRUE
center-x center-y
(+ half-image-width center-x) 0)
(set! shadow-layer (car (gimp-layer-new image
image-width
image-height
1 _"Sombra" shadow-opacity 5)))
(gimp-image-add-layer image shadow-layer 0)
(gimp-edit-clear shadow-layer)
(gimp-context-set-foreground '(0 0 0))
(if (= (rand 2) 0)
(begin
(gimp-edit-blend shadow-layer 2 0 0 100 0 0 FALSE FALSE 0 0 TRUE
0 0
center-x center-y)
(gimp-edit-blend shadow-layer 2 0 0 100 0 0 FALSE FALSE 0 0 TRUE
image-width image-height
center-x center-y))
(begin
(gimp-edit-blend shadow-layer 2 0 0 100 0 0 FALSE FALSE 0 0 TRUE
image-width 0
center-x center-y)
(gimp-edit-blend shadow-layer 2 0 0 100 0 0 FALSE FALSE 0 0 TRUE
0 image-height
center-x center-y)))
(cond ((= duplicate-shadow TRUE)
(set! shadow-layer2 (car (gimp-layer-copy shadow-layer 0)))
(gimp-image-add-layer image shadow-layer2 0)))
(cond ((= flatten TRUE)
(gimp-image-flatten image)))
(cond ((= copy TRUE)
(gimp-display-new image)))
(gimp-image-undo-group-end image)
(gimp-displays-flush)
)
)
(script-fu-register "script-fu-analogize"
_"Analogize..."
_"A simple analog camera faking effect"
"Ismael Valladolid Torres <ivalladt@punkass.com>"
"Ismael Valladolid Torres"
"2005"
"RGB*"
SF-IMAGE "The image" 0
SF-DRAWABLE "The layer" 0
SF-ADJUSTMENT _"Contrast" '(20 0 60 1 5 0 0)
SF-ADJUSTMENT _"Saturation" '(20 0 60 1 5 0 0)
SF-ADJUSTMENT _"Bright layer opacity" '(80 0 100 1 10 0 0)
SF-ADJUSTMENT _"Shadow layer opacity" '(100 0 100 1 10 0 0)
SF-TOGGLE _"Duplicate the shadow layer" TRUE
SF-TOGGLE _"Flatten image after processing" TRUE
SF-TOGGLE _"Work on copy" TRUE)
(script-fu-menu-register "script-fu-analogize"
"<Image>/FX-Foundry/Artistic")
|