Krita specific brushfiles (paintoppresets) own the extension “.kpp”. This files contain metadata (brushsettings) and imagedata (brushpreview). In fact it is a PNG format with additional metadata. This metadata describes all aspects of the brush along with the name of the brush and informations about an eventually used pattern or a predefined brush tip.

Naming, Renaming and Overwriting Brushfiles

The brushname is saved as metadata directly to the file, therefore renaming the file does not affect the brushname. A newly created brushfile inherits the brushname: Brushname and Filename are identical. Every resource file (brush, preset, pattern) must have a unique filename, otherwise only the first one that is found, will be loaded. Files can be organized in subfolders, but that’s not the best practice, because of possible duplicates.

When you tweak a preset and save it with the same brushname, krita warns you, that you overwrite the file. Acutally it isn’t overwritten. A new file is created with the original filename + a random 6 digit code at the end (eg BrushnameZV5570.kpp). The “overwritten” preset is kept as backup in case you change your mind and want it back. To prevent, that both files are loaded, an entry on a blacklist is created containing the path to the original overwritten file.

  • A newly created brushfile inherits the brushname: Brushname and Filename are identical
  • Renaming a preset file does not affect the brushname
  • Deleted or overwritten files are blacklisted to prevent loading them, but they still exist as a backup

All this can be a little bit confusing and isn’t really user-friendly. The way i avoid conflicts is to handle all files directly on the harddisk and never delete them in krita. Instead of overwriting files i assign new names like Brushname_new and save them again later, after removing the old versions from the folders.

Inspecting .kpp Files with imagemagick

Imagemagick’s identify command can be used to read out metadata from PNG files (LINUX):

$ identify -verbose [Path/Filename]
Presets with Patterns & Predefined Brush Tips

Presets that use a pattern store the image information in the metadata by translating it to a long string of characters. When the preset is loaded and the pattern isn’t present in the patterns folder, it is restored from the string in the metadata. Contrary to patterns, predefined brush tips are not stored along with the preset. Only the name (without a path) is written to the metadata.

Patterns are stored along with the presets - predefined brush tips not

About Backup Files and Blacklists

Every resource-type is blacklisted in a seperate xml-file, when a file is deleted or overwritten (eg “paintoppresets.blacklist”, “patterns.blacklist”,…).

Blacklist example:

1 <?xml version="1.0" encoding="UTF-8"?>
2 <!DOCTYPE m_blackListFile>
3 <resourceFilesList>
4  <file>
5   <name>/usr/share/kde4/apps/krita/patterns/HR_Wall_Paper.pat</name>
6  </file>
7 </resourceFilesList>
Restoring previously deleted files

Delete the corresponding entry in the blacklist and it will show up in Krita again. In the example above i have removed a default pattern. I am writing removed, because default resources will never be completely deleted, unless you erase them manually from the disk.

Cleaning up Backup Files

Cleaning up with the resource manager

Sometimes you should clean up your resource folders from old files. Not only to free disk space, but also to avoid problems with duplicates or orphaned entries in a blacklist preventing krita from loading other identically named files. This can be done with krita’s resource manager (menu -> settings -> manage resources…). When you have problems with presets not showing up in krita or presets missing their predefined brush tip (indicated by a cross on the brushpreview), cleaning up sometimes fixes the issue.

Customizing the Brushpreviews

The Scratchpad

The buttons below the Scratchpad help to speed things up

For a newly created preset, the scratchpad in the brushwindow is the quickest way to create a brushpreview. The buttons below the Scratchpad help to speed things up. The zoomlevel of the canvas is linked to the scratchpad -> zooming out the canvas helps to create a more detailed image, but its still difficult to make a nice preview this way. You can also use the image of the actually chosen brush. This is especially handy when you have just tweaked the preset a little bit. Unfortunately, the quality of the image suffers, everytime you overwrite it.

Modify the brushfile directly

The brushfiles are nothing more than png images, that contain additional informations (metadata). You can open them in Krita, like any other PNG, by dropping the file onto the canvas or by using file dialogue (ctrl+o). If you don’t see the .kpp files in the dialogue window, remove the filter for unsupported file formats and you should be able to open it normally.

The size of the image is by default 200x200 px. That is not a lot of space, to paint a nice brushstroke on it. The trick i use is to create the brushstrokes on a larger canvas, cut them out and scale them down to fit onto my brushpreview image later. You can also just scale the image up before editing it. You may even save it with the new size, but to avoid unnecessary large files, you should scale it down again, before you are saving the file.

For most of my brushes i have prepared the images seperately, so that i can open the .kpp, drop the new image on the canvas and save it back.

Other useful resources for creating brushpreviews

The KDE Community has created a standard describing Krita’s default brush presets to unify their appearance. The page also contains nice ready-to-use templates: Krita Brush Previews

Luca Gabrielli created this helpful Video at the same time i have written this article: How to create brushes in Krita with your personal Icon

For the Modular Brushset i have created a collection with backgrounds, brush tools, symbols and more, to quickly compose new preview-icons. I will make this collection publicly available later, after i have sorted some stuff out. You will find a download link here as well as in the resource section when i am done with it.