G’MIC gets a Fractalius-like filter, David Tschumperlé answers some questions

G’MIC gets a Fractalius-like filter, David Tschumperlé answers some questions

We haven't covered G'MIC in a while mainly because there were too many releases, and it was difficult to pick one to summarize changes. It's time to talk about G'MIC again.

For those who have been living under a rock for past 3.5 years, G'MIC is a so called metafilter: a plug-in for GIMP that allows creating new filters using a scripting language of its own and comes with over 270 presets. 

G'MIC dialog

And now that the most recent version features a Fractalius-like filter called Rodilius, we asked David Tschumperlé, lead developer of G'MIC, a few questions.

David, I think, a lot of people still remember you as creator of the GREYCstoration plug-in. What was the main reason to start this project and make GREYC part of G'MIC?

Actually, these are two distinct projects with different goals. They only share a common code layer, the CImg Library, a C++ image processing library I'm developing since 1999. GREYCstoration was initially only a small command-line tool for calling one CImg functionality I've developed during my research at the GREYC lab, in order to smooth or inpaint images.

On the other hand, G'MIC has been designed from the start as a full-featured script language wrapping the whole CImg library (so GREYCstoration has indeed become a small part of G'MIC). Both have been released initially as command-line tools only, the plug-ins for GIMP have followed some months later.


At the time of GREYCstoration (2007-2008), I was not familiar with GTK nor the GIMP plug-in API and the initial plug-in code had been provided by Grzegorz Szwoch. He taught me how to code GIMP plug-ins, and also convinced me that GIMP plug-ins will attract much more people than just command-line tools! Hence, I got the motivation to learn GTK+ and then started to code the G'MIC plug-in in late 2008. But in both cases, the plug-ins are only quite limited extensions of the respective command-line tools.

It looks like the G'MIC as a GIMP plug-in (for Windows) is by far the most popular download. Does it somehow affect development priorities re standalone tool?

You are right, but this doesn't change anything in choosing the coding priorities for the G'MIC project. As both the plug-in and the command line tool embed the same script interpreter, they share the same commands, and adding new functions to G'MIC improves then both interfaces at the same time.

Graphic novel effect

Having a plug-in allows to reach more people, and some even discovered the command line tool after having used the plug-in. The GIMP plug-in is a showcase, and now that it is quite stable, it doesn't require hard maintenance work.

What do you personally use the standalone tool for? And what's your own primary use of G'MIC?

Personally, I use the command line tool 'gmic' everyday at work for image conversion, visualization, exploration, and even for simple algorithm prototyping. 'gmic' has replaced the ImageMagick's tool I was using before. It natively manages float-valued images as well as volumetric datasets with arbitrary numbers of channels, and image sequences. So all I can say is we really feel comfortable when using it from the command line (the current 8-bits aspect of GIMP is one limiting input/output factor for the plug-in).

Fractal blossoms with G´MIC

I almost never use the plug-in for GIMP myself, except for testing the inclusion of new filters in it, or for doing interactive demonstrations of the G'MIC capabilities.

There have been discussion on Fractalius for a couple of years now in the G'MIC's Flickr group, and several attempts to replicate the effect, right? Now G'MIC has a Rodilius filter that to some extent replicates the effect. How much work was that and what did it involve?

There is one clever guy, Rod on the GimpChat forum, who posted one day a nice pipeline he designed intending to mimic the Fractalius effect from Redfield. He did that using a filter creator for Photoshop called Filter Forge 3 and asked if this would be possible to do it for GIMP.

G´MIC shell

As far as I know, this guy is not a coder and used FF3, because it allowed him to construct his filter using an easy-to-use visual programming GUI. He did this quite intuitively and it turned out this was a really great idea. I've myself just translated his pipeline into a 10-lines G'MIC code, and it was done. It took then no more than half an hour to get a first version of the 'Rodilius' filter. When one knows how the G'MIC scripting language works, quite complex filters can be written in a very short time. As the plug-in has a simple update mechanism, the filter has been made available for testing a few minutes after his creation, for all the plug-in users.

As far as I can tell, a lot of filters/presets are coming from the Flickr group discussions. Do you think it's a kind of mutual inspiration between you and the community?

Yes, definitely. I've learned a lot about digital photography from the Flick group. I have been always inspired by mathematics for image processing, not so much by artistic considerations. When I wrote G'MIC, my goal was to build a script language whose main strength will be to shorten the writing of image processing procedures. But as it turned out, it fits particularly well also for designing 'artistic' filters.

Whirl drawing effect

Translating the artistic workflows (or only intuitions sometimes) proposed by group users into effective G'MIC filters was a challenging task. Surprisingly, the easiest filters to write turned out to be sometimes more useful than the most complex filters (for instance, the Lab color mixer was one super-easy filter to code, and is quite appreciated).

