Advanced samplers for GEGL to be crowdfunded

Advanced samplers for GEGL to be crowdfunded

Last week Nicolas Robidoux launched a personal fundraiser. He aims to implement advanced samplers in GEGL — the new GIMP's image processing engine.

Supposing you are not all that tech savvy. Why should you care?

What's a sampler and why is it useful?

Simply put, a sampler (or interpolator) is what an image editor uses to figure out how to represent the same picture when you scale it up (enlarge) or down (reduce) or rotate it.

E.g. when you create a smaller version of an image, you want it too look exactly like the original: sharp, with distinctive edges. That doesn't always work.

The problem is: no interpolation method is perfect. Some are too simplistic to do any good job at all, others produce sharp images at the expense of introducing visible artefact's like halo around edges of objects. But some methods manage to handle the sharpness/artifacts balance well enough. And that's what GIMP needs.

Prior work

It started with a GIMP plug-in called Upsize that was written in 2008 by Adam Turcotte and Nicolas Robidoux. The plug-in implemented an early version of upscaling algorithms. An illustration of its use is below.

1 — stock linear Interpolation with GIMP, 2 — Upsize Smooth interpolation, 3 — Upsize Sharp interpolation

You can still use it to get a basic idea about the kind of improvements. But bear in mind that the present day interpolation methods are far ahead of that. One might say, those are outdated prototypes.

After publishing the plug-in Nicolas was notified about GEGL which resulted in a Google Summer of Code 2009 project. Two students, Adam Turcotte and Eric Daoust, were mentored by Nicolas and implemented a few advanced samplers for downscaling and upscaling.

The LoHalo (read as "low halo") sampler, as the most complete one, is already available in GIMP's user interface (in the unstable version). But the project had to move further and explore even better methods. Which brings us to the fundraiser.

The plan

What's nice about this fundraiser is that Nicolas split the project into several phases, estimated how long it would take to complete each of them and set financial goals accordingly. That way, even if he doesn't get all the money, useful code will still be added to GEGL and GIMP, step by step.

The proposed interpolation methods are well described at the fundraiser page, but to summarize:

  1. Improve the quality of the existing LoHalo method and rename it to NoHalo;
  2. Improve the way resampling is applied during transformation;
  3. Implement new, much better samplers that produce sharp images with little-to-no artifacts, and make them available in GIMP's UI;
  4. Create benchmarks for testing all the code.

Right now the whole project is estimated as $5550 worth, with $333 out of $900 collected for the first milestone.

On a personal note, LoHalo is reason #1 I use the unstable version of GIMP: it's the fastest way to get reasonably looking downscaled screenshots with readable text.

Also, the second step is already partially done in Git master.


As fundraising becomes more common, the concern about credibility of developers grows. What's up with that here?

Nicolas has been participating in development of GEGL for the past 3+ years. As already mentioned, in 2009 he mentored two Google Summer of Code students who wrote initial versions of advanced samplers for GEGL.

He has commit/push access to source code repositories and uses it quite often (421 commits to GEGL as of publishing this article). You can check his activity by visiting Git web interface.

Nicolas is also active in projects like ImageMagick (176 commits) and VIPS (124 commits) where he works on interpolation methods and their threaded implementation.

Summing up

If you use GIMP for applying any kind of transformations to images like scaling, rotating or adjusting perspective, you will directly benefit from supporting this fundraiser. The code is submitted directly to the main development branch of GEGL, so you can test improvements in GIMP 2.9 the moment they are made available.

You can reach Nicolas on #gegl and #gimp IRC channels to talk about his work. His nickname is "nicolas", and he's in GMT -5.00 timezone.

Was it useful? There's more:

