;;; red-eye.scm v0.2 ;;; Copyright (c) 2004 John Hall (jhall@alum.wpi.edu) ;;; ;;; A Script-Fu script for The GIMP to remove red eye. ;;; ;;; ;;; 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA ;;; ;;; ;;; Revision history: ;;; ;;; v0.2: - Modified for The GIMP 2.0pre2 ;;; v0.1: - First public release (define (script-fu-red-eye image drawable) (gimp-image-undo-group-start image) ;; Desaturate the red channel (copied from ;; http://gimpguru.org/download/red-eye.scm) (gimp-image-set-component-active image RED-CHANNEL TRUE) (gimp-image-set-component-active image GREEN-CHANNEL FALSE) (gimp-image-set-component-active image BLUE-CHANNEL FALSE) (gimp-desaturate drawable) (gimp-image-set-component-active image RED-CHANNEL TRUE) (gimp-image-set-component-active image GREEN-CHANNEL TRUE) (gimp-image-set-component-active image BLUE-CHANNEL TRUE) (gimp-levels drawable VALUE-LUT 0 255 0.7 0 255) (gimp-image-undo-group-end image) (gimp-displays-flush)) (script-fu-register "script-fu-red-eye" "/Script-Fu/Selection/Remove Red Eye" "Removes red eye from given selection." "John Hall" "John Hall" "2004" "*" SF-IMAGE "The image" 0 SF-DRAWABLE "The layer" 0)