Development · Krita · Others · planet · Thoughts

What is Krita up to now?

First disclaimer: I, of course, don’t speak for the whole project, I just write what I personally see and feel. And the blog post contains some technicalities; if you’re not interested in that, just skim over it, you’ll get the feel of it anyway. Or just skip straight to Future.
And btw, I have written most of this post at least two weeks ago, so the beta release that will happen probably this Wednesday, I believe, is just a coincidence.


In October last year we were focused and the direction was clear. Now, a half a year later, the situation is much different.

Last summer our plan was simple: get the resource rewrite done, fix as many bugs as possible, release 4.3.0 with resource rewrite and make a fundraiser for next year of development.

In October we already knew that fundraiser in 2019 is not going to happen and that the resource rewrite needs quite a bit of work as well. We assigned more developers to the resource rewrite task and we had two sprints: one in October, focused on getting those developers (me, Wolthera and Dmitry) engaged in the task, going to BlenderCon and real life meeting with some of Krita’s business partners, and second one in February, this time focused entirely on resource rewrite and describing the resource rewrite design decisions to the last developer (Ivan) who wasn’t there in October.

However as much as we wanted to focus on the resource rewrite, external factors ruled it out again and again. We had quite a lot of issues with building Krita on Windows and Mac, especially Python scripting and notarization on Apple that is now required for the program to be run on a standard user’s Mac. Both of it took several months to rule out (we’re dealing with it since January) and notarization still has some issues. It’s a boring, tedious, frustrating job, which I could taste at the very beginning (with just updating Krita’s dependencies on Windows) around January, but later it was mostly dealt with by Ivan, Dmitry and Boudewijn. Python is particularly tricky: on Windows there are two different Pythons, one (must be installed on the system) is for building Qt, one needs to be built and it provides Python scripting for Krita. Mixing those two up results in the wildest errors.

Another thing we’ve been busy with are regressions, mostly crashes with Colorize Mask, onion skin and animation files and the Transform Tool. Additionally some of the developers took their time off, be it for family reasons, health reasons or any other personal reasons.

In the end, I believe that on the resource rewrite I was the one working the most in the last several months, but even I wasn’t working on it all the time. On the last sprint I started working on bundle manager and resource manager, but after I implemented all functionalities, it turned out that I need a precise plan for the resource manager – I created a mockup, I put it up on and started working on something else, my pet project of sorts: Wishes Manager.


So, yeah… the resource rewrite isn’t finished yet. Let me write down what every developer is working on.

Dmitry is helping voronwe13 (a very new, but a very promising volunteer) on new types of brush tips and textures, which allows for real-time, quick and easy impasto effects, but he says he’ll come back to bugs soon. I got assigned a task to improve selection tools a bit – those are explained here if anyone is interested: – I implemented the second one already, but I have some issue that needs to be solved, then I will implement the first one and come back to the resource rewrite (I have two branches that are not on the official repo – one with a brand new Resource Manager, and one with Bundle Manager bundles view fixes to make it more user-friendly, but both are in a very messy state). Boudewijn and Ivan were busy doing builds, Wolthera works on the manual, but says she’ll come back to coding soon as well.

On the positive note, we’ve got two new developers: Emmet and Eoin, both were known to Krita project before as volunteers. Emmet maintains Steam version of Krita for, hmm, not sure how many months already, for sure over a year but was it one year or two? And he always did a great job there. Now Emmet and Eoin are working on animation. They made a list of tasks and they are running through them with a speed that leaves us, senior, long-time Krita developers (says Tiar, working already for a full year!) completely embarrassed. See for yourself:

Very recently Boudewijn, seeing that the resource rewrite branch is getting quite stable and we can actually paint on it now (thanks to Dmitry), merged it to master. A few issues later and after the release of 4.2.9, it was decided that branch krita/4.2 will be finished and we’ll release 4.3.0 with everything we had on master before the resource rewrite, and the resource rewrite release will become the grand Krita 5.0. Hellozee, our volunteer and a GSOC student from last year and applicant for this year, is now removing an ancient code that Krita kept as a compatibility feature (so that text and shapes created in older Krita can be open in Krita 4 as well). Right now branch master (you can download a nightly build on Krita’s website under the name Krita Next) contains the resource rewrite, while branch krita/4.3 (on the website as Krita Plus) contains the next release, including features like magnetic selections, RGBA (”impasto”) brushes and more.


We’ve got a bit of a problem. Previously, our plan contained the following:

  1. get the resource rewrite done,
  2. fix as many bugs as possible (decrease the number of bugs),
  3. release 4.3.0 with resource rewrite,
  4. make a fundraiser for the next year of development.

None of it was achieved, and some of it is already impossible. The resource rewrite still needs a lot of work. Bugs number increases every day. Our extremely optimism-inducing bugs number graph we include in our weekly meetings looks like that:

Ok, it looks a bit different (and better) now, but this is how it looked when I was writing this post.

In spring and summer last year most of us were working solely on bugs, so the number decreased. But then we released 4.2.0, and the bugs number skyrocketed, and it didn’t stopped since. It’s not all regressions, although to be honest, 4.2.0 wasn’t the most stable release ever (since I’m doing user support and I knew all issues preventing people from using one release and another (crashing on startup on Windows, saving issues on Windows, Colorize Mask crashes, animation files crashes…), I feel like version 4.2.9 is the first one I can just tell everyone to use). Considering our promise on the last fundraiser was that we will decrease the bugs number to zero, it looks terrible. It’s not from lack of trying… but all the easy bugs are fixed, now nearly every one of them requires a few days, a week or even more of work. And we have 555 left. And even bug fixes can cause regressions and more bug reports… it’s a Sisyphean work.

