Warp Transform tool is coming to GIMP

Warp Transform tool is coming to GIMP

One of the most favoured retouching tools that Photoshop users miss in GIMP is a Liquify filter. The existing iWarp filter has always been not very easy to use, and it lacks certain features. This is about to change thanks to Michael Muré who has been working on a new Warp Transform tool since May.

Feature-wise the Warp Transform is much like the iWarp filter. What's the difference then?

  1. It's a real tool, it works right on canvas, so you work on the real thing instead of tiny preview.
  2. You can use Erase mode to partially remove warping you applied.
  3. Hardness option has been added to complement Strength and Size.

To illustrate all of that, Michael recorded a short demo that previews basic features of the tool:

So, let's summarize:

  • works on canvas;
  • has Move, Grow, Shrink and Swirl (CW and CCW) warping modes;
  • has Erase and Smooth modes to adjust changes you applied;
  • has Strength, Size and Hardness options for the "brush".

There are few limitations in the tool currently. The most visible ones are lack of undo/redo support and comparative slowness of processing. Both issues will be addressed as the project progresses.

As you probably remember, the GIMP team has set a ban on new tools that use old core, so just like Cage Transform tool introduced last year, the Warp Transform tool uses GIMP's new hi-end core, GEGL, as a backend. For that Michael created another GEGL operation that does all the calculations.

Apart from being useful for retouching the new tool plays another important role. What it does is introducing the first basic GEGL based brush-like tool. And while the Warp Transform tool doesn't currently use painting dynamics, there is no reason why it shouldn't be done later when the rest of painting functionality lands to GEGL.

One last thing to say here is that there is no decision yet whether Warp Transform tool will be part of GIMP 2.8. The core team isn't happy introducing a major new feature at this (late) stage of development. However, its still about half a year till release of v2.8, things might just change.

Edit (2014-11-11): The Warp transform tool has replaced the iWarp filter in the main development branch and will be available in GIMP 2.10.

The other new tool, Seamless Clone, developed as part of Google Summer of Code program, is also progressing. Stay tuned for more updates on all things GIMP.

Was it useful? There's more:

