How can I export a krita (kra) document with many layers to a png using command line?
There is Calligra Converter:
sudo apt-get install calligra-libs
calligraconverter input_file output_file
or you could try this solution:
Artscript in Files/Nautilus
Artscript is a software to convert/watermark/glue-together on the fly a big range of images format. Even SVG, *.kra and *.ora.
Download and unzip Artscriptk source code in a folder. Get the last here
- Then with Files go to
- Create a file Artscriptk
give it execution permissions
sudo chmod +x Artscriptk
and edit it:
paste this inside, and customise the path depending where you unzipped Artscriptk sources:
#!/bin/sh /home/<yourusernamehere>/path/to/artscriptk/artscript2.tcl $NAUTILUS_SCRIPT_SELECTED_FILE_PATHS
Now you can select files in Files/Nautilus, and do right click→script→Artscript and send the files to Artscript for using it.
I tried this on Linux subsystem for Windows (WSL), but for some reason it doesn't work. I figured out a quick little workaround though.
.kra files are really just archives, and they actually have 2 png versions of your image inside:
preview.png. So you can just use 7z or another archiving tool to extract the
so in one command that would be:
7z x my_image.kra -o. *.png
7z x my_image.kra -o. mergedimage.png
if you only want the latter.
-o. flag sets the output directory to the current directory, you might want to play around with that.