High Pass Filter-

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

High Pass Filter-

Campbell Barton
Hi, Is there a forum where ppl post scripts? - Just wondering if this is
the appropriate spot.
I do texture editing for 3d gfx, and this Script is very usefull to me.
Its based it on the highpass sharpening. Adds an extra layer so you can
manually adjust the highpass strength by layer opacity.
-  Cam



;
; Highpass Filter
;
; Campbell Barton ([hidden email]) based on work by, Martin Egger ([hidden email])
; (C) 2004, Bern, Switzerland
;
; This plugin was tested with Gimp 2.2
;
; 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.
;
; Define the function
;
(define (script-fu-Enhance-HighPass InImage InLayer InBlur InOpacity InFlatten)
;
    (let*    (
        (Temp2Layer (car (gimp-layer-copy InLayer TRUE)))
        )
;
; Save history          
;
        (gimp-image-undo-group-start InImage)
               
                (gimp-drawable-set-visible InLayer 1)
               
;
        (gimp-image-add-layer InImage Temp2Layer -1)
               
               
                (gimp-invert Temp2Layer)
                (gimp-desaturate Temp2Layer)
        (plug-in-gauss-iir2 TRUE InImage Temp2Layer InBlur InBlur)
        (gimp-layer-set-opacity Temp2Layer InOpacity)
                (gimp-layer-set-mode Temp2Layer GRAIN-MERGE-MODE)
;
; Flatten the image, if we need to
;
        (if (= InFlatten TRUE)
                        (gimp-image-merge-down InImage Temp2Layer 1)
                )
;
; Finish work
;
        (gimp-image-undo-group-end InImage)
        (gimp-displays-flush)
;
    )
)
;
(script-fu-register
    "script-fu-Enhance-HighPass"
    "<Image>/Filters/Enhance/High Pass"
    "Highpass Filter"
    "Campbell Barton ([hidden email])"
    "2005, Campbell Barton"
    "02.4.2005"
    "RGB* GRAY*"
    SF-IMAGE              "The Image"          0
    SF-DRAWABLE           "The Layer"             0
    SF-ADJUSTMENT         "Blur Pixels"         '(100.0 1.0 500.0 1.0 0 2 0)
    SF-ADJUSTMENT         "Layer Opacity"         '(50.0 1.0 100.0 1.0 0 2 0)
    SF-TOGGLE             "Flatten Image"          FALSE
)
;
_______________________________________________
Gimp-developer mailing list
[hidden email]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: High Pass Filter-

Michael Schumacher
Campbell Barton wrote:

> Hi, Is there a forum where ppl post scripts? - Just wondering if this is
> the appropriate spot.

http://registry.gimp.org is the right place for this.


HTH,
Michael

--
The GIMP > http://www.gimp.org      | IRC: irc://irc.gimp.org/gimp
    Wiki > http://wiki.gimp.org     | .de: http://gimpforum.de
Plug-ins > http://registry.gimp.org |
_______________________________________________
Gimp-developer mailing list
[hidden email]
http://lists.xcf.berkeley.edu/mailman/listinfo/gimp-developer
Loading...