Krita compositions docker

May 9, 2012

After Krita 2.4 is released the development for Krita 2.5 is progressing. The first feature that I added for 2.5 is a the new composition docker. It’s based on a request by David Revoy, who also did the storyboards for Mango (they are shooting currently, with a very cool behind the scenes livestream) in Krita.

The idea behind the compositions docker is very simply. It saves the visibility of all layers and can restore them. Composition are also stored to file if you use Krita’s native fileformat.

This is very useful e.g. for  cartoons were characters are in different situations over the same background or movie storyboards. Beside that it can also be used with different combinations of filters e.g. to simulate different color moods.

Last but not least David did a demo video of the new feature:


The problem with supporting Windows

April 9, 2012

I guess many Linux users know the problem that some Windows software, they would like to use on Linux, isn’t ported for some reason like a too small market etc. What’s funny is that the problem also exists in the other direction, although for totally different reasons.

The problem really showed in recent development of Krita. For a long time Krita was only available for Linux and other Unix-like systems, but in the last time we got more and more requests from users for a Windows version. So we want to support Krita on Windows. Since we are using Qt and KDE ported to Windows shouldn’t be a big issue, right? Well not exactly, while these libraries take most of the work away the port still needs continued maintenance. To make a good user experience you need some developer(s) working on Windows to iron out the platform specific problems.

Which leads us to the main problem: We simply don’t have any Windows developers. My impression is that by now almost all open source developers are working on Linux and are not particularly interested to work on Windows on volunteer basis. Working on Windows simply isn’t fun. Unlike for conventional software development the mere mass of users on a platform doesn’t provide any advantage to support it.

How to solve the problem? Easiest would of course be that we find a few volunteers that have fun working on Windows. Something that I think is not very likely. Only alternative is to pay someone to work full time on it, which of course means that Windows users would need to pay a few euros (at least on average).

By the way, the Mac OS version is also affected by a similar problem. No Krita developer has a Mac anymore, so development on that platform has ceased.

Krita bug statistics

December 21, 2011

A few days ago  Martin Gräßlin posted some statistics about bugs in KWin. That got me interested in doing some statistics about Krita.

The first thing I wanted to find out was how long bugs need to get fixed. To do that I wrote a script that extracted the data from the Bugzilla csv export, which is quite limited. There is some data available like the creation date of a bug or the date of the last change, but most details are not available directly. So to get the the data to calculate the lifetime of a bug, I approximated the closing date of a bug with the last change.

From the bug data I generated the following picture that shows all Krita bugs from 2004 till now. Each row shows one line whose length represents the time from report creation to it’s closing. Closed bugs are shown as black, new open bugs are green and unconfirmed bugs red. In the background you can see the length of the years and the blue vertical lines show major releases.

Although the diagramm is very simple, there are lots of things that can be discovered. First thing you might notice, is that it looks like there are some blue lines missing in the middle. That not a mistake, but the big gap were we were porting to KDE 4 (Surprised me a bit, as I thought that it was much longer than it looks).

For the bugs themself it shows that many bugs are closed near their creation, but there are also many bugs with evil long lines. After the release of Version 2.0 the curve get much steeper, which shows that more bugs got reported. It might sound strange, but as the software got more stable more bug reports were submitted. I think it just shows that Krita is used much more now and users work more with it and by that find more bugs. It also shows once again that the raw number of bug reports doesn’t mean anything.

Next I plotted how many bugs get opened and closed every year. Both have increased quite a lot of the last few years. As you can see we usually fix slightly less bugs than are reported (slightly above 90%), so the total number of bugs is still growing. No idea if that is better or worse than other projects.

Last thing I wanted to find out was how the bugs are resolved e.g. if they are really fixed in the classical sense or are just duplicates etc. So I extract the resolution from the data and plotted the four resolutions that are by far the most common for Krita. Not surprising of course is that “fixed” and “duplicate” are the most common. Although I was under the impression that we got a lot more duplicates in the last time, the actual number of duplicates isn’t that big (I also did that for Plasma to compare and it really has a crazy amount of duplicates).

