Logo Krita Brush Info Overview

Krita Brush Info is designed to read a Krita brush configuration and display it in a readable form. It can also compare two brushes and show the differences. This can be useful for seeing the structure of the brush parameters and to easily compare the differences between two brushes. It is easier to compare brushes this way than by hunting through the brush properties dialog in Krita, but it is not as pretty.

Acknowledgements are at the end of the page.

How it Works

Krita brush parameters are stored in 200 x 200 PNG files. These files typically have the extension .kpp in Krita. The PNG image is the brush icon and the parameter data are stored in the metadata. In Krita you can modify brushes and save them as new brushes. Your modified brushes are stored in the paintoppresets sub-folder in the Krita resources folder as .kpp files. You can find this folder in Krita 4 by going to Settings | Manage Resources... and then selecting Open Resource Folder. Brushes may also be built into Krita or come in resource bundles you obtain.

There is no standard for storing metadata in the PNG specification, as there is for JPEG and other file formats. However, the program ExifTool written by Paul Harvey (see Acknowledgements) does find the metadata. There may be other metadata in the file, but the brush parameters are in a field named Preset. This field is in the form of an XML element, also named Preset. This element has attributes including the name of the brush, and also a number of sub-elements, which are XML elements named param. These attributes and elements or sub-elements contain the brush parameters. (This information does not appear to be documented and has been obtained by experimentation. It may be wrong or incomplete.)

What Krita Brush Info does is run ExifTool on the .kpp files, extract the Preset element, and parse it for the various attributes and sub-elements. It displays these in a reasonably-easy-to-read form. It can get the attributes and parameters for two different files and compare them, displaying only the differences.

Krita Brush Info can also read .kpp files in resource bundles. For the Krita 4 built-in brushes a bundle with the brushes, e.g. Krita_4_Default_Resources, should be found in the share/krita/bundle folder in the installation directory. For Krita 3, the Krita_3_Default_Resources bundle can be found on the web. The bundles and others you may obtain are ZIP files and with a little ingenuity can be opened with a ZIP utility and the .kpp files extracted. This is essentially what Krita Brush Info does.

Caveats

The Preset element often contains a string "<!DOCTYPE params>". It is not clear what this is used for, and XML processing loses it. Thus if the attributes are reordered alphabetically, it is lost. This does not affect comparisons, but the output contains it or not depending on if attributes are reordered or not, and it will not be included in the formatted raw XML output.

The params in the Preset element have an attribute named type. Values seen include string or internal. It is also not clear what this is used for. It seems to be different in brushes obtained from the default bundle and those saved as copies of the brush. It is ignored in the comparison, and this seems to work.

The Interface

This is a screen shot of The Krita Brush Info interface.

Krita Brush Info Screenshot

The interface has a place to enter the names of two .kpp files, either from a file on the computer or a bundle. In the case of a bundle, you have to specify both the name of the bundle and the name of the brush file in it. The Browse button for the bundle files allows you to select a file from those in the bundle. The other Browse buttons open a file dialog to pick a file on the computer.

There is a check box to set if you want to compare parameters with the attributes in the order stored or sorted alphabetically. Unless this is checked, if the alphabetic order is different in two files, they will be marked as different even when the attributes have the same values. There is also a check box to include the formatted raw XML in the output, and there are check boxes to specify whether to get the brush from a bundle or a .kpp file. The example shown is getting the first brush from the Krita 4 default resources bundle and the second brush from the paintoppresets folder.

There are buttons to process Brush 1 or Brush 2, to Compare the two brushes, and to quit. There is no File menu. There is, however, a context menu, obtained by right-clicking on the form. It contains items to display an Overview, to set Preferences, and to display an About box.

Preferences

There is currently only one preference, the location of the ExifTool executable. (You want to use exiftool.exe, not exiftool(-k).exe.)

Installation

If you are installing from a download, just unzip the files into a directory somewhere convenient. Then run it from there. If you are installing from a build, copy these files and directories from the bin/Release directory to a convenient directory.

To uninstall, just delete these files.

You also need to install ExifTool (see Acknowledgements). You specify the location of exiftool.exe in the Preferences.

Acknowledgements

Krita Brush Info uses ExifTool by Paul Harvey to read the EXIF information in the .kpp preset file. This is free software; you can redistribute it and/or modify it under the same terms as Perl, which it uses.