Script fu [Gimp freaky details and other?]

After a discussion in this thread, I offered to share my implementation of the freaky details method described in the article of @patdavid. Maybe others could add their filters in this thread, too. I know that there was the idea once to share code in a repository but as far as I understand this was not really implemented or is regularly used. Also, I am not a developer and would prefer to keep things simple.

The Gimp filter below generates a new layer that produces the effect in combination with the original background layer. The advantage is that one can afterwards apply a blur locally to the sharpening layer. In this way one can limit the effect to certain regions. The script fu file has to be copied to the “scripts” folder of Gimp and the filter can afterwards be found in the filter menu. The only thing to be set is the blur size.

I have to admit that I don’t code often and have no idea about Gimp scripts. So I just tried to gather information in manpages and examples and put something together. The script works quite fine when Gimp is freshly opened with a new file. However, when working with several open files, the script gets sometimes “confused” with the layer names. So, if someone can improve the code in any way I would certainly appreciate that :wink: . I used a gaussian blur in the script but you might want to replace this with other blur filters.

Freaky_Details.scm (3.1 KB) [This code is licened under the GPLv2]
Edit: The file was changed and now contains the adjustment proposed below by @Jade_NL.

2 Likes

Thanks!

I, eh… ran into a small issue though:

Error: Procedure execution of gimp-image-get-active-drawable failed on invalid input arguments: Procedure ‘gimp-image-get-active-drawable’ has been called with an invalid ID for argument ‘image’

Did some searching and digging and changed this line:

; add gaussian blur
(plug-in-gauss-rle2 1  inImage (car (gimp-image-get-active-drawable 1)) inBlur inBlur)

To this:

; add gaussian blur
(plug-in-gauss-rle2 1  inImage (car (gimp-image-get-active-layer 1)) inBlur inBlur)

gimp-image-get-active-drawable vs gimp-image-get-active-layer

Don’t ask me why this works, the interwebs helped me figure this one out.

Works like a charm for me after this small edit.

1 Like

As I said, I have not much knowledge about this either. The script worked for me (Gimp 2.10). Good that you got it running this fast.

Edit: Maybe your change also fixes this:

Further opportunities:

https://gimplearn.net/viewtopic.php?t=483

GIMP => G`MIC => Details => Freaky details (27-02-2013)


Przesyłanie: urban.still.life-GIMP plugins WIC-LAB_GMIC Freaky.jpg…