Also, the Flickr community helped a lot hunting down the bugs, as well as discussed a lot about many aspects of the plug-in GUI.

How many filters in the bundle are direct contributions? Do you think you succeeded making the scripting language accessible for users?

For now on, it's a bit hard to say. All depends if you enable the 'Additional filters' from the external sources, or not. With the default filter bundle (270 right now), I'd say I wrote 95% of them. There are 5 other people who are writing new filters in their own 'filter channel', and I hope this number will increase in the future. I'd like to thank them again, because they are really kind of pioneers!

Anyone can set up a new G'MIC filter channel, and share it with all the other plug-in users. But the fact is the G'MIC language may seem a bit harsh to learn, and there is only very little documentation available out there, for instance, the reference page. These guys just believed enough to the project to accept learning the G'MIC scripting language. That's impressive.

Of course, to me, the language looks coherent, compact and simple, but I'm probably not in the best position to have an objective opinion on this matter. From what I've heard, there are some aspects of the language that would need clarifications.

There is an ongoing work to bring GPU-side rendering to GEGL based, on OpenCL. Will that and the future GEGL integration in GIMP somehow affect your development plans?

To be honest, I'm quite anxious about the full integration of GEGL into the next releases of GIMP. From what I understand, most existing plug-ins will be converted as so-called GEGL processing nodes and I'm not sure about the durability of the other plug-ins which won't be converted. I hope there will be at least a compatibility layer kept to allow the call of 'old' plug-ins. Porting all the features of the current G'MIC plug-in as a GEGL node means probably a quite large amount of work, and I don't think I will be motivated enough to do so. At least, the command line version will always remain.

Concerning the GPU rendering capabilities, this is not something I've planed for G'MIC, but I'm open to any contributions from experts in this domain.

G'MIC is available for Windows, Linux and Mac users as both standalone application and a GIMP plug-in. You can download it here.

Was it useful? There's more:

11 Responses. Comments closed for this entry.

  1. nice interview :) but the end confirms my main fear for GEGL-integration: plugin rot :/

  2. Alexandre Prokoudine 10 October 2011 at 1:42 pm

    Well, we have plug-in rot anyway: Refocus, deskew et al.

  3. Just wanted to pass on my congrats to David and his gem that he gave all GIMP users (and it’s so much more then a GIMP plugin, but that’s really only how I use it).  It literally takes GIMP to the next level; it’s that big of deal.  :)

  4. Congrats David on such a wonderful addition to Gimp.
    His code writing abilities are nothing short of amazing.

    Here is to GMIC and what i am sure is going to be an adventure filled future.  :)

  5. Congrats David from me, too. G’MIC is absolutely amazing and wonderful.


  6. GIMP without G’MIC is like a leopard without his spots.

    Congratulations to you, David, for providing us with this fabulous and creative tool!

    Thank you, Alexandre, for bringing this newsworthy gem to the light.

  7. Thanks to this article I discovered G’MIC ; now I feel my first reflex will be to open it when I’ll need to apply a filter to an image. The preview is much faster and better than most Gimp Filters, so I feel better performances, and also I like the way all is sorted. All my encouragements !

  8. The installation instructions for Mac are clearly wrong and I just don’t know how to proceed.

    GIMP (http://www.gimp.org) is an open-source painting and image retouching
      software which can be extended with additional ‘plug-ins’.
      G’MIC provides such a plug-in, named ‘gmic_gimp’. To install the G’MIC
      plug-in for GIMP, you have to copy the file ‘gmic_gimp’ (Unix) or
      ‘gmic_gimp.exe’ (Windows) to the plug-in folder of your GIMP installation.

      This folder is usually located at:

      - on Unix: ‘$HOME/.gimp-2.x/plug-ins/’ (for local installation),
            or ‘usr/lib/gimp/2.0/plug-ins/’ (for global installation).

      - on Windows: ‘C:\Program Files\GIMP-2.x\lib\gimp\2.0\plugins\’
              (for global installation).

      - on MacOSX: ‘$HOME/Library/Application\ Support/Gimp/plug-ins/’
              (for installation from GimponOSX).

  9. Alexandre Prokoudine 16 December 2012 at 3:48 pm

    @Roy Which folder is missing in your system?

  10. ‘$HOME/Library/Application\ Support/Gimp/plug-ins/’ doesn’t exist on my computer and am not sure that there should be a space in the above, anyway.

  11. Alexandre Prokoudine 25 December 2012 at 8:25 am

    Well, you can open Preferences dialog and lookup your plug-ins folder.