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.

Upsize example

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.

Credibility

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.


Patreon subscribers get early access to my posts. If you are feeling generous, you can also make a one-time donation on BuyMeACoffee.

Support Libre Arts at Patreon