Introduction
KRA is the working file of Krita, the free and open source painting program. It keeps everything needed to carry on painting: paint layers, vector layers, groups, masks, filters, blend modes and the document’s colour profile.
Krita’s source code is public, so the format can be read from it, but there is no separate full specification. Other programs that need a Krita picture usually read the flattened copy stored inside the file.
Structure
A KRA file is a zip archive. Its first entry is an uncompressed file named
mimetype holding application/x-krita, so the text shows
near the start of the file. The archive also holds maindoc.xml, which
describes the image and its layer tree, documentinfo.xml with the title
and author, a folder of layer data in Krita’s own tiled format,
mergedimage.png with the flattened picture, and a small
preview.png.
Every entry, the attributes of maindoc.xml and the tiled, LZF-compressed
layer data are on the archive, layers and
tiles reference page.
Not described
The archive page follows Krita’s source code and the KDE tile data format page; Krita has no formal specification.
Known, not yet covered
- Reference: the child elements of
IMAGEare only named, and the files.filterconfig,.transformconfig,.colorizemask,.metadata, the keyframes files, assistants, palettes, storyboard and animation files have no layout on the page. All are written by Krita’s open source. - Reference: the alpha-only colour space IDs, and the byte order of 16-bit and float samples in tiles (the page infers BGRA order from a Rust reader’s index arithmetic).
- Reference: the legacy version 1 tile records beyond the count line.
- Reference: the root element and namespace of
documentinfo.xml. - Viewer: there is no Krita plugin yet.
Links
Software
- Krita – free painting program whose native format is KRA (Windows, macOS, Linux, Android, ChromeOS)
Reference
- Krita source code – KDE’s repository, where the reader and writer live