13 Responses. Comments closed for this entry.

  1. I don’t understand why it’s so complicated ? why not set an official fund project on kickstarter or indigogo ?
    with simple term like “create more sharp image with gimp with “xxxx” plugins or “gimp need to be more precise”......or help us to improve gimp to the pro level ....

  2. Alexandre Prokoudine 05 December 2012 at 11:05 pm

    The choice of a crowdfunding platform is a bit strange IMO, as it doesn’t provide as much exposure, but if it works for the developer, then why not?

  3. Alexandre: a crowdfunding platform itself rarely provides exposure. I can say this from experience: I’ve tried helping multiple projects get coverage, because the money just won’t flow automatically while the project creator sits and waits with their hands crossed. What does matter is social media and news site exposure, like this great LGW story!

    To reach $5550, this project needs constant media visibility and hammering to the brains of GIMP users by their peers.

    Take the Novacut project for example. It failed its first Kickstarter. Its second try was simply an enormous PR effort and would not have made it without the dedication of the OMG!Ubuntu news site.

    There are many specialized crowdfunding platforms (some only fund startup companies, f.ex.) and I hope the ones focusing on open source will perfect their usability and reach a level of familiarity among FOSS enthusiasts and geeks that is equal to Kickstarter or IndieGoGo. In addition to FreedomSponsors, we currently have BountyOSS, Fundhub and Gittip (which is a somewhat different concept).

    If this happens, the platforms themselves might generate enough exposure, because it’s not a needle in a haystack -situation anymore as with the general platforms with dozens of project categories. The situation now is that I have to go to Kickstarter/IndieGoGo and search for “linux” and “open source” and make a deliberate effort to seek out projects that don’t understand the concept of marketing and then I try and trumpet the sane ones everywhere appropriate I can think of. Sometimes I also do a web search with the keywords crowd funding and linux or open source, but all this effort required makes me feel obsessive.

  4. joker159: to understand, why it’s so complicated, please read this thread in its entirety:

    To quote Øyvind K.:
    “Nothing stops a motivated developer that is already part of the GIMP
    development community, or hopes to get development integrated from her
    or himself to seek funding through kickstarter for a specific feature.
    This is however not something that GIMP as a community/project itself
    wants to pursue or coordinate currently.”

    The situation is like this, because the professionals participating in the GIMP collective effort are unsure of how the money should be split up so it makes sense and does not cause conflicts. My proposition is that an official GIMP funding start with a focus on UX/UI so not only the programmers get in the limelight as has happened in some other projects with bad results. Your thoughts on this would be appreciated.

  5. “and rename it to NoHalo” ← I love this “deliverable” =D

  6. Decided to sponsor this and a couple of other issues over at FreedomSponsors. As a user who isn’t really involved in any community yet I find this a great way to show my thanks.

    I agree that something more has to be done to reach out to the users. I wouldn’t have known if it wasn’t because LGW covered this.

  7. Alexandre:
    Tool Tip:
    If you wanted to produce your screenshot reductions without a GUI, the LoHalo method basically clones the EWA Triangle through linear RGB ImageMagick method discussed in the downsampling section of (At l.east when you don’t reduce too much ;)
    Runs faster too.

  8. Alexandre:
    If you do try ImageMagick for producing your screenshot reductions, please give a try to non-EWA (tensor) ImageMagick Triangle (just drop the “-distort”; otherwise, same code). Tensor Triangle runs faster, and I’m thinking of actually replacing EWA Triangle by tensor Triangle in GEGL (after the freedomsponsor programming round is over; it requires me to formulate a different way of being Jacobian adaptive).
    So, if you see differences between the two, I’d like to know it, and find out which one you like better, specifically in the context of image reduction. If you like EWA triangle better (WHEN DOWNSAMPLING) -> one less thing to do.

  9. Alexandre Prokoudine 06 December 2012 at 6:38 pm

    @Beluga Well, to be fair, there are journalists who specifically harvest Kickstarter for new campaigns to write about.

    @Nicolas I famously don’t use ImageMagick :) But I’ll see if I can do that.

  10. Thanks for telling us about, Alexandre. Nice with a crowdsourcing site focusing entirely on FLOSS.
    Got to put in some long standing issues I have had with Gnome 2 (now MATE). Alt+Tab while dragging, anyone?

    Also, I’ve immediately put in $20 on this.

  11. @Alexandre: It looks like the fundraising has already reached step two (Modify GEGL’s geometrical transformation code…) :-)

    Let’s how everything turns out….

    IMHO, it would be VERY useful to have this project publicized directly on the Gimp web-page (to get much more visibility).
    And yet, I am 100% aware it is NOT that simple…

    I have read some Gimp developers are of two-minds about sponsored patches…

  12. people in the know: any hints as to when 2.10 might be released? Seems like there’s been so many new features already since 2.8 (*cough* high bit depth *cough*)

  13. Alexandre Prokoudine 12 December 2012 at 1:37 pm

    @impatient It’s too early for this kind of estimations.