One last detail: I know developers are often criticized for closing many bugs as wontfix and it turns out that this at least doesn’t apply for Krita (yet), as only about one percent of all bugs are closed as wontfix.

“Adaptable” Krita

August 29, 2011

I recently found a very interesting project based on GIMP. AdaptableGIMP basically is a fork that replaced the usual toolbox with a task-oriented UI. It allows to create a “task set” that represents all actions and documentation needed to perform a certain task. Since Krita usually doesn’t use as many complex combinations as GIMP (e.g. we have a rectangle tool, so draw the rectangle is just one step in Krita), I wasn’t that interested at first. But after a closer look, I thought might also be useful e.g. as a fast way to access actions that either have not shortcut or the shortcut isn’t easy to remember.

So yesterday I started my own taskset UI that is inspired by the one from AdaptableGIMP. First I thought about how task sets are created, I skipped the wiki aspect completely as that would take too much time to implement and maintain. Both the wiki and the dialog based taskset creation didn’t completely convince me as they require to search a big list of actions (there are currently 284 actions in Krita) and then add them to the taskset. Whoever used the toolbar editor knows that it’s no so great.

I went for a different solution as can be seen in the following screenshot:

The new task set docker has a record mode that works like recording a macro. Once the record button is pressed it will record all actions the user does. So to create a task set for a certain task you simply record everything that you are doing while performing the task as usual. Thanks to kxmlgui this was very easy to do.

Next thing that was needed was a way to store, load and share task sets. Fortunately I could use the Calligra resource framework for that so I got lots of functionality for free e.g. task sets automatically have tagging integrated (which was a GSoC project this year). For sharing task sets in the future we could use GHNS which is already integrated and just needs a new category on the server. This would also have the advantage that we can reuse the existing facilities of OpenDesktop.

In the future there might be many other applications of this. The current code doesn’t depend directly on Krita and could also be used in other Calligra application. Another thing I noticed in AdaptableGIMP is that is often says that some value needs to be enter into e.g. the filter that pops up. Krita already can save filter configurations, so it could be interesting to restore the filter configuration that was used while recording and blur the differences between macros and task sets even more.

Krita Windows and Mac OS progress

July 25, 2011

Good news for all users that don’t use Linux but still want to run Krita. In the last week lots of progress has been made towards getting Krita to run on Windows and Mac OS X. The Windows work was work was done by stuartmd who is working for KO GmbH. The screenshot below shows current git master running on Windows. The native windows look is a bit ugly, but can of course be changed to Oxygen.

A Windows installer for Krita is expected for the next version later this year. I expect that we will have a quite long testing phase, as there are not many Windows developers and Windows users aren’t used to file bug reports.

Quite a suprise was that almost at the same time forum user pkouame managed to run Krita on the newest Mac OS version. Krita did run on Mac OS for some time, but after almost no Krita developer has an Apple computer anymore so practically nobody did run it.

In other news Anitims Krita DVD can now be preordered.

Krita Sprint 2011: Technology and art

June 4, 2011

Last but not least my report from this years Krita sprint. It was the third sprint just for Krita and it was even more amazing than last years sprint. After being at Boud’s house last year we went to the Blender Institute. The move was necessary as the team did grow quite a bit in that time. The second big change from last year was that this year also some artists attended the sprint. As far as I know it’s quite unique that developers and users meet at a sprint. Although they are not just users, but an important part of the development team and have a huge influence on the direction in which Krita is developing.

Artist demos

So why did we invite artists? Many (if not most) Krita developers, are not (professional) artists, so we depend on artists to show us the bugs and workflow problems that they encounter. It was planned that each of the artists would show us about 30 minutes of painting and we would analyse what we could improve.

