automatic rebuild by autodist [release 0.95-5mamba;Mon Aug 19 2013]
This commit is contained in:
parent
e0776b70f5
commit
b0e6ea26d2
@ -1,2 +1,4 @@
|
||||
# gimp-script-red-eye
|
||||
|
||||
A gimp script to implement Red-Eye removal technique.
|
||||
|
||||
|
52
gimp-script-red-eye.spec
Normal file
52
gimp-script-red-eye.spec
Normal file
@ -0,0 +1,52 @@
|
||||
%define real_name red-eye
|
||||
|
||||
Name: gimp-script-red-eye
|
||||
Version: 0.95
|
||||
Release: 5mamba
|
||||
Summary: gimp script to implement Red-Eye removal technique
|
||||
Group: Applications/Multimedia
|
||||
Vendor: openmamba
|
||||
Distribution: openmamba
|
||||
Packager: Tiziana Ferro <tiziana.ferro@email.it>
|
||||
URL: http://www.linuxjournal.com/article.php?sid=6567
|
||||
Source: red-eye.scm
|
||||
License: GPL
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-root
|
||||
BuildRequires: gimp-devel >= 2.0
|
||||
Requires: gimp >= 2.0
|
||||
|
||||
%description
|
||||
A gimp script to implement Red-Eye removal technique.
|
||||
|
||||
%prep
|
||||
|
||||
%build
|
||||
|
||||
%install
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
%{__install} -D -m0755 %{SOURCE0} %{buildroot}%{_datadir}/gimp/2.0/scripts/red-eye.scm
|
||||
|
||||
%clean
|
||||
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
|
||||
|
||||
%files
|
||||
%defattr(-, root, root, 0755)
|
||||
%{_datadir}/gimp/2.0/scripts/red-eye.scm
|
||||
|
||||
%changelog
|
||||
* Mon Aug 19 2013 Automatic Build System <autodist@mambasoft.it> 0.95-5mamba
|
||||
- automatic rebuild by autodist
|
||||
|
||||
* Thu Jun 12 2008 Tiziana Ferro <tiziana.ferro@email.it> 0.95-4mamba
|
||||
- update Vendor, Distribution and Packager
|
||||
- update rm -rf script in spec after %install and %clean
|
||||
|
||||
* Wed Apr 20 2005 Alessandro Ramazzina <alessandro.ramazzina@qilinux.it> 0.95-3qilnx
|
||||
- changed installation directory from /usr/lib/gimp to /usr/share/gimp
|
||||
|
||||
* Wed Apr 20 2005 Alessandro Ramazzina <alessandro.ramazzina@qilinux.it> 0.95-2qilnx
|
||||
- rebuild and moved from devel-contrib repository to devel repository
|
||||
|
||||
* Wed Dec 22 2004 Matteo Bernasconi <voyagernm@virgilio.it> 0.95-1qilnx
|
||||
- First Build
|
||||
|
164
red-eye.scm
Normal file
164
red-eye.scm
Normal file
@ -0,0 +1,164 @@
|
||||
; The GIMP -- an image manipulation program
|
||||
; Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
||||
;
|
||||
; 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.
|
||||
;
|
||||
;
|
||||
; red-eye.scm version 0.95 2002/10/06
|
||||
;
|
||||
; CHANGE-LOG:
|
||||
; 0.95 - initial release
|
||||
;
|
||||
; Copyright (C) 2002 Martin Guldahl <mguldahl@xmission.com>
|
||||
;
|
||||
;
|
||||
; Removes red eye
|
||||
|
||||
(define (script-fu-red-eye image
|
||||
drawable
|
||||
radius
|
||||
threshold
|
||||
red
|
||||
green
|
||||
blue)
|
||||
|
||||
|
||||
(let* ((select-bounds (gimp-drawable-mask-bounds drawable))
|
||||
(x1 (cadr select-bounds))
|
||||
(y1 (caddr select-bounds))
|
||||
(x2 (cadr (cddr select-bounds)))
|
||||
(y2 (caddr (cddr select-bounds)))
|
||||
(red-component 0)
|
||||
(green-component 1)
|
||||
(blue-component 2)
|
||||
)
|
||||
|
||||
(gimp-undo-push-group-start image)
|
||||
|
||||
; Select and view the green channel only as it has the best contrast
|
||||
; between the iris and pupil.
|
||||
; - Deselect the Red and Blue channels
|
||||
|
||||
(gimp-image-set-component-active image red-component FALSE)
|
||||
(gimp-image-set-component-active image blue-component FALSE)
|
||||
|
||||
; Use the fuzzy select tool (select contiguous regions) to select the pupils
|
||||
(gimp-fuzzy-select
|
||||
drawable
|
||||
x1 y1
|
||||
threshold 0 TRUE TRUE radius FALSE
|
||||
)
|
||||
|
||||
; Reselect Red and Blue channels
|
||||
(gimp-image-set-component-active image red-component TRUE)
|
||||
(gimp-image-set-component-active image blue-component TRUE)
|
||||
|
||||
; Use the channel mixer to make selected area monochrome
|
||||
(plug-in-colors-channel-mixer
|
||||
;;run_mode
|
||||
1
|
||||
image
|
||||
drawable
|
||||
;;monochrome
|
||||
1
|
||||
(/ red 100) (/ green 100) (/ blue 100) 0 0 0 0 0 0
|
||||
)
|
||||
|
||||
(gimp-selection-clear image)
|
||||
(gimp-undo-push-group-end image)
|
||||
(gimp-displays-flush)
|
||||
)
|
||||
)
|
||||
|
||||
(define (script-fu-red-eye-no-cm image
|
||||
drawable
|
||||
radius
|
||||
threshold
|
||||
)
|
||||
|
||||
|
||||
(let* ((select-bounds (gimp-drawable-mask-bounds drawable))
|
||||
(x1 (cadr select-bounds))
|
||||
(y1 (caddr select-bounds))
|
||||
(x2 (cadr (cddr select-bounds)))
|
||||
(y2 (caddr (cddr select-bounds)))
|
||||
(red-component 0)
|
||||
(green-component 1)
|
||||
(blue-component 2)
|
||||
)
|
||||
|
||||
(gimp-undo-push-group-start image)
|
||||
|
||||
; Select and view the green channel only as it has the best contrast
|
||||
; between the iris and pupil.
|
||||
; - Deselect the Red and Blue channels
|
||||
|
||||
(gimp-image-set-component-active image red-component FALSE)
|
||||
(gimp-image-set-component-active image blue-component FALSE)
|
||||
|
||||
; Use the fuzzy select tool (select contiguous regions) to select the pupils
|
||||
(gimp-fuzzy-select
|
||||
drawable
|
||||
x1 y1
|
||||
threshold 0 TRUE TRUE radius FALSE
|
||||
)
|
||||
|
||||
; Reselect Red and Blue channels
|
||||
(gimp-image-set-component-active image red-component TRUE)
|
||||
(gimp-image-set-component-active image blue-component TRUE)
|
||||
|
||||
; Now desaturate the Red channel
|
||||
(gimp-image-set-component-active image red-component TRUE)
|
||||
(gimp-image-set-component-active image green-component FALSE)
|
||||
(gimp-image-set-component-active image blue-component FALSE)
|
||||
(gimp-desaturate drawable)
|
||||
(gimp-image-set-component-active image red-component TRUE)
|
||||
(gimp-image-set-component-active image green-component TRUE)
|
||||
(gimp-image-set-component-active image blue-component TRUE)
|
||||
|
||||
(gimp-selection-clear image)
|
||||
(gimp-undo-push-group-end image)
|
||||
(gimp-displays-flush)
|
||||
)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-red-eye"
|
||||
_"<Image>/Script-Fu/Selection/Red Eye..."
|
||||
"Removes red eye; given selection is seed.\nNeeds the channel-mixer plug-in."
|
||||
"Martin Guldahl <mguldahl@xmission.com>"
|
||||
"Martin Guldahl"
|
||||
"2002/10/05"
|
||||
"*"
|
||||
SF-IMAGE "Image" 0
|
||||
SF-DRAWABLE "Drawable" 0
|
||||
SF-ADJUSTMENT _"Radius" '(8 0 100 .2 1 1 1)
|
||||
SF-ADJUSTMENT _"Threshold" '(40 0 255 1 1 1 1)
|
||||
SF-ADJUSTMENT _"Red" '(10 0 100 1 1 1 1)
|
||||
SF-ADJUSTMENT _"Green" '(60 0 100 1 1 1 1)
|
||||
SF-ADJUSTMENT _"Blue" '(30 0 100 1 1 1 1)
|
||||
)
|
||||
|
||||
(script-fu-register "script-fu-red-eye-no-cm"
|
||||
_"<Image>/Script-Fu/Selection/Red Eye Desaturate..."
|
||||
"Removes red eye; given selection is seed."
|
||||
"Martin Guldahl <mguldahl@xmission.com>"
|
||||
"Martin Guldahl"
|
||||
"2002/10/05"
|
||||
"*"
|
||||
SF-IMAGE "Image" 0
|
||||
SF-DRAWABLE "Drawable" 0
|
||||
SF-ADJUSTMENT _"Radius" '(8 0 100 .2 1 1 1)
|
||||
SF-ADJUSTMENT _"Threshold" '(40 0 255 1 1 1 1)
|
||||
)
|
Loading…
Reference in New Issue
Block a user