On the side note, I was reading the Joel on Software blog: and in the article Top Five Wrong Reasons You Don’t Have Testers ( he wrote: Unfortunately, neither Netscape, nor any other company on earth, has the manpower to sift through bug reports from 2,000,000 customers and decide what’s really important. I think I’d like to write some polemics to some little parts of this article, but for now – considering Krita has 3 millions of users and counting, I guess it’s not unexpected we cannot fix all of them, if even managing seems impossible to a bystander…

Last autumn we also got a Coverity scan, which means automatic checking for mistakes in the code, and we still have around 900 issues to fix.

Krita 4.3.0 won’t contain resource rewrite, because while we are working on it, the old master branch got so many new features (a lot of them coded up by volunteers, GSOC students etc.) that it’s better to release them earlier, so that users will get those features earlier and the new wave of bug reports will be divided into two smaller ones.

And, of course, the fundraiser is out of question. (It’s a lot of work to prepare one, too). And we still haven’t fulfilled the last fundraiser’s promise, have we. (That’s of course not entirely true. We did work hard. Our work is visible on the graph. I hope it is visible in Krita, too. But still, I’m a bit disappointed).

There is also an issue with testing – both unit tests and beta testing. Every time we touch some part of the code, one needs to make sure that it’s both documented and covered in unit tests. There are sometimes things I’m not sure how to make unit tests of – especially since Krita is really signal-heavy. For beta testing, there is one strategy that is already in place which is releasing a beta version two weeks or, in case of major version like 4.3.0, a month before the release, sometimes with a survey. We also have plans for making a new platform for beta testers so that we can coordinate test cases, testing specific features, regression testing etc. to make sure that all of the components are given enough attention according to their importance or frequency of usage. Participating in beta testing is and probably will be voluntary – we don’t have a single paid tester.

I feel like there is a huge amount of work still left that is invisible to our users (resource rewrite is mostly in the very guts of Krita, bugs often happen only in some circumstances that average user might not see…). And there is still a constant demand to improve of our other unfinished/unpolished areas: animation audio, text tool, shortcuts system, all of it requires a lot of work or thinking. Now that Eoin and Emmet fixed the animation cache, finishing up the Animated Transform Mask (which would allow for tweening, which for me is essential to get done, the task description is here: is possible to be done quite quickly. But that’s just one thing of at least fifteen I can recite at any given time from what I want to be done in Krita.

I feel like we don’t have enough manpower to handle all of this. (It might be because I’m still considerably new in the project – I wasn’t there, so I have no way of knowing if this is the constant state of the project. And I have a bit of a suspicion it is).

Thing is, the bug fixing, stabilizing, writing documentations and unit tests, resource rewrite or any other architectural rewrite – it’s not something we do and we’re done with it. Ok, maybe resource rewrite will be that way, but there will be a new thing to rewrite or rethink, or another huge architectural change, or another optimizing that just needs to be done, but it’s not something we can put on colorful gifs titled See how amazing this new thing is!

Moving forward, Krita has a tough decision to make. What should we focus on? Resource rewrite? New features? Trying to polish up what we have already? We need to make sure those technicalities are sorted out – but we also we need to make sure that our users get their new shiny features. Simultaneously. I believe we need to divide our attention between shiny features and groundwork. Now, the ratio is something to decide upon.

There is this fitting phrase in Polish: ”trying to catch two magpies by their tails”, or maybe ”trying to catch two magpies’ tails at once”. I tried to look up an English phrase, but ”spread oneself too thin”, while having some inherent truth to itself, isn’t that funny and anyway, I ain’t butter. The magpies though, that sounds exactly how I feel what we’re doing at Krita now.

It is, I believe, the best strategy for now, it’s just a tiny bit messy, and I bet I’m not the only person who’s lost. I’m sure we’ll figure it out in the end though.

Development · Krita

One year working full-time on Krita

I’ve been working on Krita for over a year now. This post is a reflection on my experiences.

Screenshot showing different programs on my laptop
The view on my laptop when working – several consoles, directories, gitg, quasselclient, database viewer and of course Krita…

Working from home

Part of the deal is that I can work from home. It has a lot of advantages – for example, I don’t need to travel to work (and I always wasted insane amount of hours to get to my school or uni). This is a bit less important to me now since I live closer to the city centre, so the insane amount of hours would not happen anyway since I would find a job somewhere nearby, but still, I don’t even need to go out. I can choose my own hours of work – I don’t need to explain myself if I’m not at work at 8 am. What is also important for me, I’m not, technically, working full-time: I work less than the standard 40h per week.

I still remember dreading asking my interviewers about a possibility to work less than full-time; especially after uni, I wasn’t keen on working for so long and even from the company’s own benefit’s point of view, I believe it’s better for them to have me there for 6h instead of 8h – I will do nearly the exact same amount of work but won’t be too tired to take care of other things in my life. As far as I know, this is the direction the happiest countries in the world are going – to reduce the amount of hours of work per week. Programmers do get paid a lot, so the money I could earn by straining myself is not that appealing to me. However companies often don’t like part-time workers – they don’t fit the spreadsheets too well, it’s fine if they’re students in a special program, but not standard employees. Hence I’m quite happy to find a job that fits my needs better.

After uni and several job marketplace visits on various occasions I expected my work to go one of two ways: either game development (which means working on something fun, but „crunch culture” and regular overtime is not something I wanted to experience myself, read here:, or business application – maybe possibly data mining or some of the more „sciencey” positions. In both cases it’s a bit less exciting. My friends told me it’s easy to get used to and soon I’d be welcoming challenges that unavoidably were waiting for me in that path with the same warmth I welcomed debugging and implementation of red-black trees that made me win a bet with my friend. My internship proved it, I still recall with reverie cleaning dictionaries with a masterpiece of a bash one-liner piping text content through several Perl scripts and sed commands. And that was for an application that the user probably won’t even know they use. I know a job well done doesn’t need to have a deeper purpose and one is able to find fun in the most unexpected places, still, I’m happy Krita has this deeper purpose to get me through the less funny parts.

A much harder task was getting everything right in terms of taxes and other official documents and stuff. In theory I have people dealing with that for me, but… it’s not the same as having an assistant and an accountant that just do everything I don’t want to; there is still a lot I need to do myself and I loathe it. It would be so much easier if Krita, or rather, the company that manages Krita’s money and developers, was located in my country…

On the other hand, no office to go to and not having to get out of the house means both not going out of the house for days at a time and being quite isolated and even a bit lonely from time to time. Of course I have my partner nearby, I visit my parents regularly, and I do get outside for various other occasions, but there is not a lot of people I meet now, especially since most of my friends either moved out or started a family, including getting themselves a little baby, or have other things to take care of – it’s of course not the same as when we were all going to the same uni and meeting every day. One can always talk on IRC where the whole Krita team meets, however it’s not the same either: you can’t see them, hence the interaction is limited; also this is a group chat, and you don’t really get to know your interlocutors. Everything is much less natural. Of course, sprints help getting to know people behind the nicks much better. One sprint is often more productive in bonding than a whole year of being present at the same IRC meetings.

Working on an open source program

Photo showing Krita team working on Krita around an island of German sweets
Krita Resource Rewrite Sprint, February 2020

I quite like the fact that I’m working on something that everyone can participate in. All my work is visible online, I can talk to users directly. There is one event I particularly like to recall: when working on bugs last year in the early summer, I got told to spend some time on the Clone Brush. I didn’t find a lot of bugs regarding it, but I’ve found a few wishes. I implemented them, I got it reviewed by Dmitry (since back then, I believe, most of my longer patches were reviewed by him) in the evening, and the next morning I’ve got two different people thanking me personally for coding that. That was quite an empowering feeling: seeing people actively waiting for your work and appreciating it.

I don’t think working on Krita helped me get into other open source communities, I don’t interact with people from other projects, I don’t engage much. But I do understand more how it all works, so if I wanted, I could get in. Also I know all the gossips now.

Now I’m thinking about this, well, maybe Krita does make me closer to the open-source community. Since I started working on Krita, I was abroad four times and I have a fifth one already planned: first time for Libre Graphics Meeting, then three Krita sprints (a big one, baptized ”The First Krita Con” since it had over twenty participants, then one for meeting with Intel and going to Blender Con, then the resource management system rewrite sprint that I just got back from), and then another Libre Graphics Meeting with Krita sprint merged in. Libre Graphics Meeting last year was an amazing experience and it did pull me into this wild world of both programming and art, all with the same goal of freedom and accessibility. I’ve heard about a lot of other art open source projects, notably Laid-out from the very maintainer of it. From then on my favourite general purpose program is Laid-out (and probably the only one. I’m pretty sure that’s what NASA is using to make spaceships designs. As far as I know, the main developer is – allegedly – already working on a module that integrates with a toaster to get you your own Mona Lisa morning toasts. But please don’t quote me on that…).

Btw I’ve written a post about the October 2019 Krita Sprint here:

Working on Krita

Well, I’ve been using Krita long before I started to work on it. I loved it, I got quite passionate about it, and I was passionate enough that when I noticed some comments on Youtube from an upset user whose issues could be incredibly easily fixed, I decided to help with answering user questions – and since I already had an account on reddit, I chose that platform to help. I didn’t know how Krita worked internally, I knew names of the people involved but I was a bit scared to do anything else, especially since a proper contribution, with code and everything, would be quite time-consuming and I didn’t have the privilege of big chunks of time while studying. Helping users seemed easier… (It is not easier anymore, see

Because of that, working on Krita is both a blessing and a curse. I have my own ideas how to improve Krita, what to work on – but I need to do what is to be done. What has the higher priority. And since I promised myself to not code on Krita outside of work, because it would be quite unhealthy considering how much time I spend on it anyway, I just cannot work on features I want even if I have some free time. Boudewijn says he wants us to have some time to have fun working after we release the next major release, but come on – a month? For all the, what, seven or eight big features I have in mind? That’s just not enough time! (And never will be…) I think I’d like to start from the most important one – a smart gradient color selector, which would be quite similar to Digital Colors Mixer, but since it has a very different idea in mind, I don’t think just extending Digital Colors Mixer would work.

On the other hand, I do care about what I’m working on, which… is good for me, since it keeps me interested in my work, but it’s not good for anyone who disagrees with me on how Krita should look or behave, even in a very little details. That’s probably good I’m not a volunteer… I cannot just go and fork Krita to make my own tailored version of it. I need to adjust to others.

But in general, both UI changes and code responsible for proper working of algorithms have more importance for me than it would have in a corporate company. I don’t just make a thousandth copy of the same CRM system, I’m making something unique, something needed, something important for people. I want UI and algorithms and every other part of Krita in between usable, because I am using it and I’m using it for fun, so I know I’m going to spend a lot of time in the program itself for years to come. Since I’m still (well, still… I guess it grew even more!) passionate about Krita, I want it to be used, I want it to be valued, I want it to be viewed as a respected tool, something useful and worthwhile. It keeps me motivated, because I know there is a lot of work to do and now, knowing Krita to the very last brooms closet, I see where the work needs to be put in.

What I’m working on

Screenshot showing Bundle Creator in Krita's resource rewrite version
I was working on making sure that creating bundles work in the new version

For fellow programmers who wants to know how working on Krita works in practice: first I was of course focused on fixing bugs. I was a new team member with close to none experience with Krita code, so bug fixes were both a necessity due to the bug fixing mission we have from the last fundraiser, and a method to get me more comfortable with the code. Interestingly, my first (technically, second…) fixed bug was a one-liner (, but my next commit was about refactoring the whole class this one little change belonged to – KoUnit:

Days were flowing uneventful, except for quite a good pace of fixing bugs. At some point Boudewijn asked me to just clean up a bit the mess in the error codes in the file formats import/export part of the code… That was quite a task – it took me over a month, including a week patching xcf, because it turned out that xcf library… was actually a command-line utility, which means it calls exit(x) in case of any problems. So there was no crashes, Krita was just… closing, maybe a bit unexpectedly for a user, but the code was clear, wasn’t it?

After a few more months of bug fixing and fretting over the number of bug reports not stopping to increase after the release of 4.2.0 despite our best efforts, me, Wolthera and Dmitry got finally introduced to the cave of a dragon which is Resource Rewrite. Boudewijn was fighting it alone for two years and got it to the point that getting other people involved was possible. Since then, Wolthera and Boudewijn and I were focusing on that… tasks were reshuffled a few times, but I implemented and cleaned up the whole tagging system. Now it shouldn’t bug out every time you touch it, and a new ”All untagged” category is coming to Krita soon. Recently I started working on bundle creation, but it led me to a mess of UX and broken dialogs… Hopefully I’ll figure out how to clean it up. Other than that, there are a lot of details left: icons of proper sizes, versioned resources (you’ll be able to revert your brush to a previous state, before you changed it!), some bugs with gradients… then we’ll release an alpha version for all to test, fix the bugs that our testers will hopefully find (better alpha testers than regular users), then release a beta version, fix the most dangerous regressions if there are any, then a proper release – either 4.3.0 or 5.0, still to be determined, but the more we work on it, the more we like the idea of making it into the major release.


There must be a “Future” segment, right?

First I’m gonna get well, since I was quite sick last few days. Then… ahh, there is so much! For Krita, we need to finish the resource rewrite, of course, and release the next big version (no matter how it would be called). There will be LGM + Krita Sprint in May/June, which I hope will be at least as successful as the last LGM and as productive as the last sprint (although in a different way). For myself… I want to start a Youtube channel with my artworks. Unfortunately, Between writing fifteen blog posts about everything going on around me at the same time I’m afraid I have a bit less time to paint than I wanted. Also I learned how to edit my videos in Windows Movie Maker, I need to learn to do it in Kdenlive as well… And figure out how to add sound – I believe my Mint cannot find the microphone in my laptop for now, maybe when I update Mint and get an even newer kernel it will work correctly. Otherwise, I’ll need to do it on Windows or another machine.

For this blog, I have quite a lot of ideas as well. I need to finish the Krita Resource Sprint post, but it’s very long (I’ll need to split it up) so I don’t know when I’ll publish it. I want to write a review of a novel I’ve recently read, but I’m not sure if I have enough to talk about. Maybe it would be the only blog post you don’t have to spend hours reading! Then a few posts regarding religion, not exactly religion of course but more like my own experiences with it. I might want to write BITE model breakdown for the flavour of Catholicism I was raised in – of course I know the results already, it wasn’t a cult because it was way too soft, but even for less extreme groups it’s interesting to see how they aligned to the model. I have one blog post about a specific part of storytelling which I have written a lot of already but then I lost quite a large piece of evidence for the second half, so now I cannot finish writing it before I find it. Oh, and a social norms post. Get ready for the rant… If I’ll be brave enough to post it.

Development · Krita · Others · planet

How is User Support in Krita organized?

Current situation

Some of our users seem to don’t really know how Krita (as a project) functions or not understand how User Support is done (User Support: helping users, solving their problems with Krita, hardware, use-cases, limitations of tools, misunderstanding on how some features work). That’s natural – nobody knows details before they get inside and can see for themselves.

 I did get inside and I’m tempted to write that the answer to the question in the title is “Not at all”, but that’s not actually true – often you’ll get the first answer on within a few hours. On the other hand, the person answering you will most probably be me

When I first came to, a lot of questions were left unanswered, and most of the others had an answer from Boudewijn Rempt: the lead developer. I thought that I’d prefer Krita’s main developer to develop, not answer user questions. I knew that helping Krita on the code side would be difficult because of the complexity of the code and me having little time between uni and writing my thesis, so I decided to help with user support which I could easily do in small chunks of free time. A year later, when I was hired to actually hack on Krita, I realized that now there is, again, a full-time Krita developer doing user support…

Now from all the places I am on (KDE forum, reddit, irc,, reddit gets the highest number of questions. It’s hard to estimate how many help posts we get there, but let’s say it’s 5 per day. Some of them are quite easy and requires only a link from my links set and the user answer is “Thank you, it’s solved!”, but some of them requires a long investigation into what the user is doing exactly and why the feature that is supposed to be working isn’t working on their system.

On reddit, most posts are answered by me (full-time Krita developer), Snudl (volunteer) and le_becc (volunteer). Recently there is also yotzi – another full-time Krita developer, and Tusooa – ex-GSOC student, volunteer.

On the KDE forum, people helping are mostly Wolthera (full-time Krita developer), Boud (full-time developer and Krita project lead/maintainer) and Ahab (volunteer). Ahab is also great in bug triaging, does a huge amount of work in our bug reporting system. Wolthera is helping on tumblr as well.

On IRC, the helping person is nearly always a full-time developer – either me, Wolthera or Boud, sometimes someone else. On the Krita-Artists forum we don’t get that many help requests yet, so it’s hard to judge. But I did see Wolthera, Snudl and Ahab helping there already. We get quite a few questions on Steam app forum as well, and they are dealt with by Emmet or redirected to other support channels.

So to sum it up (I hope I didn’t miss anyone, if I did, I’m sorry):

  • full-time developers: me, Wolthera, Boud, Yotzi (Ivan Yossi)
  • volunteers: Snudl, Ahab, le_becc, Tusooa, Emmet

The thing is, our full-time developers are hired to develop Krita. I can’t say for others, but I do user support outside of my working hours. And it takes quite a lot of mental energy to be constantly available. Volunteers have a lot on their plate too – it’s just… Krita is used on 1.5 millions computers with Windows 10 alone, there is no way 8 people are going to manage all the user support that it’s needed.

I know there are also Facebook groups and Discord and other places, but there is a bit of disconnect between the core Krita developers team and people there. I think Snudl is from Discord though.

So, what about it

I believe some new people are needed in the system. I would really like to see someone who would be willing to take the burden of checking every post on reddit, making sure they get the support they need – that every post is either solved, unsolvable or waiting for user response (sometimes indefinitely, which happens much more often than you’d imagine). If there was more than one person, let’s say three of them, then every one of them would have much less to do. If there were a few other users who just check in from time to time and answer some of the questions, even just the easiest ones (basically how to use Krita, or questions solved by one of my links), that would create a situation where no one’s job is too heavy or too time-consuming.

I do believe that the existence of someone who feels responsible for the whole platform is, at least now on reddit, forum etc., quite important – because otherwise some questions might get missed, some difficult ones might not get the attention they need since there is a question just next to it that seems much easier. But “helpers-visitors” are important as well, to keep the user support maintainer sane 🙂

If any of you, dear readers, want to help in any way, or maybe even waited to engage in open source project, even specifically Krita, for a long time but never had the courage to step in, please contact me on IRC (on freenode, or tiar or tiar-[any two letters], on /u/-tiar- , or on tiar.

Learn more

Some tips for user supporters:

My powerful list of links:

Mac crash log instruction
reset configuration
onion skin:
render issues;
what to do with printing:
xp pens tablets
krita vs gimp
why tablets doesn’t work
how to use Krita Plus flatpak
krita vs corel painter
painting in CMYK
tips & tricks:

Art · Krita · Tutorials

LUT baking of HDR images in Krita 4.2.x

If you have an HDR setup for Krita and you have ever tried to share your HDR paintings or animations with anyone, you know it might not be an easy task. Krita’s conversion HDR -> sRGB is lossy, colors become white or washed out. In most cases, the image just looks damaged.

HDR image naively converted to SDR
HDR image converted to SDR using this method

There are some ways to work around this. One of them is to use a program that can actually do a proper LUT baking. But that would require learning a new program, so scratch that, we’re gonna do it in Krita.

Open your precious HDR painting. (For animation the tutorial is basically the same). Make sure your last progress is safely saved somewhere as .kra! You can even make a copy and open the copy just in case – because following this tutorial will for sure damage your data in the image, so better to have a backup.

If you followed the official guideline, your image is probably in Rec2020-elle-V4-g10.icc color space. That’s a good color space for painting, but not for LUT baking. The thing is, this color space has point 1.0 in some arbitrary location. There is no way to get the brightest white available on HDR display below the 1.0 point in the elle color space. And considering that our filters just cut out all the data outside of (0; 1) range, most of our colors data would be lost. Just like converting the image without adjusting it first.

Because of that, the first step is converting your image to Rec2020-PQ color space (the one with a very long name with different acronyms). It has a 1.0 point around the whitest white on your display, which is enough in this case (what you see as white, will be seen as white in sRGB).

Create a filter layer. I would advise using Color Adjustment Curves since they clearly show what’s going on. You can adjust all channels separately or just use RGBA curve. I used RGBA for this example.

The main idea is to squish the color range. The easiest way to do it is to just move the end point a lot lower and the start point a bit higher (colors that are lost are usually the brightest one, hence you need a stronger conversion on them). If you’re feeling adventurous, I would suggest you to try to adjust it in a bit more advanced manner – for example simple curve (if you don’t see it, it’s a lower left quadrant circular arc, as Unicode chars sheet informed me) will increase contrast, and S-shaped curve will both increase contrast and ensure that bright parts will still be quite bright.

Screenshot showing the first curve
Screenshot showing the first curve

The key to success here is… the fact that Overview docker still doesn’t support HDR. There is a high chance it will change with Qt 5.13 or Qt 5.14 where 16bit QImages are introduced, which will solve all of our HDR preview issues: Bug 406698: Tools have SDR previews on HDR display. Fortunately till then, we’ll free to use it as our SDR glasses: whatever you see in the Overview docker, it’s exactly the same to what you’ll see after converting. Make the Overview docker big and make sure it shows all the colors and details you want to include in the final picture. At first, just make sure the image is dark enough to see all colors; then make sure the contrast and saturation are the best possible. (Protip: sometimes colors are brighter after conversion than it looked before; I had it which the central part of this picture, it was dull orange in HDR, after conversion it started to be nicely yellowish).

Screenshot showing the second curve
Screenshot showing the second curve
Screenshot showing the third curve.
Screenshot showing the third curve

After you created all of those filter layers (you don’t have to create multiple, but you’ll probably end up with more than one at some point), don’t convert the image yet. It won’t work. Krita will convert all the layers below color adjustment layers, they will get white where you want your colors and saturation, and then color adjustment curves will be useless (and Krita helpfully makes them broken, too). On top of that when I tried to do this and quickly pressed undo, seeing the disaster my picture became, the undo didn’t work properly; Dmitry told me that it’s because some of his code isn’t in the development version yet – which means the release version doesn’t have it either, but maybe the next release will have a proper undo. But don’t rely on it – backup your files before doing anything potentially disastrous!

To avoid the trouble, just right-click on the Layers docker and select “New layer from Visible”. If you have all of your backups (check them!), you can just remove all of the layers and then finally convert the image to sRGB color space. Voila! The process is done.

Bez kategorii · Development · Krita

Set up Linux Mint 19.2 on Yoga c940

As always, when the hardware is fresh new, it’s hard to set up an LTS release Linux.

When you intall Linux Mint, you’ll see that nothing works: touchpad doesn’t work and the pen either (make sure you have a standard HID mouse handy!), the display is 4K and there is no UI scaling at all, and while Bluetooth is happily working, there is no sign of WiFi. Last time I had the same problem with other fresh new Yoga I just used Ethernet cable to update my system and change the kernel, but since Yoga c940 has no Ethernet socket, I had to figure out something else.

To fix your system, you need to do two things. (I did a lot more, since I obviously didn’t know which one would work).

New kernel

I user kernel 4.3.7, because that’s what was reported to be working here: so I downloaded it from here:

Note: you need four files: linux-headers-XXX_all.deb, linux-headers-XXX-generic-XXX_amd64.deb, linux-image-XXX-generic-XXX_amd64.deb, linux-modules-XXX-generic-XXX_amd64.deb.

Start Linux. Open the console. Use sudo dpkg -i filename.deb to install every file. Order: linux-headers-all, linux-headers-generic, linux-modules, linux-image. Otherwise it will complain about dependencies.

Since it’s a newer version than the one shipped with Mint, it will be automatically picked as default kernel, so you don’t need to do anything special to start Linux Mint with this one next time you boot.

Disable Secure Boot

If you checked “install 3rdparty drivers” during installation, you’d have heard about SecureBoot already and you’d think you already disabled it. But no. Go to the UEFI settings and make sure SecureBoot is really disabled. (If you did install Linux Mint, you should get System Setup option in GRUB. I’m not sure what if you installed something else, but I guess it’s more like an EFI thing instead of Mint’s).

Next time you boot, you should see nice UI scaling, your touchpad should work, your pen should work, and you should be able to connect to your WiFi.

After some settings

Fix Qt Creator on Cinnamon

I use this little script to start Qt Creator so it doesn’t have scaling issues:

/usr/bin/qtcreator "$@"

Lower the temperature while compiling

It looks like there is a feature that is disabled by default on the setup I described above. Without it, the average temperature is around 95°C, with it enabled, it jumps between 80°C and 95°C. I’m not sure what I can do to disallow 95°C at all… I guess I shouldn’t compile with all of my cores? And close Firefox just in case?…

The feature is called intel_powerclamp. First you need to check which device it is.

ls /sys/class/thermal/

And then for all folders called cooling_deviceX you need to check what type of the device it is:

cat /sys/class/thermal/cooling_deviceX/type

You need to find the cooling device that reports their type is intel_powerclamp. You can see that the feature is disabled when you run this command:

cat /sys/class/thermal/cooling_deviceX/cur_state

-1 means disabled. You can want it to be somewhere between 1 and the max_state (it’s 50 on my system). To do this, just run the following command:

sudo sh -c "echo Y > /sys/class/thermal/cooling_deviceX/cur_state"

where X is the id of the intel_powerclamp cooling device, and Y is the % of the idle that you force your processor to be.

Full script (for my case):



while getopts ":hi:p:" opt; do
  case ${opt} in
    h ) # process option a
        echo "Usage: -i [intel_powerclamp] -p [processor] -h (help)"
    i ) # process option t
    p ) # process option t
    \? ) echo "Usage: -i [intel_powerclamp] -p [processor] -h (help)"

echo -e "Processor = ${PROCESSOR}"
echo -e "Intel Powerclamp = ${POWERCLAMP}"

echo $PROCESSOR > /sys/class/thermal/cooling_device1/cur_state
echo $POWERCLAMP > /sys/class/thermal/cooling_device8/cur_state

cat /sys/class/thermal/cooling_device*/cur_state
Art · Development · Events · Food · Krita · Others · Painting · planet

Krita MiniSprint 2019

Day 1

I had to wake up really early and since I went to sleep very late the previous evening… and couldn’t sleep… I got like 1.5h of sleep. Fortunately, I didn’t have any unfortunate events because of that, everything went fine. I ate my nutella sandwich and took two ham sandwiches to eat later. Got through the luggage control, then other luggage control – weighing and checking boarding passes. The flight was delightful and beautiful – I’ve taken so many photos!

The flight started in a very clear, sunny air over Warsaw, but ended in a cloudy Amsterdam. The layer of clouds was so thick that before the plane started landing, buildings were still super small beneath us; and then the plane started to lower its altitude and flied into the clouds, and when the clouds started clearing up, the ground was so close – I’m sure there was less than 100 meters or something. We were basically just over the landing strip – not a minute later we touched the ground. (I remember I was curious about our altitude earlier because the plane started braking (slowing down using its wings) in the middle of the thick white milk soup we were in, and there is no reason to brake in the air unless you are preparing to get onto a landing strip, right?).

Amsterdam airport is huge. Fortunately since I was there earlier with my boyfriend, I knew the exact path – I could even recall the stores that I was passing by. I got to the Plaza, where the train platforms were located. I bought an apple juice – it’s so weird, Dutch people don’t really have 0.5l bottles of juice, it’s either water or soft/soda drinks or some “sports” drinks (there are some but not a huge variety like in Poland) (well, except for this dreg-filled “healthy” varieties that were available in a fridge next to the eating-ready sandwiches). Even weirder was the cash desk: there was a display for the customers, but the cash desk wasn’t self-service at all – there was a terribly bored and uninterested in anything that was going on around her lady standing on the other side of the desk. Also the credit card reader wanted me to do some stuff, not just take my money – I think I was supposed to tell it whether I want a receipt or not. The bored lady finally helped me with that, though.

I found the correct train and Boud fetched me from the Deventer station. I am always terribly shy the first day, so the whole journey from the station to his house was completely dead silent. My brain wasn’t silent, but I usually don’t see a good reason to voice anything when I’m at that state.

When we entered the house, Irina and Wolthera were already there, waiting for us.

Fast-forward, because the rest was probably boring since I don’t remember anything. I got a new laptop. It’s pretty – all shiny and metallish – quite powerful, has HDR and a stylus to draw on the screen. Which means I have everything I need to develop Krita. I can check how well Windows Ink is doing. Also Windows put all the HDR on its head in some recent updates and everything I learned about Windows settings and their relationships to HDR in Krita is reversed now. It made sense before, but I guess Windows guys wanted to make it smarter and bind the standard brightness slider to the SDR brightness, and they did it… by binding it to the reported maximum number of nits… which obviously causes trouble in Krita if you use any brightness setting except for the lowest one. I still need to test it on my home HDR setup since Dmitry claims that it’s all caused by brightness buttons on the keyboard. I strongly disagree, but without the facts, I cannot say for sure.

Windows sneakily forced me to use the Microsoft account – I am so used to Linux Mint LiveUSB installers needing network to download everything that I didn’t think twice before I put the WiFi password in the textbox in Windows installer, and then it wouldn’t allow me to make a local account no matter what we did – turn off the WiFi, hard reboot the laptop, try to undo…

Somewhere at that point everyone was eating lunch: not sure what everyone had, but I remember Wolthera eating those weird things with liquid minced meat. A Dutch special, no doubt. No idea how they make it liquid; it looks a bit as if they were making some kind of bechamel sauce with minced meat and using it as stuffing for various foods. I just ate my boring ham sandwich I had made the previous day for myself.

Then Dmitry arrived. He brought gingerbread cookies for comparison, so naturally Irina and I took our cookies out as well. My cookies were very dark, thin and crunchy, cut into normal cookie cutter shapes (cats, pigs and hearts bought in OpenLucht Museum in Netherlands, spaceships that haters say are Christmas bells, snowmen, and some little humanoids) (recipe here: Gingerbread cookies); Dmitry’s were the most beautiful, cut into various shapes relevant to painting and Krita: pens, pencils, styli, Linux’s penguins and Kiki’s faces with her famous ears (same recipe, but he mixed his spices himself and he made them thicker and with more baking soda). Irina had made ginger cookies, not gingerbread ones, cut into circles (recipe here: Irina’s Ginger cookies).

There was lasagna for dinner. I don’t think I’ve seen any layers in it and the meat was in liquid form again (although different! not bechamel this time), but it was tasty, so I won’t complain 😉

To finish off the culinary stuff, the whole evening I was exploring Dutch “lemonades” that have nothing to do with lemons. There was anis seed lemonade and pear lemonade, both which I tried, there was also citron something and mint ones, which I haven’t. There was also Irina’s handmade lemon lemonade, very sweet and sour at the same time, very tasty. All the other “lemonades” were more like a syrup that you need to dilute with water. We have something like that in Poland too, but it’s usually raspberry or briar (wild rose) which basically looks like coke, but it’s incredibly more healthy (although they still have a lot of sugar inside).

Dmitry “fixed” two bugs that day. The first bug was mentioned by Wolthera, about a brush delay – she showed the same brushes in Krita and SAI and how much slower those in Krita are. It turned out that of course there was a stabilizer turned on…

The second one was mine, about HDR. I turned it on on my laptop and some time later, my laptop went to sleep and when it woke up, it was all white – every bright color became white, every not bright color became brighter. It had still constrained nits according to what SDR should show, but the colors were all wrong. And here, too, Dmitry figured it out – it turns out my laptop turned off HDR when unplugged, and since it’s all new etc., it went crazy during sleep. I unchecked the “disable HDR while unplugged” and put my laptop to sleep again and it all fixed itself.

Another terribly important and incredibly nice thing that happened to me that day was that I got two duvets to sleep under. Of course I had my hot water bottle in the suitcase as a last resort, but it’s always better not to need it. The room was also nice – the bed was higher up under the ceiling, with a ladder, and the view outside the window was quite surreal. There was a big flat roof of a tenant with grass on it, and around it there were triangular rooves of other tenants, one floor higher than the flat roof tenant. On the right there was additionally a big tree, a bit higher than all the tenants.

Unfortunately I forgot to make a proper photo of it when it wasn’t way too dark or raining. That’s a shame – considering the next Krita Sprint will be in Rennes, I’m not sure if I’ll be able to fix that terrible mistake. Oh well, that’s what painting is for – recreating all untaken photos.

Day 2

Next day I woke up quite early just to run head-first into another cultural shock. It turns out that the typical Dutch breakfast is… sweet. Which means their typical breakfast sandwich is a piece of bread, butter and chocolate sprinkles (btw chocolate sprinkles were different from the Polish ones, too: ours are smaller and more crunchy, theirs were, I think, actually made out of chocolate and they melted in my mouth instantly). There was also weird Nutella-like cream, quite light in color but with darker cookie bits mixed in. I don’t remember all the choices, but I know there was also honey and some other weird sweet paste. All of it was to be put on Irina’s hand baked bread.

(Me having Nutella sandwiches the previous day is not being a hypocrite, but a very notable exception caused by both a lack of sleep and early getting up – it’s hard to eat anything at that hour. Also I’m talking about general trends in society, in Poland, the general trend in society is to eat ham sandwiches or fried eggs, or something similar, definitely savory, not sweet).

We went for a walk and, since the lunch time started to creep in, we bought some lunch items in the Tea Room. Other people took pastries with cheese or this weird liquid minced meat inside, I chose a bread roll with some vegetables and cheese on it. The bread roll was phenomenal, if they had only fixed the ratio between a very intense tasting vegetables/bacon topping and the bread roll, it would have been perfect – but since there was more topping than bread, it was a bit too intense for me.

Dinner was simple but fashionable – halves of peppers with minced meat inside (the solid one, not liquid, fortunately). It was tasty, and the bread roll that was served alongside it was quite interesting – a huge flat surface, surprisingly soft, especially if someone saw this kind of shape only in Georgian bread.

I got a cup of hot chocolate. This is remarkable because I’d got a promise to get a hot chocolate from Boud long time ago, in April or March, and from now on, we’re even. (At least for hot chocolate. Someone promised me pancakes from cast iron pan for breakfast… 😉 ). The hot chocolate was nice, although it kind of seemed more similar to just a standard cocoa drink (milk + cocoa powder + sugar) both in taste and consistency than I expected. It did have however this cozy feeling to it that proper hot chocolate should.

I found another bug that Dmitry later “fixed” just as easily as all the previous ones. So as I said about Windows, it messed up all the HDR settings, or at least they were different from before. After some time, I noticed artifacts in my Small Color Selector (the only HDR-enabled color selector). I also noticed that Dmitry’s color selector looked different for the same nits and hue values – but I brushed it off. The artifacts were important though. It turned out that Windows reports different maximum nits values for different brightness levels, which messes up Krita completely (and is contrary to/not mentioned in specification). To fix the artifacts, one just needs to lower the brightness to minimum… (Dmitry says it’s probably a bug in IntelHD drivers that was exposed by Windows doing weird things).

Later in the evening we had a very nice discussion with Dmitry about Russian and Polish translations of various books and movies – Alice in Wonderland, The Jungle Book, Winnie the Pooh etc., especially the translations of names and gender. In the meantime, Boud, Irina and Wolthera were mysteriously whispering in Dutch behind a closed door… gossiping about us, no doubt 😉

Day 3

I haven’t eaten anything for breakfast that day. As soon as I went downstairs, there were new people in the living room – they were expected, of course, but I didn’t expect them so early. I tried to both follow the conversation and do my own things. But as soon as Wolthera came downstairs, we went for lunch.

We went to that really nice Dutch restaurant where my favourite-Dutch-person-that-I-don’t-know-a-name-of was a waitress. (I’m not sure what I like about her, but I think it’s her wide smile and a generally expressive manner). I ordered three eggs with cheese and ham. It was two slices of bread put together on the plate so that they made a circle, then on top of that slices of ham, then three eggs, then slices of cheese, all fried together on a small frying pan so it was shaped into a circle, too. Unfortunately, this amount of ham and cheese took all of the flavour of eggs away and the dish was overall a bit too greasy for my taste. The bread was delicious, though.

I left all of the talking to talking professionals. (My boyfriend said I can’t write “I left talking to professionals” because that would be diminishing myself, as if I wasn’t a professional. In Polish the phrase is used so frequently, often as a half-joke, that it wouldn’t be considered dismissive towards one, I think). I was listening to the bits about neural networks, but that’s all. Fortunately Dmitry is much more interested than me in using special super powerful CPU instructions to make Krita even better in terms of performance.

Dinner was in an Indian restaurant. I ordered my most beloved chicken biryani and made sure that garlic naans were ordered (ok, Wolthera made sure. Her memory is not terrifying, it’s useful). Naans were delicious, different from most of those I’ve eaten (they are usually less soft and have less sugar – I could clearly taste sugar in those), but great. Biryani, however, was… mediocre. They put peas and carrots in it. I’m not against vegetables in general, but those peas tasted as if they weren’t fried or anything, so their raw taste didn’t match the rest of the biryani at all. If they wanted to make it more healthy, they could have made vegetables go into a side dish… but I got a side dish too, with eggplant in some sauce. I will never understand what cooks see in eggplants. Every time you want to use an eggplant, you should take courgette (zucchini) instead – it has a milder, sweeter taste and doesn’t have this bitterness to it.

People that we met were really, really nice. One of them constantly tried to hire me to paint a family portrait for them. I have a job and since art industry is very competitive, I guess it would be better if I wasn’t stealing their jobs all the time 😉 And the next day the plot twist happened, it turned out that we had been talking about oil or acrylic painting. Well, I’m definitely not the right person to go to, then.

Day 4

For breakfast I ate a slice of bread that Irina baked with butter. It was too early for real breakfast and way too early for a Dutch one (we had to be outside of Boud’s house at 7:15 am – I had full 4h of deep sleep, which is enough for me to be operational). On the train I found a sweet bread roll in my backpack that I had forgot about. I had been given it on the airplane – a real traditional Polish sweet bread roll with sweet pudding filling. I love them. There was unfortunately only one, quite small and squeezed from being in my backpack, so I couldn’t share and show my companions they should love them, too.

There was catering for lunch. Quite different from what I’ve seen in Poland – there was Indian food, for example. I took some chicken in sauce with rice. It was great and the chicken was softer that I thought possible (the exact opposite of what we can get from the Indian restaurant next to my house – it’s all tasty, but the chicken is always bone-dry). It looks like Indian cuisine that doesn’t include spiciness is always delicious. I also liked the way it was served – there were those little bowls, I could take rice and chicken in all the proportions I wanted, and since the bowl was small, when I took only a bit to taste it, I looked stylish and fashionable, not picky 😉

After lunch I noticed Wolthera holding a cup with some yogurt and stuff. It turns out that dessert was being given out by a mysterious magical lady walking around. She’d appeared out of nowhere, had given Wolthera the cup and disappeared just as quickly. Fortunately some time later I found the magical lady on the other end of the corridor, caught her and took my prey. I think it might’ve been a frozen yogurt with a meringue on top, or maybe just yogurt with meringue, hard to tell, but it was yogurt (forest fruit flavour) and it was cold. And tasty.

Around 3 pm Boud decided to come back home. Dmitry wanted to stay to attend one more talk, Wolthera was as tired as Boud if not more, and I started to feel bored next to our booth and not rested enough to try to keep up with talks. It was a bit unfortunate because I didn’t find time to talk with The Smiliest Dev – well, she calls herself The Littlest, but I usually just assume I’m littler than others, so I think she might be wrong in her assessment. Or I am wrong. I should’ve asked her what height she is. My description is based more on my own perception, and what I was seeing was mostly her wide smile and beautiful hair. Ehh, well. Maybe another time.

When we were coming back from the conference, me leading two zombies or, alternatively, me being led by two zombies – how did we arrive safely that day, honestly – I was bravely fending off accusations of not having anything to eat. My backpack is nearly as magical as that lady, it always has something to eat. Wolthera was merciless, though. It turned out a package of M&M’s is not food. Cookies type 1 are not food, muesli bar is not food, chocolate bar is not food, cookies type 2 aren’t food, and basically I didn’t have any food, according to her. I wonder if my sweet roll would be considered food. Since Wolthera is Dutch, I don’t take her judgement in that department too seriously – I mean, they have liquid meat after all. (When Indians rant about mild food, I can smile and tell them I just prefer when my delicious food doesn’t cause pain; for Dutch I can only have some kind of ethnographic curiosity).

For dinner I had another Indian rice and chicken in sauce. Irina’s home made though, not catering. A different kind, still tasty, and I could put some crunchy stuff on top so it had a bit of a different texture. There were also slices of raw cucumber. It isn’t a combination I would make – see, Dutch are weird in terms of food – but it wasn’t bad at all. And at least it wasn’t inside the rice meal as they did in the Indian restaurant with peas and my biryani.

I got some Dutch waffles to take home. Those round flat waffles with caramel inside. They are quite nice; moister than the regular ones that my mom sometimes makes.

Day 5

As sprint days go, this one was very quiet. Boud was meant to talk with me about my TODO list, but looked super busy with his keyboard, and at 11 am he and Irina went out not to come back until after I went to the airport. Dmitry was quietly working with his new laptop at first as well, although later he convinced me that using Ninja would be a great idea, which it wasn’t. So I volunteerily broke my build (well, technically, install. It was complaining about some missing libraries). Wolthera woke up (or at least went downstairs) after, I think, Boud and Irina went out, not a problem since she was staying there anyway, and was – as you can guess – quietly doing something on her laptop as well.

Painting of a desert I've made that day
Painting of a desert I’ve made that day

Dmitry went home around 1 pm, that left only me and Wolthera in the house. She offered to bring some lunch for us. And coffee beans (I think it was beans), because the express run out of coffee and there is no way for Wolthera to start a day properly without coffee. Lunch was nice, two different kinds of pastries.We wanted to heat it up in the oven, but all of our attempts to turn the oven on failed miserably (it’s worth noting that my participation was mostly looking at the oven with an understanding smile and “oh, yeah, so that piece of technology, that’s the oven, that’s how you call it, okay, I see it has some buttons and knobs, oh yes, just as ovens should”). The pastries were good even cold, though. One of them was a thing that looked like a hotdog, but it was minced meat inside a thin, but layered multiple times, weird dough that looked like it was fried (and the minced meat wasn’t liquid!); and a pizza-like dough with pizza-like tomato based stuffing.

Much more interesting is what Wolthera brought for dessert. She said those are cookies that are made or sold around this time of the year, typical for Dutch and seasonal. Of course I had to try them – little chance I will be in the same country around the same time of the year, unless Krita employment really requires a yearly EU flights ticket.

They were delicious. I’m including a photo of the package just in case you have a chance to be in Netherlands in autumn. Those are very little, perfectly round and rounded cookies with some spices (Wolthera said later that you can buy the spices mix in Netherlands, but I didn’t know at that time and didn’t buy it). Tastes a bit like gingerbread cookies, but differently. Hard to tell, because those cookies were additionally covered in white chocolate and a generous amount of cocoa powder. Spices in the cookies, sweetness of the white chocolate and bitterness of the cocoa powder create a unique and incredibly good taste. (Of course I decided to steal the idea and try to make them at home, I already bought white chocolate).

Truffel kruidnoten package

On the airport I went to the same Albert Heijn store I had been to on Monday. I looked through all the sweets shelves (they have 1kg M&M’s packages!) and finally found one with something similar to the cookies Wolthera had showed me, I had no idea you could buy them without chocolate and cocoa powder… It turned out you can. There were other kinds, too: just cookies; cookies with white chocolate; cookies with milk chocolate; and then, finally, at the very end of the shelf (I had to reach deep inside) I found the white chocolate + cocoa powder (“Truffel”) ones. I was already worried about the weight of my luggage, but 250g more wouldn’t hurt, would it?

After a quick and very unhealthy dinner I went to the check-in. I was pleasantly surprised when they told me not to unpack my stuff – neither electronics nor liquids. I was much less pleasantly surprised when it turned out that every luggage with a laptop is stopped to be manually checked. Not unpacking didn’t save me any time after all… After I dealt with check-in, I only had 10 minutes until the gate was supposed to be opened.

Supposed to, because planes aren’t the most punctual in the world. I had to wait 40 minutes more. And the plane was different from what it supposed to be, so I didn’t get the seat next to the window. I wasn’t that disappointed because it was already dark outside. Landing in Warsaw was beautiful though – very thick fog with lights and industrial structures looked really amazing, mysterious – just like this indie game called “Inside”.

It looked interesting

On the plane I was mostly drawing on my new laptop – I noticed one flaw of our HDR demos, basically there was nothing that would show both super bright and super dark colors so that the dark areas still had details in them. I decided to fix it immediately. Some kind of an intermediate result below (the tree is way too big for the little river I started painting in the valley, but it is bad in more ways than one so it’s gonna be deleted as soon as I open this image to continue painting):

Unfinished painting of a sunset, made ion the airplane
Unfinished painting of a sunset, made ion the airplane (HDR, squashed to SDR afterwards)
Development · Krita · planet

Windows Krita Development


I needed to patch Qt on Windows, so I had to leave my comfortable Tusooa’s script development environment based on pre-built dependencies taken from the KDE Build Factory and make an actual proper Windows Krita development environment. Since I’m gonna need to make another one very soon and very quickly, I decided to write down my experiences before I forget it all.

List of things to download and install (for details go to, which is also a place I took versions information and some sentences from):

I created a new directory: C:/qtdev (kritadev was taken). Inside I have two directories: krita and env-dev. I cloned Krita’s code repository into krita directory:

git clone krita


In env-dev I made a few scripts that helped me with build.cmd script without having to fight with cmd too much. This file is called env.bat:

set PATH=%PATH:C:\Perl64\bin\;=%
set PATH=%PATH:C:\Strawberry\c\bin;=%
set PATH=%PATH:C:\Strawberry\perl\site\bin;=%
set PATH=%PATH:C:\Strawberry\perl\bin;=%
set PATH=%PATH%;C:\mingw64\mingw64\bin;C:\%ProgramFiles%\Python36

set BUILDROOT=c:\qtdev\env-dev
set PATH=%BUILDROOT%\i\bin\;%BUILDROOT%\i\lib;%PATH%
set "WindowsSdkDir=%ProgramFiles(x86)%\Windows Kits\10"
set "WindowsSdkVerBinPath=%ProgramFiles(x86)%\Windows Kits\10\bin\10.0.18362.0"

Next one is buildall.bat:

set MINGW_BIN_DIR=c:\mingw64\mingw64\bin\
..\krita\build-tools\windows\build.cmd  --no-interactive --download-dir .\d\ --deps-build-dir .\b_deps\ --deps-install-dir .\i\ --krita-build-dir .\b\ --krita-install-dir .\i\

Then buildkrita.bat:

set MINGW_BIN_DIR=c:\mingw64\mingw64\bin\
..\krita\build-tools\windows\build.cmd --no-interactive --skip-deps --download-dir .\d\ --deps-build-dir .\b_deps\ --deps-install-dir .\i\ --krita-build-dir .\b\ --krita-install-dir .\i\

Last one, justcmd.bat, actually untested yet in time of writing, but should be working just fine:

set MINGW_BIN_DIR=c:\mingw64\mingw64\bin\
..\krita\build-tools\windows\build.cmd --no-interactive --cmd --download-dir .\d\ --deps-build-dir .\b_deps\ --deps-install-dir .\i\ --krita-build-dir .\b\ --krita-install-dir .\i\

Notes about all of those scripts:

  • env.bat
    • Usage: once for every new cmd.exe window, before any attempt in building Krita or dependencies.
    • It is just used to make sue I don’t have anything misleading in my PATH (I installed Strawberry Perl, which of course installed a bunch of c++ compilers – and yes, this werid stuff actually does what I think it does and does remove those paths from PATH; if you want to adjust it to your needs, make sure earlier that t does remove everything you want it to remove! If you just use set, you won’t break your system, so you can play with setting PATH how much you want) and to actually put there stuff that I didn’t have in PATH before (Mingw and Python).
    • You need to adjust it to your needs, especially the Windows SDK version/location and unwanted paths.
  • buildall.bat
    • Usage: it will download source code for all dependencies to download directory, put it in /b/ext_X/s/ directories, then run cmake, make and make install on it. It will take a few hours. Also note that if you want to hack on Qt, it will replace your code and your git repository you made in /b/ext_X/s/ with a clean version of Qt, so be careful to not lose your changes.
    • Options:
      • –no-interactive – don’t ask about anything
      • –download-dir – location to put .zip archives with dependencies source code
      • –deps-build-dir – directory to build dependencies in
      • –deps-install-dir – directory to install dependencies into – to make it easier, keep it the same as Krita’s install directory!
      • –krita-build-dir – directory to build Krita in
      • –krita-install-dir – directory to install Krita into – later you’d need to go there and then ./bin/krita.exe will be your executable to run
  • buildkrita.bat
    • Usage: it will run cmake and then make and make install on just Krita.
  • justcmd.bat, my new baby, will run build.cmd in –cmd mode, which is a very hacky way get access to commands that make those scripts above practically obsolete.
    • cmake-deps – run cmake on dependencies (see warning in buildall.bat section!).
    • make-deps – run make and make install on dependencies.
    • cmake-krita – run cmake on Krita.
    • make-krita – run make and make install on Krita.

Ordered list of things to do

To sum up, here is the list of things to do in order:

  1. Install all things on the list.
  2. Clone Krita’s repository.
  3. Create directory c:/qtdev/env-dev/ (the rest should be created by build.cmd).
  4. Adjust env.bat to your needs. Save all scripts to c:/qtdev/env-dev/.
  5. Open cmd.exe – unfortunately, since build.cmd script is in cmd, you can’t escape it…
  6. Go to c:/qtdev/env-dev/. Yes, that is important, very important. You want to run build.cmd script from inside your build directory and *not* from inside your source code directory. (Even if you were running build.cmd directly, without my script that clearly uses “./”, the suggested paths would be in source code, and providing custom path is so tedious without a bash completion…)
  7. Run env.bat. You only need to run it once per cmd.exe window.
  8. If you didn’t build anything yet, just run buildall.bat. It will take care of everything. Go for a walk, watch a movie, call your grandma – it will take some time…
  9. For any subsequent build, just run justcmd.bat and later use command make-krita to build Krita.

Making patches to Qt

If you want to hack on Qt, there is some more things you’d want to remember:

  1. Just after you built Krita with Qt for the first time, but before changing the code, initialize a git repository in Qt’s source code directory (it will be located in c:/qtdev/env-dev/b_deps/ext_qt/s/). Create a .gitignore file (just copy something from the internet) and make an initial commit. It can take several minutes on NTFS, so don’t get worried if it doesn’t seem to be willing to end after a moment. Just be patient and go get a snack.
  2. DON’T run cmake on Qt. Or, be super careful about it. I just commented out the section that should download and extract the source files to make sure it doesn’t do that.
  3. Make extra sure you saved your patch outside of Qt’s source code directory (outside of your new fresh git) when you want to finally introduce the Qt patch to Krita’s ext_qt code. As I said, cmake will replace Qt with a clean version and later add your patch (that you of course already put in ext_qt/CMakeList.txt and ext_qt/ directory, right?) on top of the Qt’s source code.

Common pitfalls

  1. “Directory is not empty” (during any kind of ext_XXX building or extracting)
    • just run the script again.
  2. “File or directory doesn’t exist”
    • regarding ext_qt/s/.
    • If you check it, there is one directory inside, “qtbase” in my case – the same you changed.
    • You can’t remove/delete this directory (even with admin rights) and build will fail every time.
    • Solution: just restart your PC. Windows doesn’t have a proper root account, so things like that can happen, but fortunately it gets sane after rebooting.
    • Another possibility (thanks to Dmitry, of course): some executable is running, using those files or libraries. It might be Krita or Qt Creator. Make sure you closed them before trying to compile Qt.
  3. “Can’t find file to patch at input line X”, “Perhaps you used the wrong -p or –strip option?”
    • It’s probably because you copied the instruction for the patch from the line above and you didn’t notice the -d qtbase option.
    • Either remove it, or change the patch that it doesn’t contain qtbase part of the path.
  4. “patching file [path] Reversed (or previously applied) patch detected! Assume -R? [n]”
    • delete everything in b_deps and start again… I’m still not sure where exactly it’s written that cmake don’t need to extract the files (overwrite them) anymore.
    • -R would be wrong, and choosing “n” will break the running script.
  5. “Assertion failed: hunk, file ../patch-2.5.9-src/patch.c, line 354”
    • Convert LF to CRLF endings in the patch.
  6. “cc1plus.exe: error: one or more PCH files were found, but they were invalid”
    • Run env.bat script for this commandline, please.


In time of writing, if you want to have tests on Windows, you need to change build.cmd or call make directly. Build.cmd script has no option to turn those on.

If you turn it on in build.cmd, those tests will be located in c:/qtdev/env-dev/b/bin/ instead of respective folders like on Linux. Additional complication is that they often use some .dlls that are not there (since dependencies are built in b_deps). To fix that, I just copy the binary file from b/bin/ to i/bin/. Below there is a handly script that does it for me (and ensures that the test is freshly built):




if [ ! -z "$MAKELOC" ]
	echo "Current dictionary: ${CURR}, changing to ${MAKELOC}..."
	cd ${MAKELOC}
	rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
	${MAKE} -j8 ${NAME}
	rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
	echo "${MAKE} ${NAME}"
	cd ${CURR}
	rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi

cp b/bin/${NAME} i/bin/
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi
rc=$?; if [[ $rc != 0 ]]; then exit $rc; fi

Qt Creator

(Before you start to set up Qt Creator, make sure you can build Krita from console).

First you need to create a new Kit. You need to set up at least Compiler (make sure the path is correct!), Debugger, Qt version and CMake Tool. In the Kit settings remove all the properties that are passed to cmake. Make sure CMake Configuration field is empty, and CMake Generator should point to CodeBlocks-Mingw Makefiles.

Then you can set up the project. Make sure the configuration points to “Release with Debug Information”. Debug build is still broken: Set up building directory to some random folder; configuration will fail, but that’s ok, because then you’ll get access to environment settings.

In Building Environment make sure you make the same surgery on PATH as you do in your version of env.bat script. Add a new argument to Building Steps: --j8 or --j4 or something else, depending on how many cores you want to use to build Krita. You can add a custom step after that: mingw32-make -j1 install/fast. Make sure all Key/Value pairs are correct. Then there is this risky step: put C:\qtdev\env-dev\b as “Version Directory” or however it is called in English Qt Creator (the first textbox on top).

Try to build Krita inside Qt Creator (do it only after you have all dependencies built). If it works, make sure you can still build Krita from console, too.

Tip: if everything seems correct except Qt Creator complains about some FindECM and you have no idea where you should be looking for it, that means you wanted to cheat the system and put something else as building directory.