Krita/Manual/CommandLine

Jump to: navigation, search

As a native Linux program, Krita allows you to do operations on images without opening the program when using the Terminal. This option is disabled on Windows and OSX because it makes a DBUS connection which triggers firewalls and virus scanners, and we don't want to scare people.

This is primarily used in bash or shell scripts, for example, to mass convert kra files into pngs.

Export

This allows you to quickly convert files via the terminal:

krita importfilename --export --export-filename exportfilename

krita
This tells the terminal to use the program Krita.
importfilename
Replace this with the filename of the file you want to manipulate.
--export
This selects the export option.
--exportfilename
This says that the following word is the filename it should be exported to.
exportfilename
Replace this with the name of the output file. Use a different extension to change the fileformat.

Example:

krita final.png --export --export-filename final.jpg

This piece of code takes the file file.png and saves it as file.jpg.

PDF export

Pdf export looks a bit different, using the --export-pdf option.

krita final.png --export-pdf --export-filename final.pdf

This exports the file file.png as a pdf file.

Open with Custom Screen DPI

Open Krita with specified Screen DPI.

krita --dpi <dpiX,dpiY>

For example: krita --dpi <72,72>

Open template

Open krita and automatically open the given template(s). This allows you to, for example, create a shortcut to Krita that opens a given template, so you can get to work immidiately!

krita --template templatename.desktop

--template
Selects the template option
templatename.desktop
All templates are saved with the .desktop extension. You can find templates in the .kde/share/apps/krita/template or in the install folder of Krita.

krita --template BD-EuroTemplate.desktop

This opens the European BD comic template with Krita.

krita --template BD-EuroTemplate.desktop BD-EuroTemplate.desktop

This opens the European BD template twice, in seperate documents.

Print

krita file.png --print Prints the file.



This page was last modified on 18 August 2015, at 15:16. Content is available under Creative Commons License SA 4.0 unless otherwise noted.