31 Responses. Comments closed for this entry.

  1. This is very cool! The GIMP is working in the right way, I hope that the project could bridge the gap from Photoshop soon. I insist that it needs some important books that explain the possible professional use.

  2. Seconded. The amount of high quality educational content is not that large.

  3. I actually hope they decide to wait with this until 3.0; I’d very much prefer they keep to their schedule and get 2.8 released on time, so they can move onto a shorter release cycle. Hopefully 3.0 won’t be too far after then (or if 3.0 takes too long, there’s always 2.8.1 …)

    That said, the tool looks really great!

  4. @unhammer Fair enough :) All new tools pass mitch, so he’s likely to have less time on other stuff.

  5. I like this thing! How can I try it out? Any repo out there?

  6. No repositories yet, you’ll have to compile GEGL and GIMP from Git. Need any Linux oriented guide on that?

  7. That’s how I always do (including BABL as well) even so often that I had to write a little script for that :) (<- this is silly-looking emot)
    So has this already gone upstream? I didn’t see any related entries in GIMP or GEGL git logs. I’ll pull and compile now and check if it’s lurking anywhere..

  8. I’m unable to test now. Getting this error when compiling GEGL:
    ff-load.c: In function ‘print_error’:
    ff-load.c:72:10: error: ‘AVERROR_NUMEXPECTED’ undeclared (first use in this function)
    ff-load.c:72:10: note: each undeclared identifier is reported only once for each function it appears in
    ff-load.c:82:10: error: ‘AVERROR_NOFMT’ undeclared (first use in this function)
    ff-load.c: In function ‘prepare’:
    ff-load.c:266:7: warning: ‘av_open_input_file’ is deprecated (declared at /usr/include/libavformat/avformat.h:1043) [-Wdeprecated-declarations]
    ff-load.c:281:32: error: ‘CODEC_TYPE_VIDEO’ undeclared (first use in this function)
    make[3]: *** [ff_load_la-ff-load.lo] Error 1
    make[3]: *** Waiting for unfinished jobs….
    make[3]: Leaving directory `/media/lamus/repos/git-repos/gimp-n-deps/gegl/operations/external’
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/media/lamus/repos/git-repos/gimp-n-deps/gegl/operations’
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/media/lamus/repos/git-repos/gimp-n-deps/gegl’
    make: *** [all] Error 2
    All dependencies satisfied (BABL compiled and installed OK). I’ve done this all successfully (babl+gegl+gimp) dozens of times and this I think is the first time where one component failed to compile. And the worst is I’ve lost my previous installation from just a couple of days ago. I got used to trouble-free compilations so much that didn’t care about making backups. Now I’m gonna have to reverts some commits from local gegl repo or go for some PPA with fresh dev builds (unfortunatelly PPA ‘mrw-gimp-svn for matthaeus123’ hasn’t been updated for quite long time..)

  9. For both GEGL and GIMP,

    $ git checkout origin/soc-2011-warp

    I just create a new local Git branch, check it out and use ‘git merge origin/soc-2011-warp’

  10. Thanks for that! So Warp is a gsoc project as well?
    Still need to sort out that gegl build failure before I can have fun.. Whatever ff-load is shouting about, I would pass some option to autogen to shut it up (only if that won’t affect the warp functionality) but I don’t know what to pass. Guess disabling something would do. If it failed during configuration I would have more information but that went smooth, the error occurred when compiling..

  11. Yes, it’s one of the five GSoC projects this year. Perhaps I should have made it clearer :)

    Are you sure you have FFmpeg headers installed?

  12. I’ve got ffmpeg installed and that should be fine as in my distro (ubuntu 11.10 dev) headers for ffmpeg should be included in the main application package. Also nothing like ffmpeg-dev or libffmpeg-dev appears in the repo. However I do have these headers installed (they are all included in package ‘libav’, so it’s ffmpeg):

    Also I think that these messages produced during gegl configuration says that it’s OK:
    checking for AVFORMAT… yes
    checking libavformat/avformat.h usability… yes
    checking libavformat/avformat.h presence… yes
    checking for libavformat/avformat.h… yes

    However not sure about these (i think they are related to V4L):
    checking linux/videodev.h usability… no
    checking linux/videodev.h presence… no
    checking for linux/videodev.h… no

    Since last successful gegl compilation I don’t remember changing anything that would affect it.

  13. $ sudo apt-get build-dep gimp
    $ sudo apt-get remove libbabl-0.0-0


    $ sudo apt-get install gtk-doc-tools enscript asciidoc exiv2 lua5.0 ruby1.8

    That will get you all deps to build babl, GEGL and GIMP.

  14. @prokoundine
    You don’t seem to belileve that I’ve ever compiled anything do you? Yes, ‘apt-get build-dep <app-name>’ is usually necessary [after ‘apt-get install build-essential’] in order to compile apps on ubuntu. Sometimes some dependencies break i.e. you may remove one accidentally when purging deps needed to compile some other application which you don’t build anymore. But in such case you simply run ‘apt-get build-dep ..’ again and if anything is missing it will get installed again.

    Also I don’t need all the deps, i.e. gtk-doc-tools (I compile gimp with option —disable-gtk-doc).

    Even though I do have libbabl-0.0-0 installed from the distro repos (guess it happened when runing apt-get build-dep gimp), it doesn’t matter. After building each component (babl then gegl and gimp) I install it on a separate partition (mounted as /media/lamus) into a didicated directory ‘my-apps’.

    So for all of the components I do (well now the script does):

    Also these relevant lines are included at the beginning of the script:
    export PATH=$INSDIR/bin:$PATH
    export PKG_CONFIG_PATH=$INSDIR/lib/pkgconfig
    export LD_LIBRARY_PATH=$INSDIR/lib

    [ where: INSDIR=/media/lamus/my-apps/gimp-2.7 ]

    Please trust me, the last time I installed gimp+deps from binary packages was more than half a year ago. Since then I’m only compiling from source which I pull straight from git. The same with babl and gegl.
    And build failures just happen even if all dependencies are satisfied (or seem to be according to successful configuration). I’ve been just so lucky with gimp’n'company that I had never got any build failure before. I’m not that lucky with other apps (especially kernel)..

  15. Please don’t takle it personally. I’m just sharing what I know hoping some of that could makes sense :)

    My build is several days old, but I can’t see what change could be causing that error (apart from me being on 11.04 and you being on 11.10-dev).

  16. Sorry for my last comment. It turned out a bit rude. It wasn’t my intention, it came out of my impatience I guess. I should say thank you for trying to help me out instead.

    I wouldn’t have got into this trouble if I archived the last build. It was just one directory to tuck away! I’m gonna amend my scripts to make backups before uninstalling old builds.
    It could be some trivial but non-obvious bug in some recent commit in gegl, it could be ffmpeg. Dunno. I’ll try to investigate tomorrow when my eyes are fresh..

  17. \o/ I love this tool I cant wait to lay my hands on it :D

  18. @prokoudine
    I was googling for ‘gegl ff-load avformat’ and it appears that this is a known issue for some time already. It’s not related to just recent versions of libavformat (most likely here lies the problem).

    Also dpkg tells me that:

    libavformat.dev, libavutil.dev and libavcodec.dev

    were installed (for the first time) just last Monday - most likely after the last successful build of babl-gebl-gimp (and certailnly after previous successfull builds). I guess they got pulled automatically as dependiences required by k3b (installed the same day) in order to enable riping audio and video.

    Now, passing —without-libavformat to autogen.sh solves the problem - gegl builds ok and then I’m able to compile gimp. Without having libavformat headers related features are disabled during checking for deps and gegl still can build (tested). That is how it always worked for me, I guess - I probably never had those headers installed on previous systems. So libavformat, although it extends gegl’s functionality, is not required to build it. I only hope that disabling it won’t affect the Warp tool! I’m gonna find it out in a minute..

  19. I merged successfully origin/soc-2011-warp into GIMP master
    but when trying to merge into GEGL master, I get this conflict:

    Auto-merging gegl/buffer/gegl-buffer.h
    CONFLICT (content): Merge conflict in gegl/buffer/gegl-buffer.h
    Auto-merging operations/workshop/plasma.c
    Automatic merge failed; fix conflicts and then commit the result.

    The way I did merge was slightly different than in your instruction:

    # this command created a local branch named soc-2011-warp based on a remote branch origin/soc-2011-warp and automatically switched me to the new branch:
    git checkout -b soc-2011-warp origin/soc-2011-warp
    git pull
    # just in case :)

    # back to master and merged the local branch into it:
    git checkout master
    git merge soc-2011-warp

  20. Bingo! I’ve managed to build gegl from origin/soc-2011-warp branch only + gimp from master with origin/soc-2011-warp merged

    I’ve got the tool now with all options but it doesn’t seem to work for me (none of the transforms). How do you use it? I just left-clicked on a picture (gimp logo) and dragged the cursor over. Nothing changed to the pic. I made sure that pixels and alpha channel were unlocked ..

  21. AFAIK, the dependant op is in workshop, so for GEGL you need ./autogen.sh—enable-workshop

  22. Yup, that was it! Thanks a lot Prokoudine!

    BTW, meet asian Wilber:

  23. I’m afraid the link doesn’t work for me :)

    So, what’s you first impression of the Warp Transform tool?

  24. Looks like the link has been cut off, pasting again as text (anyone with the link should be able to see it)t:

    Looking good! Much more convenient to work and see the changes directly on canvas

  25. Hehe, lovely :)

  26. Hey Prokoudine,
    I’m sorry for the off-topic post but I’d like to ask for help with compiling gegl/gimp with the gsoc-seamless-clone patches applied. I merged that branch successfully into master in both gegl and gimp. And after that gegl failed to compile:

    [small]seamless-clone.c: In function ‘sc_point_to_color_func’:
    seamless-clone.c:101:76: error: ‘GEGL_INTERPOLATION_NEAREST’ undeclared (first use in this function)
    seamless-clone.c:101:76: note: each undeclared identifier is reported only once for each function it appears in
    seamless-clone.c: In function ‘process’:
    seamless-clone.c:206:63: error: ‘GEGL_INTERPOLATION_NEAREST’ undeclared (first use in this function)
    seamless-clone.c:210:9: warning: value computed is not used [-Wunused-value]
    make[5]: *** [seamless_clone_la-seamless-clone.lo] Error 1
    make[5]: *** Waiting for unfinished jobs….
    make[5]: Leaving directory `/media/lamus/repos/git-repos/gimp-n-deps/gegl/operations/common/seamless-clone’
    make[4]: *** [all-recursive] Error 1
    make[4]: Leaving directory `/media/lamus/repos/git-repos/gimp-n-deps/gegl/operations/common/seamless-clone’
    make[3]: *** [all-recursive] Error 1
    make[3]: Leaving directory `/media/lamus/repos/git-repos/gimp-n-deps/gegl/operations/common’
    make[2]: *** [all-recursive] Error 1
    make[2]: Leaving directory `/media/lamus/repos/git-repos/gimp-n-deps/gegl/operations’
    make[1]: *** [all-recursive] Error 1
    make[1]: Leaving directory `/media/lamus/repos/git-repos/gimp-n-deps/gegl’
    make: *** [all] Error 2[/small]

    Do I need to pass some extra option to autogen.sh for s-clone when compiling gegl? And does this functionality require any extra dependencies?
    I tried to find some info on Internet but no luck. Any hint from you would be greatly appreciated.

  27. The seamless clone thing is rather unstable at the moment. Barak started implementing gegl ops that the tool depends on some time ago, and last thing I heard (last night) was that they weren’t functioning properly.

    The relevant gegl branch is origin/soc-2011-seamless-clone. Try rebasing from Git.

  28. That’s exactly the branch I merged into gegl master and that went OK (no merge conflicts). Maybe I should try to compile directly from it, without merging into master..

  29. It seems that for the seamless-clone branch to work with other branches you have to change GEGL_INTERPOLATION_NEAREST to GEGL_SAMPLER_NEAREST in the 3 files operations/common/seamless-clone/seamless-clone.c operations/common/seamless-clone/seamless-clone-render.c operations/common/seamless-clone/find-outline.c and commit the changes.

  30. Hello,

    Could you tell me please if the layers other than the ones worked on by the tool would be visible while using it? This is the behavior of the warp brush in Photoplus by Serif and the lack of this feature elsewhere is just about the only thing holding me back from a complete migration to Linux. Very appreciative that this tool is being revisited in GIMP.

  31. GIMP is such an amazing tool but I just can’t get used to it! I’m fluent in Photoshop but can’t justify the price for the license. Thanks for your help though.