The demos were really interesting and surprised me at many points. One thing that especially surprised me how good Krita performed during the demos. I usually see Krita from the other side where I known all the existing problems, but the demos did only show a few even when using the most recent development version. The next thing that really surprised me is that some features are more used than I ever imagined, e.g. presets are used a lot and I had not thought that when I added them.

Another interesting observation for me was that all the artists had totally different workflows. The way the build up their images as well as they used Krita was really interesting to see. For example Animtim works with a gamepad in one hand and the tablet in the other hand. Interesting was also that most artists used suprisingly few features and had had configured lots of shortcuts. The screencaps with are available here (with our discussion as audio).

Planning the next year

After the demos we discussed the plans for the next year. There are lots of things that will be coming with the next version, but most of the work goes into polishing with only some bigger changes coming. The only planned refactoring will be in the selection system, this includes also grayscale masks.

For many users interesting is a news that Boud had: There will soon someone who is paid working on the Windows version of Calligra, which will also includes single-application installers. The Windows version always was something we wanted to have, but since all developers are working on Linux nobody was interested in working on that (Mac situation is even worse as most developers don’t even have Apple hardware). I’m hopeful that it can be ready for the next version.


After the official part closed we went to implement the things that where noted in the demos in the morning. First I changed the preset dockers as Bugsbane suggested that we should keep the aspect ration of presets and also use the space more efficently. So now the preset docker will keep the presets square while maximizing the usage of the available space.

Another change that I did was to move the opacity setting from the tool options to the toolbar. Now the opacity works globally for all the tools and Silvio is working on the paintop integration.

Finally I also modified a few shortcuts. The brush increase and decrease shortcuts, so now the adapt to the brush size and make bigger changes when the brush is bigger. That one was also quite funny as we had the direct feedback from the artists. We developers had a discussion if the functionally needed to be even better (like exactly following a exponential curve) when the artists said that it was already perfect for them.

This are only the changes I did. There are some many things going on in Krita development at the moment with about half a dozen different branch working on various features.

Many thanks go to Ton Roosendaal and the Blender Institute for the amazing location and of course KDE e.V. for making the sprint possible.

Krita 2.4 progress

February 8, 2011

Since we released Krita 2.3 last month, the development of Krita 2.4 has been running at an incredible pace. So I thought it might be a good idea to show what we have been doing in the new version.

Since we released we got a huge amount feature wishes, so I took some time to implemented some of them. Most of these changes we in the user interface, as can be seen in the following screenshot.

If you have used Krita 2.3 and earlier versions you probably notice that the tool- and statusbar now take a lot less space. The funny thing behind this I never really noticed it before (I guess as KDE user I was very used to bigger margins and due to my big screen it never bothered me much), but then I saw some Krita on Gnome screenshots (like here) and there is was very obvious.

One very surprising thing about the Krita is that many users are actually running Gnome. There are no exact numbers, but my impression is that there are at least as many Gnome users as there are KDE Plasma workspace users running Krita. After all the discussion in the recent time I think that the users are already much further than the distributions. KDE applications can work and look good under Gnome, but it still requires too much manual fine-tuning to get the best result.

I did a bit more cleanup in the toolbox, where I removed some of the tools that are no longer needed. For example the instead of having on path tool for vector graphics and for raster graphics, we now have just one tool that can switch between the the two based on the context.

In the toolbar the there are now two new functions. The first is that we now have the control for the horizontal and vertical mirror modes in the toolbar, so they work globally across different tools. The modes were added by Lukáš for 2.4 and allow to mirror the current brush painting around one or two axis. It turned out that this feature is quite popular and already produced some very cool results. The only missing part are some good icons for it.

The other new feature in the toolbar is the workspace chooser, which allows to create and switch between workspace. Since Krita has lots of different dockers, which can either be docked or floating, it can be hard to manage them. An artist might want to use different docker arrangements for painting, layer management or vector graphics, so the workspace chooser allows to save a docker configuration.

In the future it might also be possible to save other properties of the environment like the active tool, brush engine, pattern or gradient. It’s not completely clear which properties would be useful, so for now I only saved the docker state. We also thought about a possibility to save it to the current file so that it would be possible to always have the same workspace when working on a certain image, like it’s already done in Blender.

Finally we improved the dockers a bit. I have added a new channel docker that allows to switch on and of channels. Currently it still very simple and doesn’t have the full funtionality that other applications provide yet. Below the channel docker you can see the new preset docker that was added by Adam for 2.4 and provides the same functionality that 2.3 has in the preset popup now also in a docker. By the way: The presets in the docker are from the first user-made preset collection.

Vector graphic file import for Krita

December 12, 2010

For quite some time Krita supports shape layers now. It’s quite surprising that many users are use the vector features even though they are not as powerful as in pure vector graphics programs. Probably one of the biggest problem in the 2.3 and before was inserting vector graphics.

While inserting primitive shapes is very easy, inserting complex vector graphics was rather difficult. There were two ways to insert them, you could either open a file with the file dialog and it would get rasterized or you could copy and paste it from Karbon. After Kubuntiac brought up the wish to have better SVG support, I took over and added the new import filter.

The actual filter turned out to be really small as it just needs to open the file and find out which shape should go to which layer as the rest is done by flake. The filter at can load ODG files. After some fixes from Cyrille the filter can now also load SVG files (we use the Karbon SVG import). Pretty cool is also that we preserve Karbon layers as well as layers form Inkscape SVGs.

Parallel brush mask processing

October 25, 2010

This weekend I was a bit tired of fixing Krita bugs and decided to do work a bit on features again. So I started to work on optimizing the painting in Krita again (though one could see performance issues as bugs).

Lukas had already optimized brush masks before mainly by improving the algorithm. Back then the goal was to be able to have fast painting with a 70px brush on a 2500×2500 image, the new goal is a 500px brush on 6000×6000 image. When I looked at the CPU utilisation of the stroke benchmark I noticed that only on thread was busy, so I wanted to try to parallelize it. I know that KSysguard might not the most precise way to measure it, but it gives a nice indication:

The first thing I wanted to try was OpenMP which I knew through my Algorithm Engineering course from university. I tried to use for-loop parallelization, but it did work out very well as it turn out even slower than without. I’m not completely sure why that happened, but I assume that the loop wasn’t well suited for OpenMP.

After that my next try was to use QtConcurrent on the problem. My idea was to split the mask into a list of separate rectangles where the threads could work. QtConcurrent was suprisingly easy to use and I only needed to make very few changes to the old code. Here is the result of the benchmark with QtConcurrent code:

The random lines with 300px brush benchmark improved from 9359 msec to 5621 msec which is a speedup 1.6 on my Core i5 430 (dual-core). That isn’t too bad if you consider there is also some serial code in there. For smaller brushes the speedup is much smaller. Unfortunately I don’t have a quad-core system to test, it would be interesting to see how it scales. I’m still wondering why the QtConcurrent code doesn’t run with 100% CPU utilisation. The benchmark should be big enough to reach the maximum.

Since Krita is currently the feature freeze currently, the code won’t make into Krita 2.3.

Sintel released

September 30, 2010

The Durian team has released the newest Blender open movie Sintel.

We visited the Durian team during the Krita sprint in february when the movie was still in an early stage. At that point the movie wasn’t more than a few minutes of animatics and storyboards. It’s nice to see how they turned out in the final version. Especially interesting was the scene from 4:50 till 5:30 which was discussed back then, which turned out really great with the lightning and soundtrack (and is also my favorite scene).

It’s much bigger than the previous movies and really show the progress that has been made since the first one. It’s a huge success for free open source graphics software. I’m already looking forward to the next Blender movie. I hope future Blender movies will use Krita (I will be working towards this).

Amazing job. Thanks so much Durian team!