用户手册

通过本在线手册了解 Krita 的各种特性，学习如何从其他软件迁移到 Krita。

目录：

入门知识

安装

开始使用 Krita

基础概念

界面导览

从其他软件入门 Krita

Photoshop 用户入门 Krita

Paint Tool SAI 用户入门 Krita

数位板

数位板是什么？

驱动程序和压力感应

Windows 下面可能发生的问题

Wacom 数位板

支持的数位板

笔刷的制作、载入和保存

笔刷选项下拉面板

制作笔刷预设

分享笔刷预设

画布上的笔刷编辑器

对称绘画工具

沿倾斜轴线对称

借助辅助工具绘画

类型

为技术图纸透视设置 Krita

理解和处理图像

图像包含哪些内容？

元数据

图像大小

作者和描述信息

裁切和调整画布大小

调整画布大小

保存、导出和打开文件

模板

欧美漫画模板

设计模板

单反相机模板

纹理模板

图层和蒙版使用入门

管理图层

图层类型

Krita 的图层合成方式

继承透明度和剪贴图层

蒙版和滤镜

选区

创建选区

编辑选区

移除选区

选区显示模式

全局选区蒙版 (绘制选区)

按照图层透明度建立选区

像素和矢量选区类型

与选区功能配套使用的常用快捷键

Python 脚本编程

Python 脚本编程入门

如何制作 Krita Python 插件

标签管理

新建标签并指定给一个笔刷

将已有标签指定给一个笔刷

更改标签名称

删除标签

软打样

超出色域警告

矢量图形

什么是矢量图形？

创建矢量图形的工具

排列形状

编辑形状

与其他程序配合工作

吸附

动画制作

动画曲线

制作流程

动画入门：如何绘制步态循环

导入动画帧

参考资料

日本动画模板

基本图层结构

图层用途概要

动画制作的基本流程

入门知识

欢迎使用 Krita 手册！我们将通过本节内容带你快速上手 Krita。

如果你已经具有数字绘画经验，可查阅 从其他软件入门 Krita 分类，它对比了 Krita 与同类软件的相同点和不同点，帮助你快速上手。

如果你刚刚接触数字绘画，可从 安装 开始，该小节介绍了如何安装 Krita。开始使用 Krita 一节介绍了如何新建和保存文档。基础概念 一节简要介绍了 Krita 各个功能大类。界面导览 一节介绍了如何使用 Krita 的界面，如平移、缩放和旋转画布等。

掌握这些基础后，可以进行进一步的学习。用户手册 的其他章节对 Krita 的各大功能进行了更为详尽的介绍。一般概念 一章介绍了数字绘画和绘画本身的各种基本理念。参考手册 一章可以查找每个按钮的作用。

目录：

安装

开始使用 Krita

基础概念

界面导览

安装

Windows

Windows users can download the latest releases from our website. [https://krita.org/download/] Click on 64bit or 32bit according to the architecture of your OS. Go to the KDE [https://download.kde.org/stable/krita/] download directory to get the portable zip-file version of Krita instead of the setup.exe installer.

警告

Krita 要求 Windows Vista 或以上版本。Intel 核芯显卡用户请注意：如果窗口是一片黑或者空白的，请更新你的显卡驱动！

Linux

Many Linux distributions package the latest version of Krita. Sometimes you will have to enable an extra repository. Krita runs fine under on desktop: KDE, Gnome, LXDE – even though it is a KDE application and needs the KDE libraries. You might also want to install the KDE system settings module and tweak the gui theme and fonts used, depending on your distributions.

Nautilus/Nemo 文件缩略图扩展

让我们先介绍完这一小点，接着才介绍如何在不同的发行版下面安装 Krita 本身。

Since April 2016, KDE’s Dolphin shows kra and ora thumbnails by default, but Nautilus and it’s derivatives need an extension. We recommend Moritz Molch’s extensions for XCF, KRA, ORA and PSD thumbnails [https://moritzmolch.com/1749].

AppImage 软件包

从 Krita 3.0 开始，我们建议首先尝试我们网站提供的 AppImage 包。这是在绝大多数情况下用上 Krita 最新版的最简单方式。只需下载该软件包，把文件属性改为可执行，双击运行即可。(也可以在命令行下面运行 ./软件包名称.appimage)

在该 AppImage 包所在目录打开命令行终端。

Make it executable:

chmod a+x krita-3.0-x86_64.appimage

运行 Krita！

./krita-3.0-x86_64.appimage

AppImage 软件包本质上是包含了所有所需软件库的 ISO 镜像，无需跟发行版的软件仓库和软件依赖问题打交道，只需消耗一点磁盘空间 (你要是安装了 Plasma 这只会更大)。

Ubuntu 和 Kubuntu

不管你在使用哪个版本的 Ubuntu，Krita 都能正常运行。但默认情况下它们只提供一个非常老旧的版本，所以你应该使用 AppImage 包或者 Ubuntu 软件商店提供的 SNAP 包。

OpenSUSE

最新稳定版在 KDE:Extra 软件仓库里：

https://download.opensuse.org/repositories/KDE:/Extra/

注解

Krita 也被包含在官方软件仓库里，你可以用 Yast 安装。

Fedora

Krita is in the official repos as calligra-krita, you can install it by using packagekit (Add/Remove Software) or by writing the following command in terminal:

dnf install krita

You can also use the software center such as gnome software center or Discover to install Krita.

Debian

The latest version of Krita available in Debian is 3.1.1. To install Krita type the following line in terminal:

apt install krita

Arch

Arch Linux provides krita package in the Extra repository. You can install Krita by using the following command:

pacman -S krita

要安装最新构建的 Krita 版本，请使用 aur 助手软件，如 aurman：aurman -S krita-beta

OS X

警告

Mac OSX is very experimental right now and unstable, don’t use it for production purpose.

你可以从我们 网站 [https://krita.org/download/krita-desktop/] 下载最新的软件包，它只在 Mac OSX 10.9 下工作。

源代码

虽然从源代码编译 Krita 比安装预编译的软件包麻烦得多，但也有一些好处：

你可以密切跟随 Krita 的开发进度。如果你定期从开发代码仓库获取新代码编译 Krita，你可以试用许多正在开发的新功能。

你可以在编译时针对你的 CPU 进行优化，而绝大多数的预构建软件包只会以最小程度的优化进行编译。

你可以马上获得全部问题修复。

你可以向我们的程序员提供反馈新功能的问题，帮助我们进行软件测试。这对软件开发来说至关重要，因此我们的关于对话框里会列出经常协助测试的人员名单。

当然这也有坏处：用开发中的代码进行构建也意味着会得到各种未完工的特性，有时候软件会变得不稳定，或者显示的界面有问题。不过极不稳定的情况并不多，切换回之前的修订也很简单。

So… If you want to start compiling from source, begin with the latest build instructions from the excellent illustrated guide [https://www.davidrevoy.com/article193/compil-krita-from-source-code-on-linux-for-cats] by David Revoy.

更多相关信息和问题排除办法请查阅 Calligra [https://community.kde.org/Calligra/Building] 的 Wiki 页面。

如果你遇到了问题，或者对软件编译并不熟悉，可以联系 Krita 的开发人员。我们有三个主要的联系渠道：

IRC：irc.freenode.net 的 #krita 频道

邮件列表 [https://mail.kde.org/mailman/listinfo/kimageshop]

forums [https://forum.kde.org/viewforum.php?f=136]

开始使用 Krita

Krita 刚启动后不会显示画布，默认也不会自动新建文档。要显示画布，就要先从 文件 菜单创建一个新文档。要打开已有图像，请使用 文件 ‣ 打开 或者把图像文件拖进 Krita 的窗口。

新建文档

可以按如下方式创建新文档。

在应用程序的顶部菜单点击 文件。

然后点击 新建，或者直接按 Ctrl + N。

Krita 会显示一个新建文档对话框：

Krita 是一个相当复杂的程序，它可以处理许多不同的文件，下面让我们一步一步来讲解：

自定义文档

你可以在此页自定义将要新建的图像：你可以指定图像的尺寸、颜色模型、颜色深度、分辨率等。

你可以在 内容 标签下的第一项为新文档指定一个名称。这个名称会显示在该文件的元数据里，Krita 也会在自动保存功能中使用该名称。如果留空，将默认使用“未命名”。

在“预设”下拉菜单中，你可以选择所需的像素尺寸和 PPI (像素每英寸)。

在预设下拉菜单的下面有一系列输入框，你可以设置自定义尺寸、文档朝向等。在预设下拉菜单右边有“另存为”输入框，你可以把当前自定义文档设置用这个名字保存为新的预设项目。

再往下我们可以看到“颜色”区域，你可以在这里选择颜色模型和位深度。更多相关信息可查阅 色彩管理设置。

在 内容 标签下面，你可以选择新建图像的背景色和图层数目。Krita 会记忆上次用过的图层数目，所以留个心眼。

最后就是描述框，可以用来记录一些思路。

从剪贴板新建

你可以在此页从剪贴板的图像新建文档，如屏幕截图。各个选项会自动按照该剪贴板文件进行设置。

模板:

我们为不同用途准备了特殊默认值的模板，它们按照用途被分为几个大类。模板是被保存在特殊位置的 .kra 文件，方便 Krita 快速调用。

你可以用任意 .kra 来制作自己的模板，在顶部菜单选择 文件 ‣ 从图像创建模板。这会把当前文档添加为一个新的模板，所有的属性包括图层和图层内容都将被保留。

在你按照需要新建一个文档后，窗口应该会显示一张白色的画布 (或者是你在前面指定的其他背景色)。

如何使用笔刷

现在点几下画布，如果一切正常，你应该可以在画布上进行绘画了！Krita 启动时会自动选择笔刷工具，如果没有，你可以在工具箱中点击 toolfreehandbrush 图标来启用笔刷工具。

当然，你会想使用不同的笔刷。在画布右边有一个叫做“笔刷预设”的工具面板 (它也在工具栏里，按 F6 弹出)，上面列出了代表各种笔刷的方块。

如果想要对预设进行调整，可在工具栏里找到笔刷编辑器，按 F5 也可以弹出。

点击任意一个方块就等于选中了该笔刷，可以使用它在画布上作画。要更改颜色，可以在高级拾色器的三角形色块里点击选择。

擦除

虽然我们也有用来擦除的笔刷预设，但切换笔刷到擦除模式更快。按下 E 键，你可以在当前笔刷的绘制和擦除之间切换。

绝大多数工具也都可以使用擦除模式，你可以在直线工具、矩形工具，甚至渐变工具里切换成擦除模式。

保存和打开文件

现在你已经知道怎么在 Krita 里作画了，你可能想要保存你的作品。保存功能的位置和所有其他软件一样：在顶部菜单点 文件，然后选择 保存。

选择想要保存画作的文件夹，然后选择你想要使用的文件格式 (‘.kra’ 是 Krita 的默认格式，它可以完整保存画作)，最后点击 保存 即可。某些 Krita 的旧版本可能有一个程序问题，你必须手动输入文件的扩展名。

如果你想要在互联网上分享你的图像，请查阅 为互联网保存图像 教程。

你还可在 界面导览 一节学习更多基础知识，在 基础概念 学习在 Krita 里进行数字绘画的基本要点。现在开始大胆地探索使用 Krita 吧！

基础概念

如果你刚刚开始学习数字绘画，你可在本页面学到许多重要的基础概念，它们将帮助你使用 Krita 入门数字绘画。

这个页面非常长，因为它尽可能地涵盖了与 Krita 功能有关的重要方面，而 Krita 的功能非常强大。本页也可看作是 Krita 核心功能的使用指引，通过阅读本页，我们希望你能搞懂各个按钮的功能，即使是你并不掌握它们的工作原理。

目录

基础概念

栅格和矢量

图像、视图和窗口

图像

视图

工具面板

窗口

Krita 的画布

图层和合成

工具

笔刷引擎

色彩

透明度

混色模式

蒙版

滤镜

滤镜笔刷引擎

滤镜图层、滤镜蒙版和图层样式

变形

扭曲笔刷引擎

变形蒙版

动画制作

辅助尺、网格和导线

定制化

栅格和矢量

尽管 Krita 主要是基于栅格的应用程序，但它也具备一些矢量编辑功能。如果你是数字绘画的新手，那么就要首先理解栅格和矢量的概念。

In digital imaging, a pixel (Picture Element) is a basic and lowest element of an Image. It is basically a grid of points each displaying specific color. Raster editing is manipulating and editing these pixels. For example when you take a 1-pixel brush which is colored black and painting on the white canvas in Krita you are actually changing the color of the pixel beneath your brush from white to black. When you zoom in and see a brush stroke you can notice many small squares with colors, these are pixels:

矢量图形与此相反，这种计算机图形基于数学表达式，它们与像素无关。例如，当你在 Krita 中的矢量图层上绘制矩形时，你实际上绘制的是一组路径，这组路径途经一组叫做“节点”的点，而这些点位于 x 轴和 y 轴上的特定坐标上。当你调整了图像大小或是移动了节点时，计算机会据此重新算出并绘制路径，然后显示由此形成的新形状。因此，你可以任意调整矢量形状的大小，而不会有图像质量的损失。

在 Krita 中，任何不在矢量图层中的内容都是基于栅格的。

图像、视图和窗口

在绘画软件中，你的工作空间由三大部分组成。

图像

最重要的部分便是 图像。

这是你从文件对话框打开或新建的一份图像的独立副本，你在它上面进行编辑工作。Krita 允许你通过 文件 菜单把文件作为一个新的副本打开，或者将它保存为一个新文件，抑或是进行增量保存。一个图像文件包含了图层、色彩空间、画布尺寸、还有包含了作者、创建日期、DPI 等的元数据。Krita 可以同时打开多个文件，你可以在 窗口 菜单中进行切换。

因为该图像是它在硬盘上的文件的工作副本，所以在保存时可以有下面的一些不同做法：

新建

创建一个新的图像。当你按下 保存 时，该图像被保存成硬盘上的一个新文件。

打开

在 Krita 内部生成现有图像文件的一个工作副本。在你按下 保存 时，你将用此工作副本覆盖原始图像文件。

将已有文档作为未命名文档打开

类似于 打开，但按下 保存 时将要求你指定一个新的保存位置，把它保存成一个不同的文件。这与其他软件的 导入 类似。

从当前图像创建副本

类似于 将已有文档作为未命名文档打开，但为当前显示的图像另存一个副本。

保存增量

让你可以快速保存当前图像的一个快照，快照的文件名会自动附加版本数字后缀。

上述功能对于进行美术生产作业的人们来说相当有用，因为他们需要在不同文件之间来回切换，或在进行大幅修改前留下备份。Krita 还内建了基于自动保存、自动增量备份和崩溃恢复的一套完善的文件报分系统。你可以在常规设定中对它们进行更改。

您可以通过**视图**查看图像。

视图

一个视图就是显示图像的窗口。Krita 允许你打开多个视图。你可以在不对图像本身进行任何更改的前提下操作视图的缩放、旋转、左右镜像和色彩的显示方式。这对于画手来说非常有用，因为他们需要通过改变查看图像的方式来分析画歪等作画失误。按 M 可对画布进行左右镜像，便于发现画歪的情况。

如果你在绘制某些曲线时觉得不顺手，你可以把视图旋转之后再画。你也当然可以在需要精雕细刻时放大视图，需要大笔勾勒时缩小视图。

Krita 可以显示同一个图像的多个视图

如果要为一个图像显示多个视图，可到 窗口 ‣ 新建视图 ‣ 图像名称。你可以在 窗口 菜单，或者按 Ctrl + Tab 来切换视图。如果需要并排显示多个视图，可到 设置，在 窗口 ‣ 多文档模式 下拉菜单选中“子窗口”。

工具面板

工具面板是 Krita 界面 的子窗口。它们包含了各种有用的工具，如拾色器、图层组、工具选项等。

The image above shows some of the dockers in Krita.

All the views and the dockers are held inside Windows.

窗口

如果你以前使用过计算机，你应该对窗口很熟悉：它们是显示各种程序的容器。

Krita 可以显示多个窗口，可到 窗口 ‣ 新建窗口。在多屏幕环境里你可以把窗口拖到另一个显示器上面。

下图展示了 Krita 的多窗口状态。

Krita 的画布

在 Krita 里新建一个文档后，你接下来会看到一个矩形的白色区域。这个区域就叫做画布。你可以在下图的红框中确认它的位置。

当你将画作保存为 JPG、PNG 等格式时，或者将图像打印出来时，只有在画布里面的内容才会被保存或打印，超出画布边框的内容会被忽略。不过 Krita 依然会保存超出画布边框的内容，你只是无法看到它们而已。画布的内容被保存在 图层 中。

图层和合成

就像是一个风景画家会先画出背景的天空，然后从最远的景物一步一步画到前景一样，计算机也会以类似方式处理你让它绘制的东西。如果你让计算机先画一个方形，然后在同一处再画一个圆形，圆形总是会被放在最后才画。这叫做 绘制顺序。

通过图层组，你可以将不同的元素放在不同的图层上，通过对它们进行排序来控制它们的绘制顺序，还可以附加其他效果。这叫做 合成。

你可以使用该功能把线稿置于底色之上，或者把树木放在远山前面，在编辑时它们不会互相影响。

Krita 的图层有好几种，每种都有不同的功能：

颜料图层

也叫做栅格图层，是最常见的一种图层。你主要在这种图层上面作画。

矢量图层

你在这种图层上面绘制矢量图形。矢量图形一般比栅格图像更简单，在变形后也不会变模糊。

分组图层

你可以把其他图层拖放到这种图层里组成一组，然后便可以对整组图层进行组织、移动、应用蒙版以及其他操作。

克隆图层

它们是另一个图层的实时克隆，你创建它们时选中的图层就是它们的母本，所有对母本图层的修改都会立即反映到它的克隆图层上面。

文件图层

这些图层会引用外部的已有图像，所引用的外部图像一旦被更改，引用了它们的文件图层就会立即更新。对于引用徽标等要经常改变的元素很有用。

填充图层

这些图层填充了 Krita 能随时生成的内容，如颜色或图案等。

滤镜图层

给其他图层加上一个滤镜。我们会在以后对此展开介绍。

你可以用 工具 来操作图层里面的内容。

工具

你可以使用工具来对图像的数据进行操作。最常用的工具自然是手绘笔刷，它也会在你打开 Krita 后默认选中。Krita 的工具可以笼统地被分为 5 大类：

绘画工具

它们被用来在颜料图层上进行绘画。它们既可以描绘像矩形、圆形和直线等形状，也可以按手绘路径进行绘画。它们可以使用笔刷引擎来绘制出不同的形状和效果。

矢量工具

这些是位于工具箱最上面的一组工具，用来编辑矢量图形。除了手绘笔刷外所有的绘画工具都可以在矢量图层上面绘制形状，但笔刷引擎不能在这种图层上面产生效果。

选区工具

你可以用选区来限定可编辑的区域，以避免影响到不需要编辑的部分。你还可以更改当前选区的轮廓。选区就类似传统绘画的留白胶，但它们用起来很方便，不像留白胶那么脏乱。

导线工具

包括网格和辅助尺等。

变形工具

你可以用这些工具对图像进行变形。我们以后会展开介绍。

上面的这些工具都可以在工具箱中找到，相关信息可以在使用手册的工具章节找到。

笔刷引擎

笔刷引擎，正如前面所述，会根据绘制路径和数位板信息添加相应的效果，形成一个笔画。

“引擎”是编程用语，它指的是一组相互关联的复杂代码，它们组成了某种功能的核心部分，同时还具备高度的可配置性。汽车的引擎为汽车提供动力，不同类型的引擎和我们对引擎调整会影响驾驶体验。而笔刷引擎控制的则是笔刷的形状和使用感受，不同的笔刷引擎能提供不同的绘画效果。

Krita 具备 非常多样的笔刷引擎，每一种的效果都不同。

左图： 像素笔刷，中图： 颜色涂抹笔刷，右图： 草图笔刷

举例来说，像素笔刷引擎比较简单，你可以用它进行绝大多数基本绘画工作，但如果你需要进行许多厚涂，颜色涂抹笔刷引擎可能会更有用。虽然它比像素笔刷引擎要慢，但它的混色特性可以让你画得更快。

如果你想要和上面完全不同的效果，草图笔刷引擎可以帮你绘制出潦草的线条，形状笔刷引擎可以让你快速铺开大范围的纯色。Krita 的笔刷引擎有许多有趣的效果，请试用它们，还有别忘了阅读使用手册中的相关章节。

要调整笔刷效果，可到“笔刷选项”下拉面板，或按 via F5。这些选项可被保存成预设，按 F6 快速访问“笔刷预设” 工具面板。

笔刷可以画出各种颜色，那么计算机又是如何理解色彩的呢？

色彩

人眼可以分辨几百万种颜色，它们是不同类型的电磁波 (光) 在物体的表面被部分吸收后反射形成的组合。

左图：CMY 色料减色法颜色，右图：RGB 色光加色法颜色。这种不同令打印机从印前色彩转换中受益。

在传统绘画中我们使用颜料作画。不同的颜料会吸收不同波长的光，从而呈现出它们应有的颜色。但是混合的颜料越多，被吸收的光就越多，颜色也会变得越来越浑浊灰暗，所以我们也把颜料的混合原理叫做 减色法。基于这种原理，在传统颜料混色中最高效的三原色都是比较明亮的颜色：青、品红和黄 (CMY)。

计算机同样使用三原色，它通过注明一种颜色中所含三原色的数量来保存颜色。但计算机的屏幕是发光体，把不同的色光混合后得到的光就越明亮，直到变为白色，所以它的混色原理叫做 色光加色法。计算机所用的最高效的三原色是红、绿、蓝 (RGB)。

计算机以像素为单位保存颜色的三原色数值。可用的颜色种类与颜色的 分量 或者 通道 的位深度有关。

上图是一张红玫瑰的图像中的红通道。我们可以看到花瓣是浅白色的，这意味着那些区域的红色含量高。茎叶的颜色很暗，意味着红色的含量少，因为它们是绿色的。

尽管计算机默认使用 RGB，它们也可以把颜色转换成减色法的 CMYK，或者可感知的模型如 LAB。不管是哪种模型，本质上都是在描述颜色的相互关系，它们通常都包含了三个分量。灰阶是个例外，因为计算机只会在这个模型里保存一种颜色有多白，所以灰阶图比较节省内存。

如果你把每个通道分离出来观察，你会发现它们看上去像是灰阶图，但它们实际上描述的是画面上的红、绿、蓝有多少。

Krita 具备一个非常复杂的色彩管理系统，你可以在 这里general_concept_color> 查阅更多信息。

透明度

和红、绿、蓝一样，计算机也可以保存一个像素的透明程度。这对于前面提到过的 合成 非常重要，毕竟图层要是没有透明区域也就没有把它们分成多个图层的意义了。

透明度和颜色用同样的方式进行保存，所以它也有自己的通道。我们通常把这条通道叫做 阿尔法通道 或者简称为 alpha。这是因为希腊字母“α”被用于在编程中表示透明度。

一些较老的程序默认不使用透明度。Krita 与之相反，它无法理解不带透明度的图像，并总是会给图像添加一个透明度通道。当某个像素在所有图层上都完全透明时，Krita 会在它的背景上显示棋盘格图案，如上面的玫瑰图像所示。

混色模式

因为颜色是被保存成数字形式的，所以你可以对它们进行数学计算。我们把这叫做 混色模式 或者 合成模式。

混色模式可在每个图层之间或每一笔画之间进行。而笔刷绘制出来的颜色又会成为图层合成的一部分。

相乘

相乘 是一种常用的混色模式。它把两个图层的颜色分量相乘，得到更深的颜色。我们可以用它模拟减色混色法，这样可以更容易地画出阴影。

加法

加法 也是一种常见的混色模式，它会把两个图层的颜色分量相加，非常合适用来营造发光特效。

擦除

擦除 是 Krita 的一种混色模式。Krita 没有单独的橡皮擦工具，但你可以随时按 E 把当前笔刷切换到擦除模式。你也可以把图层设成擦除模式。和其他混色模式不同，它只针对透明度通道起效果，让像素变得更加透明。

正常

正常 混合模式按照上层图层的透明度来决定如何分配两个图层的颜色。

Krita 有 76 种混色模式，每种的效果都略有不同。想要进一步了解，请阅读 混色模式。

由于我们可以把通道看作是灰阶图像，我们也可以把灰阶图像转换成通道。例如，我们可以把一张灰阶图像用作透明度。我们把这叫做 蒙版。

蒙版

蒙版是应用到某个图层上的附属效果，通常基于一张灰阶图像。

蒙版的最主要类型是 透明度蒙版，它用一张灰阶图像来确定透明度。纯黑意味着完全透明，纯白意味着完全不透明。

你可以使用任意笔刷在蒙版上绘画，也可以把一个正常的颜料图层转换成蒙版。使用蒙版的意义在于你可以在不破坏原图像素的情况下把它们变为透明。你也可以用蒙版为整个图层分组施加透明度。

例如，这里有位白色的女鬼：

不过你很难搞清楚她是个鬼还是很白，要是能营造出她浮在空中的感觉就好了。要做到这一点，我们先在她所在图层上右键单击，添加一个透明度蒙版。然后我们选中该蒙版，用渐变工具从下到上做一次黑白渐变，黑色在画面下半部分。

只要黑色所到之处，她都会变成透明，这下她就变成名副其实的女鬼了！

蒙版这个名字最初起源于电影行业，它和前面提到的留白胶作用类似。Krita 的选区也是作为灰阶图像保存在程序内部的。你可以把选区保存成一个本地选区，这其实就是一种蒙版，也可以把它们转换成透明度蒙版。

滤镜

我们之前说过你可以对颜色进行数学运算。你可以对某个像素、一组像素或者整个图层进行数学运算。你可以让 Krita 对图层进行各种各样的有趣处理。我们把这些处理叫做 滤镜。

我们可以用下面的处理举例：

去色

这会把所有像素变成灰色。

模糊

这会把相邻的像素平均化，柔化硬边和强烈的反差，使得图像整体看起来模糊柔和。

锐化

这会进一步增加本身反差较大的像素之间的反差。

颜色转为透明度

一个可以把选中的颜色变成透明的常用滤镜。

这张图像的不同部分被应用了不同的滤镜。

Krita 包含了大量滤镜，要进一步了解，请阅读 相关章节。

滤镜笔刷引擎

由于上述处理都是针对像素的，Krita 允许你在 滤镜笔刷引擎 里面使用滤镜。

在绝大多数图像处理软件中，滤镜和笔刷都是分开的不同的工具。但 Krita 把滤镜也整合在了笔刷引擎里面，让你可以定制更细腻的效果。

这意味着你可以制作一个有去色效果的笔刷，或者是一个能改变色相的笔刷。

滤镜图层、滤镜蒙版和图层样式

Krita 还允许你把滤镜应用到图层组上，作为 滤镜图层 和 滤镜蒙版。滤镜图层按照继承关系影响与其关联的图层。在滤镜图层上调整透明度和透明度蒙版可以影响它们作用的图层和区域。

滤镜蒙版可以通过一张灰阶图像影响一个图层，或者一个分组，这和透明度蒙版类似。

我们可以使用这些滤镜来让我们的女鬼看上去更加神秘。选中女鬼所在图层，创建一个克隆图层。我们在克隆图层上右键单击并添加一个滤镜蒙版，让它使用高斯模糊，半径为 10 像素左右。接下来我们把该克隆图层放到原图层后面，将混色模式设为“颜色减淡”，得到一种鬼魅般的幽光。你可以在原图层上继续作画，而刚才建立的特效会自动随之更新！

图层特效或图层样式是 Photoshop 的一种特殊滤镜蒙版，它们比一般蒙版更快，但用途并没有那么广泛。要使用它们，可右键单击一个图层并选择“图层样式”。

变形

变形 和滤镜一样是针对图像像素进行的处理。针对整个图像的和针对单个图层的变形操作被分别放在顶部菜单的两个组内，在那里你可以调整整个图像的大小、对其进行翻转和旋转。

Krita准备了 裁切工具，它只能用来修改画布大小；移动工具，它只能用来移动一个图层。如果你需要更多控制，Krita 还准备了 变形工具。

这个工具可以用来对画布上的对象进行旋转、调整大小、透视变化等。你还可以使用更高级的变形工具，如通过绘制并拖动控制点进行变形的网面变形、外框变形、仿佛是一个变形笔刷一样的液化变形等。

扭曲笔刷引擎

形变笔刷引擎和滤镜笔刷引擎类似，可以让你使用笔刷进行变形操作。形变笔刷就像是一个更快速的液化变形工具模式，但生成的图像品质要低许多。

把一个苹果变形为梨形，左图使用了液化变形，右图使用了形变笔刷。

还有一点，形变笔刷是不可以应用到非破坏性蒙版上的。

变形蒙版

和滤镜一样，变形也可以被作为一种非破坏性操作应用到图层组里。但和滤镜还有透明度蒙版不同的是，变形蒙版由于技术限制，并非基于灰阶图像。你还可以使用变形蒙版来对克隆或文件图层进行变形。

动画制作

Krita 从 3.0 版开始支持动画。你可以使用时间线、动画和洋葱皮工具面板，加上 Krita 原有的多样化笔刷来绘制基于栅格图像的动画，对它们进行导出并将它们转换为视频或 GIF 动画。

辅助尺、网格和导线

介绍了这么多的技术性的内容，是不是快要忘记 Krita 是个绘画程序了呢？就好像现实中的插画师会运用各种工具来让画画变得更加容易，Krita 也提供了一系列绘画辅助工具：

Krita 的消失点辅助尺正在工作

网格与参考线

非常直观的辅助线工具，用来显示网格和导线。具体显示方式可配置。

吸附

你可以把对象或绘画笔迹吸附到各种辅助工具上，网格、导线、延长线、正交线、图像中心点和外框等处。

借助辅助工具绘画

在数位板上面使用尺子相当不方便，而 Krita 专门为此准备了辅助尺工具。它们可以帮你绘制同心圆、透视、平行线，而无需跟复杂的绘画原理打交道。Krita 还有选项允许你吸附在这些辅助尺上进行绘画。

这些辅助工具可以被保存到 Krita 的原生格式中，因此你可以随时继续之前的工作。

定制化

我们要介绍的最后一个概念是定制化。

除了按照个人喜好自由安排工具面板外，Krita 还可以让你保存配置为工作空间 工作空间。该按钮在窗口的右上角。

要配置工具栏，可到 设置 ‣ 配置工具栏；要配置快捷键，可到 设置 ‣ 配置 Krita ‣ 键盘快捷键 和 设置 ‣ 配置 Krita ‣ 画布输入设置。

界面导览

界面

Krita 为画手提供了充分的自由去组织自己的工作空间。你可以对工作空间的各个部件进行拖放和吸附，就好像玩乐高积木一样。Krita 为工作空间准备了一系列构成部件，它们有的是工具面板的形式，有的是工具栏的形式。每个部件都可被显示或者隐藏，移动或者重排，让画手可以轻松地打造属于自己的用户界面体验。

Krita 的界面导览。

我们刚刚说过 Krita 的界面极具弹性，你想要配置的工作空间与下图所示可能并不一致，不过我们先通过它来举例说明。

A – Traditional File or action menu found in most windowed applications.

B – 工具栏 - 你可以在此部件中选择笔刷预设、调整笔刷的不透明度和大小等选项。

C – 侧栏，用来拖放工具面板。某些程序把它们叫做可拖放空间。Krita 允许把工具面板吸附在画布的上下左右四边。

D – 状态栏 - 显示和切换选区的吗蚁线或蒙版显示模式，当前选中的笔刷预设，色彩空间，图像大小和一组画布缩放控制按钮。

E – Floating Panel/Docker - These can be “popped” in and out of their docks at any time in order to see a greater range of options. A good example of this would be the 笔刷预设 or the 调色板.

画布显示在窗口的正中间，但和真实纸张或绝大多数其他软件不同，Krita 的画布可以无限大小滚动。常用的视图控制工具如下：

界面导览

大多数的画布视图控制操作，如旋转、镜像、缩放等在默认状态下都有对应的快捷键：

平移

按 mousemiddle，空格键 + mouseleft 和 方向键。

缩放

按 + 和 - 可进行逐级缩放。按住 Ctrl + 空格键 或者 Ctrl + mousemiddle 可用压感笔进行无级缩放。

镜像

按 M 可以快速镜像显示画布视图。你可以通过镜像功能快速检查画面左右翻转后有无画歪。

旋转

画布可被旋转显示而无需对图像进行实际变形。按 Ctrl + [ 或者 4 可逆时针逐级旋转，按 Ctrl + ] 或者 6 可顺时针逐级旋转。按住 Shift + 空格键 或者 Shift + mousemiddle 可用鼠标或压感笔进行无级旋转。按 5 可以重置旋转。

You can also find these under View ‣ Canvas.

工具面板

Krita 把它的许多功能分类显示在工具面板上。

工具面板是一些小窗口，它们可以显示不同的功能，如图层组、调色板和笔刷预设等。你可以把它们跟画家的调色板、水缸、画笔等实物联系起来。要显示或者隐藏它们，可进入 设置 菜单 的 the 工具面板 子菜单，在那里你会找到所有可用的面板。

要移除某个工具面板，点击该面板右上角的 x 按钮。

工具面板可以被拖放并停靠到画布的上下左右四边上。

工具面板包含了许多 Krita 强大的“隐藏功能”，随着你逐渐深入本软件，你应该大胆地探索和使用它们。

你可以按照你的绘画流程任意组合排列工具面板，然后把界面的组织状态保存为工作空间。

要防止工具面板吸附停靠，按住 Ctrl 再开始拖动。

滑动条

Krita 使用滑动条来控制笔刷大小、不透明度、流量，还有调整色相、饱和度等。下面是一个 Krita 滑动条的例子。

滑动条从左到右的宽度涵盖了它所控制的数值范围，蓝色的部分反映了当前数值。在滑动条的任意位置上点击，滑动条的数值会随之增大 (向右) 或者减小 (向左)。

要输入一个特定的数值，在滑动条上点击 mouseright，然后输入一个精确的数值。

按住 Shift 拖动滑动条可进行微调，按住 Ctrl 拖动滑动条则以整数或 5 的倍数改变数值。

工具栏

工具栏包括了一些重要的功能，各个按钮和菜单经过精心安排，以便画手绘画时随时调用。

要进一步学习工具栏的相关知识，可阅读使用手册的 工具栏章节。熟悉使用工具栏可以提高绘画流程的效率，尤其是在使用数位屏和笔式电脑时。

工作空间选单

工具栏最右侧的按钮就是工作空间选单。你可以在里面载入和保存 Krita 的用户界面配置情况。Krita 也预装了一些常用的工作空间预设。

浮动画具板

浮动画具板是 Krita 为提高绘画工作效率打造的特色功能。它是一个圆形面板，你可以在绘画时通过它快速选取笔刷、前景色和背景色、最近用过的颜色等。只需在画布上单击 mouseright，浮动画具板便会在在光标位置弹出。

你可以给你的笔刷预设指定标签，然后以标签为组在浮动画具板上加载笔刷预设。例如，如果你把 Inking 标签指定给某个描线用的笔刷预设，打开浮动画具板，在里面选择 Inking 标签，它便会显示出该标签里面的全部笔刷。

要给笔刷预设指定 标签，请使用 笔刷预设。要进一步学习标签的相关知识，可阅读使用手册的资源管理页面。

在给笔刷预设指定标签之后，重新打开浮动画具板，点击上面的标签按钮，从中选取想要的标签。你可以指定几组不同的标签然后在它们之间切换使用。如需显示超过 10 个笔刷预设，请到 设置 ‣ 配置 Krita ‣ 常规 ‣ 其他 ‣ 浮动画具板预设个数，把它从 10 改为你想要的数值。

从其他软件入门 Krita

Krita 并非世上唯一一个数字绘画应用软件，不少用户在接触 Krita 之前已经在使用别的软件。为此我们特意准备了迁移指引，比较各个软件的异同点，帮助用户快速上手。

目录：

Photoshop 用户入门 Krita

导言

Krita 基础知识

Krita 相对 Photoshop 的优势

Krita 相对 Photoshop 的不足

结语

Paint Tool SAI 用户入门 Krita

在 Krita 里面怎么进行某个操作？

Krita 相对 SAI 的优势

Krita 相对 SAI 的不足

结语

Photoshop 用户入门 Krita

导言

本文面向习惯使用 Photoshop 的用户介绍 Krita 的各项功能，让你快速学会如何在 Krita 里高效工作并替换掉以前的老习惯。本文撰写时以 Krita 2.9 和 Photoshop CS2 和 CS3 为参考对象。虽然软件会发布新版，但基本的方面应该不会发生太多变化。我们要搞懂的第一件事就是 Krita 是一个 2D 绘画应用程序，而 Photoshop 则是一个图像处理程序。这意味着 Photoshop 总体上具有比 Krita 更多的功能，但 Krita 的功能是为数字绘画量身定做的。当你习惯 Krita 后，你会发现 Krita 有许多 PS 不具备的功能。

Krita 基础知识

本章节对比 PS 介绍 Krita 的基本操作方式。

视图和显示

视图控制

在 Krita 里面你可以用以下方式控制文档的显示方式：

‘鼠标滚轮’：mousescroll 上下滚动为缩放，按住 mousemiddle 平移画布。

‘Keyboard’: with + and - on your numpad keyboard.

和 Photoshop、Painter、Manga Studio 等一样：按住 Ctrl + 空格键 为缩放，按住 空格键 为平移。

注解

同时按下 Ctrl + Alt + 空格键 可以进行逐级缩放。

旋转

旋转画布，按住 Shift + 空格键，或者按 Ctrl + [ 和 Ctrl + ]，或者 4 和 6。重置画布旋转，按 5。

镜像

按 M 可以在视图中镜像显示你的图像。

移动和变形

在 Krita 里面，对内容进行的移动和变形操作是通过工具进行的。你可以在工具栏中找到它们。在 Photoshop 里面按住:kbd:Ctrl 可以移动图层，而在 Krita 里面则是按 T (Translate，变换的首字母) 切换到移动工具，按 Ctrl + T 切换到变形工具。

按 B 可以在变形结束后切换回笔刷工具。变形 工具的高级变形控制不在画布的右键菜单里，而是在 工具选项 面板里。

按 回车 在变形工具里应用操作。

注解

移动工具的操作会自动应用无需确认。

选区

和 PS 里面一样，在使用选区工具时按 Alt 和 Shift 可减小或者扩大活动选区。Krita 还为各个工作模式准备了相应的控制按钮，它们在 工具选项 面板里显示为图标，你也可以用快捷键切换选区工具的工作模式：

R 替换当前选区

T 选中相交部分

A 添加到现有选区 (比较常用)

S 从当前选区中减去 (也很常用)

或者按住：

Alt 从当前选区中减去

Shift 添加到当前选区

Alt + Shift 选中相交部分

注解

按 Ctrl 不会移动选区中的内容 (要按 T 或者选中 移动工具)。

其他提示：

要把一个图层转换成选区 (选中可见像素)，在图层面板中右键单击该图层，选择 选择不透明区域。

在使用多边形选区时，如要封闭选区，可以双击或者 Shift - mouseleft。

要缩放选区轮廓，可到菜单 选择 ‣ 缩放，或者在活动选区上单击右键 变形 ‣ 缩放。

注解

选择 菜单里面还可以找到扩大、缩小、羽化、边框化等常用功能。(选区工具的画布右键菜单也有)

If you enable Show Global Selection Mask (Select menu) you can scale/rotate/transform/move or paint on selection like on regular grayscale layer.

Ctrl + H：显示 / 隐藏选区 (同一个快捷键)

Ctrl + A：全部选择

Ctrl + Shift + A: 取消选择 (并非 PS 的 Ctrl + D 快捷键)

给 GIMP 用户的提示：用 Ctrl + C 和 Ctrl + V 粘贴成新图层后，Krita 会自动把图层边界扩展到图像边界并取消图层浮动，不必担心在粘贴的内容之外无法绘制内容。

注解

相交模式的快捷键目前尚未正常工作，因为它的快捷键 T 也是移动工具的快捷键，所以必需使用 工具选项 中的按钮进行切换。

图层操作

Krita 的常用图层快捷键和 PS 非常相似：

Ctrl + J：复制

Ctrl + E：向下合并

Ctrl + Shift + E：平整图像 (并非 PS 的 Ctrl + Shift + M)

Insert：插入新颜料图层

Ctrl + G：新建一个图层分组并把选中的图层移动到该组内

分组和混色模式 (合成模式)：

在 Krita 里面图层分组的混色模式的优先级要高于所含子图层的混色模式。这对于 Photoshop 用户来说可能难以理解。在 Photoshop 里面，图层分组本身可以设为透过模式，这样分组不会干涉子图层的混色模式。而在 Krita 里面，各个子图层会先在分组内部完成混色，然后混色结果再统一应用分组图层的混色模式。有些画手觉得 Krita 的方式更容易预测结果，而 Photoshop 的方式在图层组织方面更清晰明了。

多图层变形和移动

和 PS 一样，你可以按住 Shift 来选择多个图层，你可以按分组移动或者变形整个图层分组——包括对图层分组进行选区然后剪切里面的全部子图层。但是你不能通过对图层分组应用滤镜来影响多个图层。

剪贴蒙版

Krita 没有剪贴蒙版，但有通过图层分组和 继承透明度`实现的替代方案，做法如下：把用来剪贴的图层移入一个分组作为最底层，启用同组其他图层 (位于其上方) 的 :guilabel:`继承透明度 (图层面板的 alpha 图标) ，这样即可实现与 PS 的剪贴蒙版相同的效果。

Krita 可以给任意一个图层自动进行上述操作。选中需要剪贴的图层，然后按 Ctrl + Shift + G。Krita 会自动新建一个分组图层，把之前选中的图层移入该组作为底层，然后在其上方新建一个启用了继承透明度的新图层。

穿透模式

和 PS 一样，Krita 的图层分组也有穿透模式，但这个功能并不在混色模式里面，而是一个被放在分组的“继承透明度”旁边的按钮。

智能图层

PS 可以在智能图层上进行非破坏性变形，在 Krita 里面也可以通过下列功能实现非破坏性操作：

文件图层

这些图层会引用一个外部图像文件，并在外部文件更新时自动更新。

克隆图层

这些图层是它们的母本图层的实时复制。新建克隆图层时选中的图层就是该克隆图层的母本。母本图层更新时，对应的克隆图层也会随之更新。

变形蒙版

它们可以对所有类型的图层进行非破坏性变形，包括文件图层和克隆图层。

滤镜蒙版

它们和调整图层一样，可以把滤镜以非破坏性的方式应用到所有类型的图层，包括文件图层和克隆图层。

图层样式

在 Krita 里面也可以应用 Photoshop 的图层样式。在图层面板中右键单击任意图层，在右键菜单中选择“图层样式”。Krita 可以打开和保存 ASL 文件，但尚未完全支持全部功能。

其他

图层和分组可以被导出。在顶部的 Layer 菜单里有导出以及其他选项。

注解

Krita 的混色模式种类是 PS 的至少 10 倍。点开混色模式下拉菜单的各个分类即可看到更多。勾选的模式会被添加到“常用”分类。

绘画工具

这是 Krita 的强项，它有许多绘画工具，而且选项丰富。

工具

在 Krita 里面，“绘画工具”的概念和 PS 里面完全不同。PS 提供了画笔、橡皮擦、克隆、模糊等工具，而 Krita 则提供了手绘、直线、矩形、椭圆形、多重笔刷等“描线模式”，而橡皮擦、克隆、模糊等则被作为“绘画模式”由笔刷引擎选项控制。常用的笔刷引擎选项可被保存为“预设”，显示在 笔刷预设 面板里。要对笔刷进行微调或者打造自己的笔刷，可点击顶部工具栏的 编辑笔刷选项 图标。

擦除

在 Krita 里面，橡皮擦不是一个单独的工具，而是笔刷的混色模式。不管使用何种笔刷预设，你都可以按 E 来切换成擦除模式，再按一次即可切换回原本模式。

实用笔刷快捷键

Shift：按住可调整笔刷尺寸 (或者 [ and ])。

/：在当前和之前一个预设之间切换 (例如：一个是铅笔预设，一个是橡皮擦预设)。

K and L: Increment Darker and Lighter value of the active color.

I and O: Increment opacity plus or minus.

D: Reset color to black/foreground and white/background.

X: Switch background and foreground colors.

Shift + I / Shift + N / Shift + M: A set of default keyboard shortcuts for accessing the on-canvas color selector.

注解

有些人不喜欢上面的拾色器组合键。对于惯用手为右手的人来说，他们一般会按左 Shift ，而 I、M、N 却在键盘的另一边，所以在右手持笔作画时很不方便按这些组合键。你可以在顶部菜单的 设置 ‣ 配置 Krita ‣ 键盘快捷键 处重新指定快捷键。

防抖 / 路径平滑

在使用手绘笔刷工具时，你可以在工具选项面板里找到各种防抖选项；而在使用手绘路径工具时，你可以在工具选项面板里找到各种路径平滑选项。

全局压力响应曲线

如果你觉得 Krita 的笔压响应太硬或者太软，可以到顶部菜单的 设置 ‣ 配置 Krita ‣ 数位板设置 里面指定所需的响应曲线。

颜色调整

和在 PS 里面一样，你可以使用一系列常用滤镜来调整颜色：

Ctrl + L：明度

Ctrl + U：HSV 调整

Ctrl + I：反相

减淡 / 加深 / 模糊工具

在 Photoshop 里面这些都是独立的工具，但在 Krita 里面它们是通过滤镜笔刷引擎实现的。你可以把绝大多数滤镜效果通过笔刷形式进行运用。

主题

如果你不习惯 Krita 默认的暗色主题，可到顶部菜单的 设置 ‣ 主题 选择其他主题。如果你不习惯画布周围的默认颜色，可以到 设置 ‣ 配置 Krita ‣ 显示，更改“画布边框颜色”。

Krita 相对 Photoshop 的优势

正如导言所述，Krita 是一款为绘画量身定制的应用程序，因此它具备各种适合绘画的工具。类似的工具在 PS 等一般图像处理应用程序中是找不到的。下面列出了 Krita 独有的一些重要的绘画功能。

笔刷引擎

Krita 具备一系列不同的笔刷引擎。这些笔刷引擎定义了不同的往画布上绘制像素的方式。网格、例子、草图等笔刷引擎可以给笔刷带来全新的使用体验和更多的创作可能。你可以使用笔刷选项编辑器来定制你的笔刷，你可以通过工具栏找到它的下拉面板按钮，也可以直接按 F5。

笔刷预设标签

这是用来组织笔刷预设的有效方式。每个笔刷都可以被指定任意标签，它们将按标签分组。你可以给混色、纹理、特效等笔刷指定不同的标签，随时把它们加载到浮动画具板的常用笔刷。

设置曲线

你可以为每一个笔刷属性 (速度、距离、倾斜、随机等) 设置笔压响应曲线。

浮动画具板

单击 mouseright 即在画布上弹出浮动画具板，你可以用它随时随地快速选取笔刷、颜色历史和拾色器。笔刷预设可在画具板右下按钮处以标签为组进行加载，你就可以按照绘画流程为你的笔刷组合指定不同的标签，然后随时切换。

变形

Krita 的变形工具可以给整个图层分组进行变形，对每个子图层生效。它有几种变形模式，如自由变形、透视变形、网面变形、外框变形和液化变形等。你还可以在栅格图层、矢量图层、分组图层等多种图层上面应用变形蒙版，进行非破坏性的变形操作。

变形蒙版可以进行非破坏性的变形操作

增量保存

只要按下一个快捷键，Krita 就会按图像的文件名后面加上数字“_XXX”后缀进行增量保存，如：作品名称_001.kra、作品名称.kra、作品名称.kra……。

这项功能可以避免覆盖你的旧文件，方便跟踪版本变化和区分绘画阶段。

颜色转为透明度滤镜

如果你需要从扫描的画稿中去除纸张的白色部分，可以使用此滤镜。它可以把一种颜色变成纯透明度。

丰富的混色模式

你习惯使用混色模式吗？Krita 有超过 70 种的混色模式可供选择！你有充分的空间进行混色实验。你还可以通过勾选把常用的混色模式添加到常用分类。

绘画辅助尺工具

Krita 提供了一系列绘画辅助尺工具。这是一种特殊的矢量形状，它们对你的笔刷有吸附作用。你可以把它们当作尺子来运用，有的是直尺，有的则具有更加灵活的形状。

Krita 的消失点辅助尺正在工作

多重笔刷：对称 / 平行 / 镜像 / 雪花

Krita 的多重笔刷工具用来同时使用多个笔刷进行绘制，主笔刷之外的笔刷可以是主笔刷的镜像，也可以与主笔刷平行，也可以按照一定角度和一定数量的轴线与主笔刷同步绘画。

形式多样的拾色器

高级拾色器 面板准备了多种多样的拾色器可供选择。

对视图进行色彩过滤

Krita 的 LUT 面板可以为每个独立的视图指定色彩校准滤镜。这不但对日常使用色彩校准的人们来说有用，画手也可以建立一个显示图像光度灰阶的视图，以便掌握图像的明暗关系。

用 LUT 面板来按视图更改颜色显示方式

HDR 色彩绘画

上面的 LUT 面板还可以用来控制用 HDR 色彩进行作画。你可以用它更改视图的曝光值，Krita 支持绘制 HDR 颜色，也有原生的 Open EXR 支持。

使用 HDR 色彩绘画

Krita 相对 Photoshop 的不足

还是那句话，由于 Krita 是一个数字绘画应用软件，而 Photoshop 是一个带有一定绘画功能的图像处理程序，有许多 PS 能做的事情 Krita 却做不到。下面列出部分这类特性。

滤镜

尽管 Krita 自带了许多好用的滤镜，但你会发现有一两个你常用的 Photoshop 颜色调整工具在 Krita 下面没有。例如，Krita 无法针对一个特定的颜色进行 HSV 调整。

自动修补工具

Krita 没有提供自动修复工具，但它的克隆工具可以用来进行画面修补，只是不能自动进行。

宏录制

Krita 具备宏录制和回放功能，但它们目前并不太好用。

文字工具

Krita 的文字工具比 Photoshop 的要原始一些。

变形时的混色模式

在 Krita 里面，要对一个图层或者选区进行变形时，变形会发生在图层组的顶部，图层的混色模式会被忽略。

其他

Also, you cannot ‘Export for web’, ‘Image Ready’ for Gif frame or slicing web image, etc.

结语

通过学习本页的知识，你应该可以在短时间内熟悉 Krita 的使用。如果你觉得还有其他方面需要在此介绍的，可以与我们联系。Krita 的开发工作进展迅速，现在 Photoshop 能做而 Krita 做不到的东西说不定很快就会在 Krita 里面实现，而我们也会及时在本页更新相关信息。

Paint Tool SAI 用户入门 Krita

在 Krita 里面怎么进行某个操作？

本小节将介绍 Krita 和 Paint Tool SAI 共通的功能，并之处它们之间的微小差异。

画布视图控制

Krita 和 SAI 一样可以翻转、旋转和缩放画布视图。但和 SAI 不同的是这些功能被指定到了键盘快捷键。

镜像

要水平翻转画布显示，按 M。

旋转

要按 15 度为单位左右旋转画布，可以按 4 和 6，也可以按 Ctrl + [ 和 Ctrl + ]。要无级平滑旋转画布，可以按住 Shift + Space + 拖拽，也可以按住 Shift + mousemiddle + 拖拽。要重置画布旋转，按 5。

缩放

要逐级缩放画布，可以按 + 和 -，也可以使用鼠标滚轮。要无级平滑缩放画布，按住 Ctrl + mousemiddle 移动光标。要重置画布缩放，按 1 重置为原始大小、按 2 重置为适合页面大小、按 3重置为适合页面宽度。

你也可以使用总览图面板来快速控制图像视图，在顶部菜单的 设置 ‣ 工具面板 处可以启用。

你也可以把这些命令放在工具栏里，这样感觉就跟 SAI 比较像了。在顶部菜单 设置 ‣ 配置工具栏 处打开对话框 。Krita 有两个工具栏，在这里我们先假定你要添加按钮到文件/主工具栏 (file/mainToolbar) 。

在弹出的对话框中，在左栏的过滤框输入文字可搜索需要的按钮。例如输入“放大”，找到放大按钮，然后把它拖到右栏。如果界面有显示 更改文字 按钮，则可以在那里勾选 当工具栏项目同时具有文字和图标时隐藏文字，这样按钮将仅显示图标。完成后点击 确定，放大按钮就会被插入在你刚才拖放的位置了。

按照上述办法可以把 撤销、重做、取消选择、反向选择、缩小、放大、重置缩放、向左旋转、向右旋转、镜像显示、笔刷平滑：基本、笔刷平滑：防抖 等大部分 SAI 按排在顶部工具栏的功能给添加到 Krita 的对应位置。(不过在比较小的屏幕上面可能会把笔刷工具栏给挤成右边的一个下拉菜单，所以你要进行一些实验)。

隐藏选区 等一些功能目前在配置工具栏对话框中不可用。可按 Ctrl + H 进行切换。

注解

Krita 3.0 之后无法更改工具栏的文本显示方式。我们正在处理这个问题。

右键拾色器

你可以通过顶部菜单 设置 ‣ 配置 Krita ‣ 画布输入设置 ‣ 切换备选功能 来设置右键拾色器。双击 拾取合并图像的前景色 功能的 Ctrl + mouseleft 鼠标左键 一项，在弹出的选单里将它设成 mouseright 鼠标右键。

注解

Krita 3.0 之后已经预装了一组兼容 Paint Tool SAI 的画布输入方案，配合同样是预装的兼容 Paint Tool SAI 的快捷键方案使用，可以让 Krita 使用和 SAI 接近的快捷键。

防抖

在使用手绘笔刷工具时，防抖功能会被显示在工具选项面板。如果数位板性能较好，可以选用“基本”笔刷平滑模式；选用“防抖”则可以得到类似 SAI 的效果。关闭 延迟 选项则盲区不再生效。

透明区域

SAI 用户一个最不习惯的方面就是 Krita 用棋盘格来代表透明度，虽然实际上这才是比较通行的做法。当然你可以把画布背景设成白色。在新建文件对话框的内容页面选中 背景：作为画布颜色，这样图像的背景就会被固定为白色。在创建文件之后，你还可以在顶部菜单的 图像 ‣ 图像背景色与透明度 更改背景色。在导出 PNG 时如果不想要透明背景色，可以取消勾选 保存透明度通道，将背景色设为白色 (默认状态为黑色)。

Like Sai, you can quickly turn a black and white image to black and transparent with the Color to Alpha Filter under Filters ‣ Colors ‣ Color to Alpha.

笔刷选项

有些人会误以为 Krita 的笔刷引擎过于简陋——毕竟在顶部工具栏里你只能更改笔刷大小、流量和不透明度。

不过这真是个天大的误会，因为 Krita 的笔刷引擎实在是太过强大，连工具面板都放不下，我们不得不把笔刷选项都藏到工具栏的一个下拉面板按钮里面了。你可以按 F5 调出该面板，感受一下密集的恐怖。Krita 有十来种笔刷引擎，可以用来制作不同类型的笔刷。SAI 里面的常用笔刷类型可以找到对应的笔刷引擎：像素 (描线)、颜色涂抹 (画笔)、滤镜 (减淡和加深)。

以一个简单的描线笔刷为例，你可以选取一个像素笔刷，取消勾选不透明度和流量的 启用压感笔选项，并取消勾选列表中除了大小之外的所有选项。接着来到笔尖页面，选中 自动笔刷，然后把直径设成 25 (要输入具体数值，可以单击蓝色滑动条)，勾选笔刷轮廓下方的“抗锯齿”选项，将“淡出”设成 0.9。最后将“间距”设成自动，并把数值设为 0.8。

你可以对笔刷特性进行深入的配置，并且将成果与其他人分享。要导入笔刷文件或者资源包，可在顶部工具栏 设置 ‣ 管理资源 处导入 .bundle 或者 .kpp 文件。

擦除

和 Paint Tool SAI 一样，擦除在 Krita 里面是一种混色模式。你可以按 E 切换，也可以从混色模式下拉菜单中选取。

混色模式

Krita 有许多混色模式，而且巧合的是除了二进制模式外 SAI 的每个模式都可以在 Krita 里面找到对应的模式。要对把混色模式添加进常用分类或者从中移除，可以勾选或者取消勾选各个模式左边的复选框。

相乘、滤色、叠加和正常模式都在常用分类中。Krita 的光度和 SAI 的略有不同，它把颜色的相对亮度替换成了图层中颜色的相对亮度。

SAI 的“光度”模式和 Krita 的 相加 或者 线性减淡 模式相同。SAI 的“阴影”模式和 Krita 的 颜色加深 模式相同。SAI 的“光度和阴影” 模式和Krita 的 硬混合 模式相同。

图层

锁定透明度

Krita 的图层面板的每个图层右边都有一个 alpha 按钮。锁定透明度的开关就是那个。

剪贴分组

For Clipping masks in Krita you’ll need to put all your images in a single layer, and then press the ‘a’ icon, or press Ctrl + Shift + G.

描线图层

在 Krita 里面这是矢量图层，它还用来承载文字。

蒙版

用来影响透明度的灰阶图层在 Krita 里面叫做透明度蒙版。和 SAI 里面一样，透明蒙版可以应用到单个图层或者图层分组。如果你当前有一个活动选区，在创建透明度蒙版时将以该选区作为蒙版轮廓。

清空图层

在顶部菜单的 编辑 ‣ 清空，或者按 Del。

混合两种颜色

如果你喜欢 SAI 的这个工具面板，你也可以用 Krita 的“数字混色器”面板来实现类似的功能。拖动数字混色器的滑动条就可以更改混合颜色的比例。

Krita 相对 SAI 的优势

更丰富的笔刷定制空间

刚才我们已经介绍过笔刷选项编辑器，它的选项非常丰富。你可以在里面找到包括草图、网格、形变、克隆等多样化的笔刷引擎，笔尖可以使用材质，可以感应笔压、倾斜、旋转、速度等，有些笔刷可以画出排线，有些笔刷可以改变颜色。而这些仅仅是 Krita 笔刷引擎的一部分功能。

更多样的拾色器形式

除了常规的 HSV 滑动条、RGB 滑动条、色相环和它里面的明度饱和度三角外，你还可以使用 HSI、HSL、HSY’、CMYK 等滑动条，各种调色板，圆形和方形的拾色器，大型和小型的拾色器，颜色历史和光影拾色器等。你可以在顶部菜单的 设置 ‣ 配置 Krita ‣ 拾色器设置 里面配置高级拾色器。

要显示颜色历史，按 H，显示共通颜色，按 U，显示两个光影拾色器，按 Shift + N 或者 Shift + M。在画布上显示高级拾色器，按 Shift + I。

几何形状工具

你可以在 Krita 里面轻而易举地画出圆形、矩形、路径等。

多重画笔、镜像对称和环绕模式

这些工具可以帮助你快速绘制镜像图像、万花筒效果或者重复材质方块。对于绘制背景和抽象插图很有用。

辅助尺工具

绘画辅助尺工具可以帮助你建立透视或者同心圆等形状，然后把笔刷吸附到它们上面。

Krita 的消失点辅助尺正在工作

锁定图层

用图层面板里面的锁形图标可以锁定图层，避免在上面绘制。

快速选择图层

按 R 可以选中光标下方像素颜色所在的图层，这对于处理图层数目较多的图像很有帮助。

色彩管理

此功能可以帮助你进行印前准备，或者使用 LUT 面板来更好地分析图像。例如，你可以为当前图像建立一个新视图，然后用 LUT 面板设定这个视图显示光度，便于即时观察图像的明暗变化。

高级变形工具

在 Krita 里面你不止可以进行旋转和缩放变形，还可以使用外框、网面、液化变形。除此之外你还可以使用变形蒙版进行非破坏性变形。

更丰富的滤镜选择和非破坏性滤镜和蒙版图层

你可以使用颜色平衡和曲线等滤镜图层来建立简单的阴影图层。滤镜图层可以让你一边绘制一边自动把最新效果应用到它关联的图层上面。

浮动画具板

在默认状态下，在画布上右键单击就会弹出这个圆形的浮动画具板。你可以给常用笔刷预设指定标签分组，然后把它们按组加载到浮动画具板，这样就切换笔刷就更加便利了。它上面还配有一个小型的拾色器和颜色历史。

Krita 相对 SAI 的不足

矢量线条的宽度不便调整

图层不能直接引用外部选区源

动态笔刷硬边 (边缘效果)

No mix-docker

No Preset-tied stabilizer

No per-preset hotkeys

结语

希望本文可以让你对 Krita 的特有功能有所期待，并在使用 Krita 时更加就手。

数位板

本页面介绍数位板——它们的用途、工作原理和遇到问题时的排除办法。

数位板是什么？

与铅笔和纸相比，用鼠标画画不仅不直观，还挺困难。更糟糕的是，长时间使用鼠标可能会导致腕管综合症。这就是为什么大多数从事数字绘画的人使用一种被称为“数位板”的专用输入设备。

数位板和键盘、鼠标一样，是接在计算机上的外部输入设备。大部分数位板看上去像块塑料板，配有一支可以感应光标位置和输入压力的压感笔，还有一些则是可以直接在屏幕上用压感笔作画的数位屏。它们在绘画时比鼠标感觉更自然，对手腕的劳损也更小。

数位板和压感笔正确安装后，Krita 可以从它们那里获得压力等传感器信息，你可以通过施加的压力控制笔画的粗细，或者营造其他丰富有趣的笔触。

注解

人们有时会把模拟手指触摸的电容笔跟真正数位板的压感笔搞混。一般来说，数位板的压感笔配有一个又硬又尖的笔尖，而模拟手指触摸的电容笔配有比较粗大的圆形橡胶笔尖，和指尖一样柔软又弹性。电容笔的绘画效果一般都不太好，所以我们建议使用真正的具有压力传感器的数位板。

驱动程序和压力感应

现在，你买了一款真正的数位板，迫不及待地想要在 Krita 里面使用它。你把数位板插入了 USB 接口，启动了 Krita……可这貌似并没有什么卵用。笔画虽然可以画得出来，可是你朝思暮想的压力感应却偏偏欠奉。

这是因为你还没有安装一个叫做“驱动程序”的东西。驱动程序一般会包含在数位板附带的光盘里，制造商也一般会在网站上提供驱动程序下载。执行它的安装程序后，可能需要等待一段时间才能安装完毕。让我们利用这点时间来说说驱动程序的来龙去脉吧！

每台计算机都需要一个基本的软件系统来代替用户执行一些深奥繁琐的技术操作，这就是所谓的操作系统，简称 OS。绝大多数人使用的操作系统是 Windows，苹果设备的操作系统一般是 MacOS，而其余的一些人，包括许多程序员，习惯使用 Linux。

虽然这几个操作系统各有特点，但它们的工作原理是大同小异的。现在，你想要在计算机上运行 Krita 这样的应用软件，然后想让 Krita 与数位板这样的外设硬件进行沟通。应用软件和硬件之间的直接沟通非常困难，而操作系统的作用就是在两者之间建立起一座桥梁。

每当你启动 Krita 之后，Krita 首先会与操作系统建立联系，要求它进行显示图像、调用内存等各种操作。不过现在最重要的是，Krita 要从数位板获取信息！

然而操作系统表示它做不到，因为它并不了解你的数位板是如何工作的。通过安装驱动程序，操作系统才可以正确地识别数位板，然后给 Krita 提供所需的数位板信息。一般来说，数位板的制造商会负责为各个操作系统提供合适的驱动程序。

警告

驱动程序会对操作系统进行一些更改，所以在安装或者卸载驱动之后你必需重新启动计算机才能生效，千万别忘了做这一步！而相对的是，Krita 并非驱动程序，如需重置 Krita 的设置，你只需重命名或者删除配置文件，无需卸载之后重新安装。

Windows 下面可能发生的问题

如果驱动已经正确安装，Krita 会自动连接到数位板。数位板要是出现问题，一般都不是 Krita 造成的。

Surface Pro 的数位板有两种不同驱动程序

某些数位板，如 Surface Pro 等使用的是 N-trig 技术，它们具备两种驱动程序。一种是 N-trig 体系特有的 Windows Ink 驱动，另一种则是传统 Wintab 体系的驱动。Windows Ink 技术由操作系统提供原生支持，使用基于 N-Trig 技术的压感笔时无需安装 Wintab 驱动。Krita 从 3.3 版开始支持 Windows Ink 驱动程序，可在顶部菜单栏的 设置 ‣ 配置 Krita ‣ 数位板设置 里面勾选:guilabel:Windows 8+ 指针输入。

Windows 10 更新

Windows 10 推送的更新有时会损坏数位板的驱动程序，重新安装驱动程序一般可以解决问题。

Wacom 数位板

Wacom 数位板在 Windows 下面有两个已知问题。

首先，如果你修改过驱动程序设置，那么在更新驱动程序之后它可能会发生故障。这时先把驱动程序重置为默认设置，然后载入备份的设置，问题就可以得到解决。

其次，你可能需要更改显示器的优先顺序。在某些情况下你要把 Cintiq 设为主屏幕，而另外一些情况下你要把它设成副屏幕。打开 Wacom 数位板属性，检查 Cintiq 的数位板是否和它的屏幕正确关联。

糟糕的驱动程序

数位板的驱动程序是它们的制造商编写的。一些非常廉价的数位板，虽然它们的硬件没有问题，但配套的驱动程序却非常糟糕，无法正常工作。我们对此无能为力。你要么联系制造商反映问题，要么重新购买一块配有更好驱动程序的数位板。

驱动程序冲突

在 Windows 下面通常只能安装一个 Wintab 驱动程序。如果需要更换数位板硬件，请记得先卸载旧数位板的驱动程序，然后再安装新数位板的驱动程序。其他操作系统的表现会好一些，但即使是内建了大部分数位板驱动的 Linux，也无法同时识别两块使用了不同驱动程序的数位板。

软件干扰

有一些软件会在 Krita 和操作系统之间建立一个安全层，Sandboxie 就是个例子。然而 Krita 无法在沙箱中与操作系统建立稳定的通信，所以在 Sandboxie 等软件中 Krita 会频繁出错。还有一些鼠标程序，如 Razer 实用程序等，它们会把数位板信息转换为鼠标信息，影响 Krita 和操作系统之间的正常通信。这些软件，要么把它们设置为不影响 Krita，要么干脆把它们卸载掉。

根据用户反馈信息，下列软件会干扰 Krita 读取数位板事件：

Sandboxie

Razer 鼠标实用程序

AMD Catalyst 驱动程序的“游戏模式” (可能造成右键失效)

Flicks 手势 (出现等待圆圈，然后弹出浮动画具板)

如果你发现在 Windows 下面绘画时老是弹出浮动画具板，那么犯人很可能是 Flick 手势。Flicks 是 Windows 的一种手势功能，它把光标动作转换成键盘快捷键。在安装数位板驱动之后 Windows 会自动启用此功能，设计它的老兄是不是忘了人们是用数位板来画画的？可在 Windows Flicks 配置对话框中关闭此功能。

Wacom 双击时笔尖间距 (笔画的起始部分总是画成直线)

如果你使用 Wacom 数位板，遇到了笔画的开头部分总是画成直线的情况，它可能是 Wacom 驱动程序的双击时笔尖间距的设置问题。

要修复这个问题，打开 Wacom 数位板属性，调低“双击时笔尖间距”。

支持的数位板

Krita 支持的数位板一般都是我们的开发人员手头上已有的设备，只有这样我们才能可靠地修复它们的问题。我们在这里维护着一个数位板支持情况的列表。

笔刷的制作、载入和保存

在现实绘画中，你不止会运用一种工具，你会用到铅笔、橡皮擦、笔刷、蜡笔、不同类型的颜料或者墨水等。这些画材在纸张上留下痕迹的方式都不尽相同。

在 Krita 这样的数字绘画程序中情况也是相似的。我们把不同类型的画材制作成不同的笔刷引擎。铅笔和圆珠笔的工作原理和使用效果完全不同，它们使用的笔刷引擎也是不一样的。这就像是汽车换上不同的引擎时驾驶体验会不同一样。

每个笔刷引擎可以有许多不同的选项，所以你可以把不同的选项组合保存成预设。

和 Photoshop 不同，Krita 的笔尖和笔刷预设并不是一回事。笔尖就像是一个扁平的图章形状，笔刷预设使用笔尖配合其他选项来打造出一个完整的笔刷。

笔刷选项下拉面板

要调出笔刷选项编辑面板，你可以在工具栏的 混色模式 和 图案 之间找到它的按钮。你也可以直接按 F5 来打开它。

打开笔刷选项编辑器面板后你会看到如下界面：

笔刷选项下拉面板导览

笔刷选项下拉面板被分为 6 个区域。

A 区 - 一般信息

本区显示了 预设图标、笔刷效果预览、预设名称、引擎类型，还有保存、重命名和重新载入预设的按钮。

Krita 的笔刷图标是一张 200x200 的 PNG 图像，它被保存在 KPP 文件的元数据里。Krita 会在多个地方显示笔刷图标，比起笔刷效果预览图，图标更为简练且易于识别。

笔刷效果预览显示了当前笔刷画出一条略具 S 形的曲线，从左到右压力逐渐增大，它能够显示压力、绘制角度、距离、淡入和模糊笔尖印迹等传感器的效果，但无法显示其他效果。有些笔刷引擎无法显示任何预览。颜色涂抹、滤镜还有克隆引擎的笔刷会显示交替色块的背景图案，因为它们依赖画布上的已有颜色来营造效果。

在预设名称后面跟着一个按钮，它用来 重命名 当前笔刷。重命名操作会把当前选项保存为一个新笔刷，然后把旧笔刷加入到黑名单。

引擎

笔刷引擎是笔刷用来产生笔画的程序。不同的笔刷引擎具有不同的选项和不同的效果。你可以把它看作是使用不同画材的区别，如蜡笔、铅笔和钢笔等，尽管实际上我们的笔刷引擎之间的差异更多是在数学上的，因为这毕竟是计算机程序。

对绝大多数画手而言，笔刷引擎的原理并不重要，只要每个引擎可以产生独特的使用效果就够了。每个笔刷引擎还可以通过选项进一步进行调整。

重新载入预设

如果你更改了某个预设的选项，笔刷引擎名称后面会显示一个图标。这便是 重新载入 按钮，你可以用它恢复笔刷的原有选项。

保存预设

在本区右端显示了 保存为新笔刷 和 覆盖原有笔刷 按钮。

覆盖原有笔刷

此按钮只有在笔刷原有选项发生更改之后才会启用。按下此按钮将用更改过的选项覆盖当前预设，保留名称和图标不变。此操作还会在资源文件夹中备份旧预设，并且为文件名附加时间后缀。

保存为新笔刷

将把当前预设按更改后的选项保存为一个新的预设。如果并未更改选项，则保存为当前预设的副本。

按下“保存为新笔刷”按钮后会弹出下面的对话框，它带有一个迷你绘图区和各种选项来更改预设图标。

位于对话框左侧的图像是一个迷你绘图区，你可以用当前画笔在里面进行绘制，允许进行小幅调整。

笔刷名称

该笔刷的名称。也用于 KPP 文件。如果已存在一个使用了该名称的笔刷，将覆盖它。

载入已有缩略图

通过此按钮载入预设已有的缩略图。

载入绘图区缩略图

通过此按钮把笔刷选项面板右侧绘图区的虚线方框区域载入到缩略图区域。

载入图像

通过此按钮把硬盘上的图像载入为缩略图。

从图标库载入

此按钮将打开图标库

清空缩略图

此按钮将把迷你绘图区清空为白色。

图标库

为了让预设图标制作起来更方便，Krita 准备了一个图标库。

你可以在图标库中选择一个工具图标还有一个附加图标。点击 确定 将把组合加载到迷你绘图区，你还可以在结果上面继续加工。

在你的资源文件夹里面，你会发现一个叫做“preset_icons”的文件夹，而这个文件夹里面又有“tool_icons”和“emblem_icons”两个文件夹。你可以把带有透明背景的 PNG 图像添加到这两个文件夹里面，Krita 就会把它们载入到图标库，让你进一步对图标进行定制。

在预设图标库对话框的右上角有三个滑动条，你可以用它们调整图标的颜色。色相和饱和度滑动条的作用和 HSL 颜色调整中的相同，而亮度滑动条是一个简单的亮度滤镜。这么处理的原因是该亮度滤镜会保持工具图标原图像中最暗的阴影和最亮的高光，让快速调整更方便。

If you’re done with everything, you can press Save in the Save New Brush Preset dialog and Krita will save the new brush.

B 区 - 预设选择器

此预设选择器和笔刷预设工具面板还有按 F6 弹出的预设下拉面板差不多，它的独特之处是可以按照笔刷引擎对预设进行过滤。你在这里选择一个需要的笔刷引擎，然后开始制作笔刷。

它默认是折叠状态，你可以在笔刷选项面板的左上方点击左箭头按钮展开它。

笔刷引擎下拉菜单默认选中了“全部”，这样会显示全部笔刷引擎。接下来的是标签列表、预设列表和搜索框。

再下面是一个 “+” 按钮，点击后会列出 Krita 的全部笔刷引擎，从中选取一个引擎，界面中间的 E 区就会显示该引擎的笔刷选项。

垃圾桶按钮的作用跟预设工具面板里面的一样：删除选中的预设 (实际上是添加到黑名单)，使它不再出现在列表中。

C 区 - 绘图区

在调试笔刷时，你需要检查每个选项的效果如何，所以我们在笔刷选项下拉面板的右边准备了一个绘图区。

它默认是折叠状态，你可以在笔刷选项面板的右上方点击右箭头按钮展开它。

When saving a new preset, you can choose to get the icon from the scratch pad, this will load the dash area into the mini scratch pad of the Save New Brush Preset dialog.

The scratch pad has four buttons underneath it. These are in order for:

将当前笔刷图像加载到缩略图区

添加渐变作为绘图区底色 (对于涂抹笔刷有用)

填充背景色

Clearing everything on the scratch pad

D 区 - 选项列表

每个笔刷引擎具有不同的选项，你能够控制的参数、开关、滑动条等都不尽相同，使得每个引擎的效果各具特色。一般来说，主要的选项多是滑动条和复选框，但也有不少选项是通过响应曲线控制的。

带有复选框的选项可以被打开或者关闭。但流量和不透明度等最基础的笔刷选项则会一直生效。

选项右侧的锁形图标可以锁定对应的笔刷选项。我们以后会另文介绍。

E 区 - 选项调整窗

前面的 D 区是选项的列表，而 E 区则是选项的具体内容，你可以在这里更改它们。

使用传感器曲线

每个画手的作品都有各自的风格，这在相当程度上是通过笔画的风格体现的。画手施加给压感笔的速度、旋转、方向和压力都会影响笔画的风格。这些特性是如此重要，我们都会希望能精确控制软件如何解读这些信息。而做到这一点最好的办法就是使用响应曲线。

以笔刷大小选项为例，对于一个描线笔刷，如需把笔刷的大小与压力关联起来，可在选项列表中勾选“大小”选项。

每个人的用笔手法并不相同。有些人习惯使用轻柔的笔触，他们画起细线来很拿手，可是要画粗线时就很吃力。而有些人的手劲大的很，他们画细线时难以控制，可画起粗线来却毫不费劲。

我们可以指定一条弯曲的压力响应曲线，使得同等压力下画出的线条更粗或者更细。

笔刷选项中的曲线控制区的顶部有一系列常用的曲线按钮，只要点击一下即可切换。画细线有困难的人可以使用倒数第二个按钮，它是一条下凹的斜线；而画粗线有困难的可以使用第三个按钮，它是一条 S 形线。

在曲线图下方还有两个选项：

所有传感器统一曲线

此选项影响列表中的各个传感器。勾选此选项，则所有传感器将使用相同的曲线。取消勾选，则每个被启用的传感器将使用各自独立的曲线。

曲线计算方式

此选项控制不同传感器曲线的协同效果。曲线数值总是从 0 到 1.0 分布，如果一条曲线的输出是 0.5，另外一条曲线的输出是 0.7，那么……

相乘

Will multiply the two values, 0.5*0.7 = 0.35.

相加

把两者数值相加，最大值是 1.0。因为 0.5 + 0.7 = 1.2，因此截为 1.0。

最大值

比较两者数值，取其中最大值。此例子中数值为 0.5 和 0.7，因此结果为 0.7。

最小值

比较两者数值，取其中最小值。此例子中数值为 0.5 和 0.7，因此结果为 0.5。

差值

Will subtract the smallest value from the largest, so 0.7-0.5 = 0.2.

下面我们用更直观的方式进行说明：

第 1、2 组是常规曲线，其余的则应用了不同的计算模式。

笔刷大小与距离传感器关联。

笔刷大小与淡入传感器相关联。

笔刷大小与淡入、距离传感器数值的相乘结果相关联。

笔刷大小与淡入、距离传感器数值的相加结果相关联。可以看到线条明显更粗。

笔刷大小与淡入、距离传感器数值里面的最大值相关联。

笔刷大小与淡入、距离传感器数值里面的最小值相关联。

笔刷大小与淡入、距离传感器数值两者的差值相关联。

F 区 - 其他选项

临时保存选项修改 (被更改过的预设)

勾选此选项后，预设被修改过的选项将会暂时保留到当前 Krita 会话结束。在那之后预设选项将恢复为默认值。如果当前预设选项已被改动，它们在笔刷预设面板中的图标左上角会显示一个角标。

上图中间两个预设图标左上角显示了“已修改”角标，表示它们的选项已被修改。

擦除模式独立大小

勾选此选项后，按 E 切换的擦除模式将独立保存笔刷大小。

擦除模式独立不透明度

和上面一样，但控制的是擦除模式的不透明度。

即时预览

勾选此选项将启用笔刷的即时预览功能。在此选项的文字处右键单击可以调出该功能的阈值滑动条，它用来控制即时预览功能生效的最小笔刷大小。这是因为即时预览模式会造成延迟，所以我们要确保此功能只在需要时被触发。

在画布上修改笔刷选项

在画布上右键单击打开浮动画具板，在它的右下角有一个右箭头按钮。点开它就可以随时在画布上修改笔刷选项了。你可以看到一些主要选项的滑动条。

该面板的顶部显示了当前活动的笔刷预设。单击右上角的按钮可以显示能够添加到此面板的滑动条列表。你可以用该对话框的上下左右按钮移动项目，也可以直接拖放它们。

制作笔刷预设

现在是时候制作一个简单的笔刷以检验我们的学习成果了：

获取笔刷引擎默认选项

首先，按 F5 打开笔刷选项面板。

点击面板左上的左箭头按钮，展开笔刷预设选择器。在选择器的左下角单击 “+” 按钮，打开可用引擎列表。在这个例子里我们将制作一个像素笔刷。

范例：制作一个描线笔刷

在笔刷选项面板右侧的绘图区感受一下当前笔刷的效果。如果一切正常，笔刷的直径应该为 5px，压感笔的压力控制笔刷的不透明度。

让我们先把不透明度选项关闭。在笔刷预设选择器右边的列表找到 opacity 选项，你会发现面板中间的选项变成了曲线图，这是压感笔传感器的响应曲线。

取消勾选 启用压感笔选项。

在绘图区试用一下，你会发现还有一些东西在影响不透明度，这是 flow 选项在作怪。

从刚才的列表中找到流量选项。流量的作用和不透明度相似。不过流量按每次笔尖印迹生效，而透明度按每次完整的笔画生效。

取消勾选流量选项中的 启用压感笔选项。现在再到绘图区试试效果。

现在这个笔刷的效果开始像是个描线笔刷了。不过它还是太细了，而且边缘也显得太硬了。要改善这些地方，单击笔刷引擎选项列表中的 笔尖 选项。

在这个选项页面里，直径选项控制笔尖大小。你可以拖动滑动条调整笔刷大小，也可以右键单击然后输入一个数值。将它设为 25 然后再到绘图区试试看。现在效果应该大为改观。

现在我们要把笔刷边缘变得柔和一些。把“柔化”参数设为 0.9 左右。这样会给 笔刷蒙版 一个更加柔和的边缘。

然而这次修改后效果却不太明显。这是因为笔尖印迹间距太近造成的：笔尖印迹间距越小，笔尖印迹就会相互重叠，造成硬边效果。笔尖间距默认为 0.1，这是比较小的。如果你把它设为 10，就会明白其中奥妙了。勾选间距参数的 自动 复选框，将间距设为 0.8，这就是描线笔刷的最佳数值。别忘了可以右键单击直接输入数字哦。

现在线条的边缘看起来已经软硬适中了，只是笔刷尺寸调小之后线条会有锯齿。我们可以勾选“抗锯齿”复选框，这样就可以画出令人满意的线条了。

保存新笔刷

When you’re satisfied, go to the upper left and select Save New Brush Preset.

你将打开“保存新笔刷预设”。将笔刷名称改为“你想要的笔刷名称”。然后单击 从图标库载入缩略图，打开预设图标库。选择一个好看的工具图标，然后单击 确定。

刚才选取的图标将会被载入到左边的迷你绘图区。现在你可以直接在迷你绘图区作画，在工具图标的笔尖下面画出一个示意的笔画。如果不小心给画残了，就重新打开图标库载入新的图标，重新尝试。

最后，单击 保存 按钮，你的笔刷预设就制作完毕了！

你还可以进一步调整这个描线笔刷：

调整画出最大直径所需压力

在笔刷引擎选项列表里面，进入 大小 页面，确保已经在曲线图左边的传感器列表里勾选了“压力”选项。如果你想要施加很小的压力就可以画出全宽度的线条，先在曲线上点击，这样可以创建一个节点，把这个节点拉到曲线图偏左上的位置。节点越靠近左上角，效果就越明显。如果你想要施加再大的压力也不会画得太粗，就反过来把节点向右下角拉。这样的笔刷适合勾画细节。调整满意后，别忘了保存或者覆盖你的笔刷预设。

用流量选项让细线变得更为柔和

在笔刷引擎选项列表里面，进入 流量 页面。把刚才取消的 启用压感笔选项 重新勾选。现在你会发现笔画貌似变得太柔和了。在曲线上点击以创建一个节点，把这个节点拉到曲线图左上角网格的底边的中间点附近。现在当你用轻柔的压力绘制时，线条会更加柔和，而当你加大压力时，线条边缘又会变得硬朗起来。

分享笔刷预设

好了，你现在终于制作了一个笔刷。如果你想要分享它，你可以通过下面几种方式来分享笔刷预设。

我们推荐你使用资源包系统来分享笔刷以及其他预设。我们在 资源管理页面 对此进行了详细介绍。

不过我们也可以使用一些比较老派的方式来分享笔刷，这在导入或者载入比较老旧的资源包时说不定还能派上用场：

分享单一预设

单一预设文件可以保存三种资源：

单一 Paintoppreset 文件：这是一个完整的预设文件，内含图标和响应曲线。

单一笔刷文件：只含笔尖，如果使用的是蒙版笔刷，则内含两个笔尖。

单一图案文件：在使用纹理时会用得到。

如果你的笔刷的笔尖或者蒙版笔刷使用了独特的预制笔尖形状，或者用到了材质时，你就要把相关的资源也跟对方分享。

要找到这些资源，可到顶部菜单的 设置 ‣ 管理资源 ‣ 打开资源文件夹。

在这个文件夹里，预设文件被保存在 paintoppresets 子文件夹，笔尖被保存在 brushes 子文件夹，材质被保存在 patterns 子文件夹。

导入单一 KPP 文件。

如果你想要使用单一预设，你可以按 F6 打开预设选择器，单击左下角的文件夹按钮，这样会弹出打开文件对话框，在里面找到所需的 KPP 文件，将它导入。

如果该预设文件有配套的笔尖和图案，你还要在图案工具面板导入图案，在笔刷选项面板 (F5) 的“笔尖”选项处选中“预制形状”，在该页单击“导入”按钮导入笔尖文件。

通过 ZIP 文件分享 (老办法)

其实 ZIP 分享法早就应该被新版资源包给代替掉了，不过的确也有一些老旧的笔刷包是用 ZIP 保存的。

如何使用 ZIP 打包的资源文件

顶部菜单 设置 ‣ 管理资源 ‣ 打开资源文件夹。

打开你的 ZIP 压缩包。

用压缩包里面的文件夹覆盖资源文件夹里面的同名文件夹，如果提示是否合并，请同意。

Restart Krita.

尽情使用新笔刷吧！

画布上的笔刷编辑器

你现在可能已经知道按 F5 可以调用 Krita 的笔刷选项面板了。不过你有时候只需要快速修改一两个参数，有时候则需要在画布独占模式下也能修改一些笔刷选项。其实你也可以在画布上直接调用笔刷编辑器。它可以从浮动画具板的右下角箭头按钮处访问。

你可以单击笔刷名称右边的按钮来更改可见的选项。

左栏列出了所有尚未启用的选项，右栏则列出了所有已经启用的选项。你可以通过 > 和 < 按钮在两栏之间移动选项，用 The 上移 和 下移 按钮来排列选项。你还可以直接拖动选项的位置。

每个笔刷预设的选项数值各自独立。每种笔刷引擎又有不同的可用选项。

对称绘画工具

此工具可以让你在镜像轴线的一侧绘画时，画面的另一半自动生成对称的图案。你可以从顶部工具栏里面找到它们的按钮。你还可以拖动镜像轴线的原型手柄来移动轴线。

对称绘画工具的使用效果和 多重笔刷工具 类似，不同之处在于，多重笔刷工具只能跟跟踪 手绘笔刷工具 一类的笔刷操作，而对称绘画工具可以跟踪任何使用笔画的工具，如 直线工具、贝塞尔曲线工具，甚至多重笔刷工具本身。

水平对称绘画工具 - 绘画效果沿水平轴线对称。

垂直对称绘画工具 - 绘画效果沿垂直轴线对称。

两种对称工具都有附加选项，你可以单击它们按钮右侧的下拉箭头来调用。

Hide Mirror Line (toggle) – Locks the mirror axis and hides the axis line.

锁定 (开关) – 隐藏轴线上的移动图标。

Move to Canvas Center - Moves the axis line to the center of the canvas.

沿倾斜轴线对称

对称绘画工具只能沿着一条完全垂直或者水平的轴线进行镜像。如需沿着斜线进行镜像，请使用 多重笔刷工具 和它提供的其他各种参数。除了基本对称功能外，它还具备许多高级的选项。

借助辅助工具绘画

Krita 的绘画辅助尺系统可以帮你画好直线、圆形等几何图形，甚至透视。

它们可以作为预览形状显示在画布上面，你也可以把手绘笔刷等工具吸附到它们上面。在手绘笔刷工具的工具选项面板，勾选 吸附到辅助尺 即可启用吸附功能。

Krita 的消失点辅助尺正在工作

Krita 提供了下列绘画辅助尺：

类型

Krita 提供了几种不同类型的绘画辅助尺，你可以在它的工具选项面板进行选用。

椭圆

用来绘制椭圆和圆形的辅助尺。

此辅助尺有三个控制点：前两个点控制椭圆的轴长，最后一个点控制椭圆的宽度。

同轴椭圆

和椭圆类似，但可以绘制多个相互同轴的椭圆。

在编辑已创建的绘画辅助尺时，你可以使用 Shift 作为修饰键 (注意：目前在创建时不能使用修饰键)。在拖动轴线两端控制点时按住 Shift 可以把轴线吸附到水平线或者垂直线上。在拖动第三个控制点时按住 Shift 可以把辅助尺变成圆形。

透视

此辅助尺通过四个点创建一个透视网格。

创建的网格可以和“透视”传感器配合使用，该传感器会影响笔刷的作用。

在编辑过程中，如果在拖动四角的控制点时按住 Shift ，它们将吸附到水平方向上另一个角的高度。

直线

这个组别里面有三种辅助尺：

直线

帮助你画出两点之间的一根直线。

无限直线

按照给定的两点推演出横穿画布的一根直线。

平行直线

此工具让你画出一根平行于所指定的两点延长线的直线。

在编辑已有平行线辅助尺时，在拖动控制点时按住 Shift ，控制点将吸附到水平线和垂直线上。

曲线

此辅助尺通过四个控制点画出一条贝塞尔曲线。把笔刷吸附到创建的曲线路径上面，你也可以随时画出自信而有力的曲线。

在编辑曲线时，如果在拖动曲线两端的控制点时按住 Shift ，你可以把这两个点水平或者垂直对齐。在拖动其他两个点时按住 Shift ，你可以把该点与它连接的点水平或者垂直对齐。

消失点

此辅助尺可以创建一个消失点，通常用于地平线。画完消失点后切换至笔刷工具，辅助尺将为你显示预览线，你绘制的笔画将被吸附到该预览线上。

每个辅助尺代表一个消失点，它还带有 4 个控制点用来对齐之前创建的透视线。

你可以用 绘画辅助尺工具 来创建和修改这些消失点。

在拖动消失点时按住 Shift ，消失点将按照它之前的相对位置吸附到水平或者垂直线上。

在 4.1 版更改: 消失点辅助尺还会显示几条参考线。

当你选中一个消失点辅助尺时，可以在工具选项面板里修改 绘画辅助尺工具 显示的参考线数量。

鱼眼点

和消失点辅助尺一样，此辅助尺会在一个立体空间中显示一组平行线。你可以创建两个垂直的鱼眼点辅助尺，或者在鱼眼点中间添加一个消失点辅助尺，也可以用一个鱼眼点、一个平行直线和一个消失点辅助尺配合使用。你可以随心所欲地搭配使用不同的辅助尺。

此辅助尺不止会在与它的两个消失点中间的位置提供反馈和吸附，还可以在它们的左右两侧提供反馈和吸附，你可以利用这个特性来绘制全景透视。

在编辑已创建的绘画辅助尺时，你可以使用 Shift 作为修饰键 (注意：目前在创建时不能使用修饰键)。在拖动轴线两端控制点时按住 Shift 可以把轴线吸附到水平线或者垂直线上。在拖动第三个控制点时按住 Shift 可以把辅助尺变成圆形。

教程

有关此功能的深入探讨和视频教程，可访问：https://www.youtube.com/watch?v=OhEv2pw3EuI

为技术图纸透视设置 Krita

我们在前面已经介绍了 Krita 提供的各种绘画辅助尺。现在我们将介绍如何使用它们来绘制技术图纸风格的画面。

本教程将传授如何为不同类型的技术图纸风格配置绘画辅助尺。

如果你想要学习真正的透视投影原理，可参考 透视投影原理分类文章。

正交透视

正交透视是一种从从斜前方观察的透视方式。在典型情况下你要保持前后物体的比例相同，不发生透视扭曲。

这种透视法主要使用平行直线辅助尺。你可以把它们按水平方向或者垂直方向放置，形成笔刷可以吸附的立体网格。

轴测透视

此类透视法都可以通过平行直线辅助尺实现。

斜轴测

如需制作斜轴测图，可先在水平方向和垂直方向上放置两个平行直线辅助尺，然后在倾斜方向上再放置一个平行直线辅助尺来代表深度。

二轴测和等轴测

等轴测透视就是把前面说的那三个平行直线辅助尺以 120° 的夹角摆放。而游戏里面用的等轴测透视在这个基础上有一点变化，即两条斜线和垂直线之间的夹角为 116.565°，这可以通过把辅助尺吸附到网格来实现。

三轴测

在此透视法下，三条参考线之间的夹角都不一样。可以把它看作是稍微倾斜的等轴测透视。

线性透视

单点透视

单点透视可以通过一个消失点和一组水平和垂直方向的平行直线辅助尺构建。

二点透视

二点透视通过两个消失点和一个垂直平行直线辅助尺构建。两个消失点放置在画面两边的距离越远，透视的强烈程度也就越小。

三点透视

三点透视通过三个消失点辅助尺进行构建。

消失点的工作逻辑

这里有一处非常有用的知识，但许多透视教程往往会忽略它，那就是一个消失点是空间中两条平行线交汇的点。因此单点透视和二点透视实际上是一回事。

我们可以通过下面的小实验来证明。让我们挑战一个永恒的课题：画一条铁路。

你可能对将要遇到的困难并不陌生：怎么确定下一根枕木的位置呢？透视原理决定了它们离得越远，挤得越近。

一般来说，解决方案是画面左侧外部的地平线上建立一个消失点，从该消失点引出一条斜线，连接到到第一根枕木与右侧铁轨的交点。在两条铁轨位于地平线的交汇点上画一根垂直线，把它与之前所画的斜线相交在一点。通过这个点画一根水平线。这条水平线便是第二根枕木所在的位置。如此类推。

不过因为枕木是平行的，所以我们可以使用消失点辅助尺。把其中一条对齐线的两个控制点各自放在枕木在对角线上的两个点上，把另一调对齐线放在地平线上 (如图红线所示)。

然后斜线就可以用来确定枕木的位置了：

因为除了平行于地平线之外的每条线都会指向一个消失点，所以在线性透视中实际上可以有无限多个消失点，Krita 也因此允许你自由设定消失点的位置。

鱼眼透视

鱼眼透视和线性透视的工作原理大体上是一致的，最大的不同是在鱼眼透视里面任何平行的线条都具有两个消失点，一边一个。

要构建一组鱼眼透视，最简单的办法就是在水平和垂直方向上建立两个位置相同的鱼眼点辅助尺，然后把一个消失点辅助尺放置在中间。

你还可以把两个水平方向的鱼眼点辅助尺以画面中间线为界并排放置：

理解和处理图像

计算机可以处理不同类型的文件，而作为绘画程序，Krita 能够创建和处理图像文件。

图像包含哪些内容？

如果你创建了一个文本文档，它里面文字的字母会依照某种顺序进行排列，这样计算机才能把字母读取并显示成连贯的句子。这种排序方式就是该文本文档的格式。每种文件都有自己的格式，图像文件也不例外。Krita 的图像文件包含下列数据：

栅格数据

这里保存了颜料图层的主要数据。你用手绘笔刷工具绘制的笔画和颜色就被存放在这里。栅格图像记录了每一个像素的颜色，在放大后图像会产生马赛克。有些文件包含了多个这样的图层，它们从上到下依次叠放组成了最终图像。

单层图像文件通常只包含栅格数据。

矢量数据

这里保存的是一些数学运算，计算机通过这些运算决定如何绘制画面，这个特点使得它们具有更好的伸缩性。你只需要告诉该运算把坐标值增大 4 倍，生成的图像就可以跟着放大。矢量数据体积更小，可编辑性也更好，但代价是消耗更多的 CPU 资源。

操作数据

这里保存了软件在多个图层中进行的操作，例如用来调整其他图层颜色的滤镜图层、透明度蒙版、分组图层和变形蒙版等。不同软件的操作数据存在差异，Krita 对这些数据的支持情况取决于文件是由哪些软件生成的。例如，Krita 可以载入和保存 PSD 文件的分组、透明度蒙版和图层样式，但无法载入和保存它的变形蒙版。

元数据

元数据是一组记录了创建日期、作者、描述文字等信息的数据，它也包括了 DPI (每英寸点数) 等文件格式的特有信息。

图像大小

图像大小包括了画布的尺寸和分辨率。图像大小直接影响 Krita 文档的体积。需要记录的像素越多，颜色的位深度越高，则生成的文件体积越大。

DPI 与 PPI

DPI 是 Dots Per Inch，每英寸点数的缩写，而 PPI 是 Pixel Per Inch，每英寸像素的缩写。在印刷行业里面，如果一台打印机按 300 DPI 进行打印，它在每平方英寸的面积里面会打印 300 个墨点。这个参数决定了图像的像素大小和印刷尺寸之间的关系。

** DPI ** 是打印机自己的问题，绘制画作的画手应该关注 PPI **。打印机会通过一张图像的 **PPI 来决定它在纸张上的大小。

现列出部分 PPI 标准如下：

72 PPI

这是所有程序默认的显示器 PPI。这个数值不一定准确，因为新型显示器普遍已经达到 125 PPI，使用视网膜屏幕的设备甚至可以超过 300 PPI。尽管如此，它依然是制作屏幕显示用图像的默认设置。

120 PPI

这个数值经常被用作低质量海报的标准。

300 PPI

这个数值是高质量印刷的最低限度。

600 PPI

漫画线稿使用的品质。

颜色位深度

我们在 色彩管理 章节对颜色的位深度进行了探讨。Krita 不但可以为图像指定色彩空间，还可以为图层指定色彩空间。我们可以通过巧用图层色彩空间来节省内存。例如，把线稿图层设为灰阶，可将内存的消耗量减半。

图像色彩空间、图层色彩空间、色彩转换

图像和图层的色彩空间是被区别对待的。要修改图像的色彩空间，可到菜单栏的 图像 ‣ 属性 里面进行，但这些选项不会改变图层的颜色。如果需要把图像连同所有图层的色彩空间一起进行转换，可到菜单栏的 图像 ‣ 转换图像色彩空间。

作者和描述信息

Krita 会自动把图像的创建者保存到该文件的元数据里面。Krita 除了会在文档信息对话框显示文件的创建、修改日期和时间外，还能显示文档的总编辑时间长度，方便按工时计费的情形。如果你有一段时间没有进行操作，Krita 会检测到并停止计时，精度达 ±60 秒。你可以在文件信息对话框清空该信息，也可以在解压缩该文件后编辑它的元数据。

要编辑文档信息，可到菜单栏的 文件 ‣ 文档信息。要编辑作者信息，可到菜单栏的 设置 ‣ 配置 Krita ‣ 作者。要切换作者档案，可到菜单栏的 设置 ‣ 当前作者档案。

设置画布背景色

要设置画布的背景色，可到菜单栏的 图像 ‣ 图像背景色与透明度，你可以在这里更改背景色，或者把背景色改为不透明。这对于那些强制使用不透明背景的图像格式有用。如果你不保存透明度，PNG 和 JPG 在导出时会使用此颜色作为背景。

如果你习惯使用 Paint Tool Sai 这样的程序，不想见到透明度棋盘格背景，你可以使用上述选项，或者在新建文件对话框的内容页面中通过 背景色 和 背景不透明度 选项进行更改。

基本变形

你可以在 图像 菜单中进行一些基本的变形操作。

切变图像

此功能可以把整个图像和它所含的图层进行斜向扭曲。

旋转

此功能可以把图像和它所含全部图层进行旋转。

水平/垂直翻转

此功能可以把整个图像以及所含全部图层进行翻转。

除此之外我们还有更多的相关选项，下面将继续介绍。

裁切和调整画布大小

要对图像进行裁切，可使用 裁切工具。此功能可用于切除多余的空白和改善构图。

修剪

使用菜单栏中 图像 ‣ 修剪至当前图层，Krita 会把图像的尺寸调整为当前已选中图层的大小。如果你粘贴进来的内容超出了图像的尺寸，你可以使用此功能把图像尺寸扩展至所粘贴图层的大小。

菜单栏的 图像 ‣ 修剪至选区 功能是裁切工具的一种快速替代品，它可以把画布尺寸调整为当前活动选区的大小。其中一种用法是在图层面板的图层上右键单击，选择 选择不透明区域，然后在菜单栏选择 图像 ‣ 修剪至选区，这样会按照该选区的水平和垂直大小对图像进行裁切。

菜单栏的 图像 ‣ 修剪至图像大小 可以用来把全部图层按照图像尺寸进行修剪，去除图像边框之外的不可见区域的内容，减小文件的体积。

调整画布大小

你还可以通过菜单栏的 图像-> 调整画布大小 (或 Ctrl + Alt + C ) 来对画布的大小进行调整。该对话框显示如下。

保持宽高比 选项可确保图像的宽度和高度和修改之前保持一致。偏移 选项决定画布四周各个方向的尺寸增减量，也就是控制当前图像相对于新尺寸的位置。点击 锚点 的任意一个方向可以让当前图像沿该边 (角) 对齐。例如，点击左边箭头，则水平方向上的全部大小的增减会发生在图像右边。

Another way to resize the canvas according to the need while drawing is when you scroll away from the end of the canvas, you can see an arrow appear. Clicking this will extend the canvas in that direction. You can see the arrow marked in red in the example below:

缩放图像至新尺寸

缩放图像至新尺寸 可对整个图像按比例缩放。如果你需要放大图像尺寸，应使用此功能。例如，你的图像的分辨率原来是 72 PPI，你在这个低分辨率下面规划完了大致的配色和构图，下一步就要刻画细节了，于是你可以在这里把分辨率调高到 300 或者 400 PPI。

和所有显示了锁链按钮的对话框一样，这个对话框的锁链按钮用来锁定图像的宽高比。点击该按钮可以解除锁定，让你可以单独控制宽度和高度的数值。

分离图像

这是一个功能强大的图像处理功能，可以把一张图像的颜色通道分离开来。

此功能对于印刷和处理游戏材质尤为有用。虽然 Krita 没有提供反向合并的功能，但你可以把分离出来的图层设为“相加” 混色模式 来模拟合并后的效果。

如果是 RGB 色彩空间下面的通道灰阶图像，我们可以依次把红、绿、蓝通道的混色模式设为“复制红色”、“复制绿色”、“复制蓝色”。

保存、导出和打开文件

Krita 在创建或者打开一个文件之后，它会把该文件的数据保存一份副本到内存里，以供它编辑时调用。这是计算机的工作原理所决定的：它们要把使用的文件先加载到内存里面才能对其进行操作。所以在保存文件时，Krita 会用该文件在内存里面的副本覆盖硬盘上的已有文件。在进行保存操作时你可以有下面一些选项可用：

保存

Krita 会把当前内存中的图像保存到硬盘上的指定位置。如果该文件之前未被保存过，Krita 会询问应该把它保存在什么位置。

另存为

把当前打开的文件在另一个位置保存为副本。保存结束后 Krita 会打开该新文件继续编辑。

打开

打开已有文件。

导出

把一个文件保存一个副本到新位置，但保存后不打开它，而是继续使用当前文件进行编辑。如果你在处理一个多图层文件，然后需要输出一个平整后的图像，这个功能将非常有用。

将已有文档作为无标题文档打开

这个功能不太好理解，它所做的是打开一个已有文件，但在保存时会询问一个新位置来把结果保存为原始文件的一个副本。在其他程序里此功能叫做“导入”。

从当前图像创建副本

为当前图像制作一个副本。和“将已有文档作为无标题文档打开”类似，但对象则是已经打开了的文件。

保存增量版本

将当前图像保存为“文件名” _XXX.kra 并将当前文档切换到该图像。

保存增量备份

将上次保存的版本复制一份，重命名为一个备份文件，然后用原文件名保存当前图像。

注解

Krita 的工作文件格式实质上是一个压缩包，万一该文件发生了损坏，你还可以用解压缩软件把它包含的图层等内容解压出来，尽可能恢复更多的数据。在 Windows 环境下，你需要把文件的扩展名改为 ZIP 才能双击打开。

模板

模板是被存放在一个特殊位置的 .kra 文件，用于供 Krita 快速调用。它们本质上和 :guilabel`把已有文档作为无标题文档打开` 功能差不多，但具备一个更有条理和显眼的界面。

您可以通过在文件菜单中使用 从图像创建模板 ，从任何. kra 文件创建自己的模板文件。这会将当前文档添加为新模板，包括其所有属性、图层及图层内容。

我们提供了下列默认模板：

欧美漫画模板

这些模板是专门为绘制漫画而准备的。Krita 的漫画模板基于一组由矢量图层以及它们的克隆图层组成的系统。克隆图层会自动反映在矢量图层中发生的改动。你可以在两个图层之间绘制图像，这样就不必担心会画坏画框了。使用 继承透明度 可以把图像按每格画面进行剪贴。

欧式 BD（比利时-法国）风格漫画模板

此模板效仿了丁丁历险记流派使用的画面系统。每格画面聚焦于横向裁切的宽图像。

美式漫画模板。

这个模板效仿经典 DC 和漫威漫画的风格 (如蝙蝠侠和美国队长等) 将页面划分为九格图像，适合表现迅速展开的故事情节。

日式漫画模板。

此模板基于日式漫画，它的纵向区隔小，横向区隔大，用于引导读者逐行阅读。

十二宫格

有十二小格任你发挥。

设计模板

这些是用于平面设计的模板，它们的默认 ppi 参数已设为各自用途的最佳值：

16:10 电影荧幕设计模板

2.93:1 电影荧幕设计模板

A3 横版设计模板

Presentation A4 portrait

4:3 屏幕设计模板

网页设计

单反相机模板

这些是符合各种数码相机默认照片尺寸的模板

Canon 55D

Canon 5DMK3

Nikon D3000

Nikon D5000

Nikon D7000

纹理模板

这些模板用于制作 3D 纹理，各模板的单边像素数目从 1024 到 4092 不等。

图层和蒙版使用入门

Krita 支持图层功能。通过图层你可以更好地掌控画面的各个元素。

让我们先来了解一下图层是什么。想象一下你有许多透明的塑料片，每张塑料片上都画了一些不同的图案，但并没有画满整张塑料片，大多数地方还是透明的。你把塑料片由上至下叠放起来，位于上面的塑料片的图案将会挡住在它下面的塑料片的图案。你可以随时改变这些透明塑料片的排序、相对位置，也可以随时把其中的一张拿掉，换上别的图案。在 Krita 里面，我们通过使用 图层 来实现这些塑料片的效果。Krita 的图层可以是透明的，也可以是不透明的；它们的面积可以小于图像，也可以超出图像的外框；它们可以上下顺序叠放，互相遮挡；它们可以被随意命名，并划分为不同分组。

图层可以让你更好地控制作品的绘制过程。例如，你可以把图层的线稿跟颜色分开画在不同的图层上面，这样就算不小心把颜色画砸了，也不至于连同线稿一起毁掉。

你可以单独编辑每个图层，还可以为它们添加特殊效果，如图层样式、混色模式、透明度、滤镜和变形等。Krita 会把上面的这些内容在图层组中进行合成，生成最终的图像。听起来挺厉害，但这也只是 Krita 丰富的图像处理功能的其中一种而已！

一般来说，当你把一张颜料图层放在另一张颜料图层上面时，上面图层的画面将会遮挡下面图层的画面。下层的内容只能透过上层透明的区域显示。

管理图层

有些画手习惯使用极其有限的几个图层作画，而另外一些画手则会把尽可能多的画面元素分开在不同的图层上进行绘制。Krita 的图层管理功能相当完善，能够满足不同场合的使用需求。

你可以使用 分组图层 对图层进行分组，更好地管理画面的各个元素。

你可以改变图层的排列顺序，把它们移入或者移出分组，或者直接在图层面板上拖放它们。如果你在使用 子窗口模式，你还可以在打开的不同文档之间相互拖放图层。

组织有序的图层可以帮助作者本人或者其他协作者理解文档的结构。除了之前介绍的排序和分组之外，你还可以为图层打上颜色标签，这样不但观察起来一目了然，还可以按标签颜色过滤显示的图层。

要为图层或者分组指定颜色标签，可在图层面板里面单击右键，在弹出的菜单里可以从给定的几种颜色里进行选择。要移除颜色标签，在色块列表中选择“x”即可。右键菜单和颜色标签的位置如下图所示：

Once you assign color labels to your layers, you can then filter layers having similar color label by clicking on one or more colors in the list from the drop-down situated at the top-right corner of the layer docker.

图层类型

上图显示了 图层 所含的各种图层类型。从上到下依次是：文件图层、滤镜图层、填充图层、矢量图层、分组图层、克隆图层和颜料图层。每种图层都有自己特定的用途，如矢量图层是用来绘制矢量图形元素的，而一般笔刷的笔画则主要在颜料图层上进行绘制。图层和蒙版 页面进一步展开介绍了这些图层类型的细节。

接下来我们将学习在 Krita 里面图层是如何进行合成的。

Krita 的图层合成方式

在 Krita 里面，可见的图层在画布上合成显示为一张图像。显示的先后顺序为由上至下，就好像本页开篇提到的透明塑料片例子一样。我们所见的图像随着添加进来的图层和它们内容的变化而发生改变。分组图层的内部图层的合成与它们外部的图层合成是分别进行的，除非它们被设为“穿透”模式。一个分组图层会先合成它所含的图层为一个图像，然后用这个图像去跟分组外面的其他图层进行合成。在图层列表中，分组图层的右边有一个砖墙状按钮，如下图所示。该分组将切换该分组图层为穿透模式，这时图层的合成顺序将不把分组考虑在内。但无论在什么情况下，分组图层的可见性将决定整组图层的可见性。

Photoshop 创建的 PSD 文件会默认启用穿透模式，除非它们被指明使用其他的混色模式。

继承透明度和剪贴图层

Krita 通过一个叫做“继承透明度”的功能来实现剪贴操作。它通过图层列表中右边的 Alpha 字母按钮控制。

继承透明度功能是这样工作的：你在一个图层上点亮继承透明度的“Alpha”字母图标后，该图层的上面显示的像素将被位于它下方的所有图层所含像素的合并区域所限制。在这里要特别说明一点：因为 Krita 默认会创建一个白色图层放在图层组的底部作为背景，这个图层在画面的每一个像素上都有颜色 (白色)，所以，即使你把它上面的图层的继承透明度功能给启用了，也不会对它们显示的像素造成任何限制。那么该怎么办呢？我们只需新建一个分组，然后把剪贴和被剪贴的图层放在同一组里面就行了。这是因为图层分组会先在所含图层之间进行合成，所以剪贴也只会在同组图层之间发生。

在上图的例子中，左上方浅绿背景和深绿笔画不在分组内，受背景白色图层的影响，剪贴没有效果。中上方的绿色背景和蓝色笔画都在同一个分组内，不受背景白色图层的影响，因此开启了继承透明度的蓝色图层被它下面的绿色图层剪贴。你可以在右上方看到前面两个例子的图层结构。左下图说明了在分组内部的图层的剪贴关系不受分组下方的图层影响。在右下图的例子中，左边一组只有黄色三角形所在的图层启用了继承透明度，所以它被红色圆形和蓝色方形所在图层的结合体剪贴；右边一组的黄色三角形和红色圆形所在的图形都启用了继承不透明度，它们两个都被蓝色方形所在的图层剪贴。除了对图层启用继承透明度外，你还可以对整个图层分组启用继承透明度。

蒙版和滤镜

Krita 支持对图层内容进行非破坏性编辑。非破坏性编辑指的是尽管图层的显示效果发生了改变，但图像的原始数据并没有发生永久改变。Krita 仅仅在原始图层上应用了一个实时生效的滤镜或者蒙版来改变图像的显示效果，只需隐藏这些滤镜或者蒙版图层，原始图像即可按原样显示。这在需要反复切换比对的绘画流程中极为有用。

你可以把不同的滤镜蒙版添加到一个图层，或者添加一个能够影响整张图像的滤镜图层。你还可以通过变形蒙版来对图层进行非破坏性变形，也可以通过透明度蒙版来控制图层的哪些内容需要被隐藏起来。非破坏性编辑是一项非常有用的功能，因为万一你日后改变了主意，还可以随时切换回原图，也可以用一个图像素材制作数种不同的效果。

注解

要合并全部可见图层，你可以通过菜单栏的 图层 ‣ 选择 ‣ 可见图层 功能选中全部可见图层，然后通过菜单栏的 图层 ‣ 向下合并图层 合并选中的图层。

要添加上述滤镜和蒙版，你可以在图层列表中单击右键，在弹出的菜单中找到上它们。你还可以在图层面板的右下角点击“+”按钮找到它们。

你还可以在滤镜对话框找到 创建滤镜蒙版 ，直接把该滤镜的效果创建成一个滤镜蒙版。

你还可以把滤镜和蒙版应用到一个图层分组，同时对多个图层进行非破坏性编辑。要了解各种图层和蒙版的细节，可参考 图层和蒙版分类的文章 。

要了解与图层有关的快捷键和图层管理流程，可参考 图层面板 一节。

选区

选区用于挑选并限定在一定的区域内更改图像。Krita 提供了许多种选区工具，可以用不同的方式建立选区。在建立一个选区之后，绝大多数的工具只能在该选区内部生效。你可以在选区内部大笔勾勒和使用填充渐变，它们并不会影响到选区外面的画面，但有时会留下坚硬的边缘。

创建选区

你可以在工具箱的最下面一组找到最常用的一系列选区工具。每种选区工具用一种独特的方式进行选择。在下表点击每个工具的名称可以跳传到该工具的详细介绍页面。

矩形选区工具 | toolselectrect | 建立一个矩形选区。
椭圆选区工具 | toolselectellipse | 建立一个椭圆形的选区。
多边形选区工具 | toolselectpolygon | 建立一个多边形的选区，在画布上每次点击可以建立一个节点，按 Shift + Z 可以撤销回上一个点的位置，双击将自动将首尾两点相连，封闭该多边形选区。
轮廓选区工具 | toolselectoutline | 在别的软件里有时称作“套索工具”，通过手绘轮廓建立一个选区。
相似颜色选区工具 | toolselectsimilar | Similar Color Selection Tool.
相连选区工具 | toolselectcontiguous | 在别的软件里有时叫做“魔棒”工具，以一块连续的颜色区域建立选区。通过 模糊度 可以羽化选区边缘，默认仅对当前图层进行采样。
路径选区工具 | toolselectpath | 通过一条矢量路径建立选区。直接点击创建直线，点击并拖动拉出曲线，按 回车 把路径首尾相连建立选区。

注解

你还可以在选区里面使用变形工具，这是一个调整画面不同部分比例的好办法。

编辑选区

每个选区工具的工具选项都给出了选项来更改选区。你还可以使用下列快捷键来提高工作效率：

操作 | 修饰键 (临时切换) | 快捷键 (永久切换)
替换 | Ctrl | R
相交 | Shift + Alt | 无
添加 | Shift | A
减去 | Alt | S

移除选区

要移除整个选区，可以使用取消选择功能，它在菜单栏的 选择 ‣ 取消选择 ，你也可以使用快捷键 Ctrl + Shift + A 。

选区显示模式

位于窗口左下角，状态栏最左边的按钮用于显示和切换选区的显示模式。点击按钮可以在蚂蚁线和蒙版两种模式之间切换。蒙版模式默认的红色可以在菜单栏的 设置 ‣ 配置 Krita ‣ 显示 ‣ 选区蒙版颜色 。如果当前不存在选区，则该按钮不会有任何作用。

蚂蚁线模式 (默认)，显示选区的大致轮廓，它不会干扰画面颜色，方便同时看清未被选中的区域。

蒙版模式可以揭示选区的透明度变化，例如那些通过渐变创建的选区。

全局选区蒙版 (绘制选区)

全局选区蒙版会把当前选区显示为在图层面板中的一个蒙版图层。在默认状态下它是隐藏的，你可以在菜单栏的 选择 ‣ 显示全局选区蒙版 。

在全局选区蒙版显示功能启用之后，随便建立一个选区，接下来就可以在图层列表切换到全局选区蒙版。这个模式的好处是你可以用任意一种常规绘画工具来绘制选区。该蒙版的信息作为灰阶图像保存。要更好地把握所绘选区的效果，可以切换到蒙版显示模式。

按照图层透明度建立选区

要根据一个图层的透明度来创建一个选区，可在图层列表中右键单击一个图层，在右键菜单中选择 选择不透明区域。

像素和矢量选区类型

矢量选区允许使用形状编辑工具来调整选区。像素选区允许对选区按像素信息进行修改。这两种模式各有各的长处和短处。你可以把选区在两种模式之间进行转换。

在创建选区之前，你可以在选区工具的工具选项面板选择像素选区或者矢量选区模式。

矢量选区和其他矢量形状一样可以通过形状编辑工具进行修改。如果你在矢量选区里进行绘制，它会被转换成像素选区。像素选区里面可以用任意一种工具进行绘制。矢量形状和矢量选区可以互相转换，可在选择菜单的 转换为形状 处进行转换。

一般来说，使用矢量选区的好处是方便后期对选区本身进行移动或者变形。像素选区会连带着选区的内容一起变形和移动，而矢量选区的变形和移动不会影响选区的内容。你还可以使用形状编辑工具来更改矢量选区的各个锚点。

如果你创建的是像素选区，你也可以把它转换成矢量选区来获得上述便利。要把像素选区转换为矢量选区，可到菜单栏的 选择 ‣转换为矢量选区 。

注解

将一个带有透明度变化的像素选区转换为矢量选区将丢失透明度的变化。

与选区功能配套使用的常用快捷键

复制 – Ctrl + C 或者 Ctrl + Ins

粘贴 – Ctrl + V 或者 Shift + Ins

剪切 – Ctrl + X, Shift + Del

从所有图层复制 – Ctrl + Shift + C

把选区内容复制到新图层 – Ctrl + Alt + J

把选区内容剪切到新图层 – Ctrl + Shift + J

切换显示/隐藏选区 – Ctrl + H

Python 脚本编程

本章节将介绍 Krita 的 Python 脚本编程。

目录：

Python 脚本编程入门

Python 脚本是什么？

技术细节

如何制作 Krita Python 插件

如何让 Krita 识别你的插件

创建一个扩展程序

创建可配置的键盘快捷键

创建工具面板

PyQt 信号和信号槽

结语

Python 脚本编程入门

4.0 新版功能.

我们曾经在一次 Kickstarter 筹款活动中把 Python 脚本编程支持、矢量图形功能重写、文本工具功能重写作为延伸目标的三个选项，结果 Python 脚本以压倒性的优势赢得了支持者投票。不少人甚至只给 Python 功能投了票。那么 Python 脚本编程究竟是何方神圣呢？

Python 脚本是什么？

Python 是一种脚本语言，可以用来编写一些自动化任务。对 Krita 来说，Python 编程意味着我们为 Krita 打造了一个 API，这是一种编程接口，让 Python 脚本可以访问 Krita 的各项功能，这样我们便可以用 Python 脚本来打造工具面板、执行低级而量大的重复性文件操作，甚至制作定制化的导出功能。在计算机图形业界工作的人们，如特效、游戏行业的从业人员可以通过 Python 编程来组织拼合图、自动化一部分的导出操作等，提高工作效率。

Python 编程教学并非本使用手册的内容范畴。考虑到 Python 是一种既流行又好学的编程语言，找到学习它的资源想必不会是一件难事。随便在网上搜索“Python 入门”估计就能得到无数结果。

本手册会把注意力放在如何使用 Python 为 Krita 提供自动化和扩展功能。接下来我们首先要介绍基础中的基础：如何在脚本工具里面执行 Python 指令。

如何启用脚本工具插件

你并不需要非得通过脚本工具插件来在 Krita 里面使用 Python 脚本，但它在测试和调整 Python 脚本时大有用处。它是一个用 Python 编写的 Python 脚本控制台，你可以在它里面直接编写并随时执行脚本片段。

要打开脚本工具插件，在菜单栏点击 工具 ‣ 脚本 ‣ 脚本工具 。如果看不到该工具，在菜单栏点击 设置 ‣ 配置 Krita ‣ Python 插件管理器 ，在对话框中勾选“脚本工具”。如果在那里也看不到该插件，请确保你使用的是最新正式版的 Krita。

脚本工具对话框的上半部分是一个文本编辑器，下半部分是一个输出信息的显示框。在文本编辑器中输入下面的代码：

print("hello world")

要执行该脚本，可以点击对话框左上角的“播放”按钮，也可以按 Ctrl + R 快捷键。接着在输出框中应该会显示：

==== Warning: Script not saved! ====
hello world

现在我们知道这个控制台可以执行 Python 环境中的 print() 这样的功能了，那么我们如何使用它来对 Krita 进行操作呢？

执行 Krita 的基本命令

要让 Python 能够与 Krita 建立联系，我们需要使用它的 Krita 模块。在每个脚本的起始处我们要插入： from krita import *

这行代码允许我们通过 Krita.instance() 接口与 Krita 建立联系。现在我们可以用 Python 执行 Krita 中的操作了。

from krita import *

Krita.instance().action('python_scripter').trigger()

上述代码执行后会打开另一个脚本工具窗口。是不是很有意思？接下来让我们尝试一组更加复杂的代码。

from krita import *

d = Krita.instance().createDocument(512, 512, "Python test document", "RGBA", "U8", "", 120.0)
Krita.instance().activeWindow().addView(d)

这段代码会新建一个具有指定参数的文档。不难想象，使用 Python 脚本可以控制 Krita 进行许多自动化操作。假以时日，我们相信 Krita 社区会写出各种各样的脚本，到时候你只需要把代码复制到脚本工具里面执行即可。

可要是你想自己编写一些新命令，该怎么学习呢？最好的办法当然是：看看别人是怎么写的！使用别人的已有代码作为基础可以节省许多时间。你可以学习 /share/krita/pykrita 目录里预装的 Python 插件。我们还在用户手册里准备了 如何制作 Krita Python 插件 的逐步指引。

不过，你应该还会需要更多的信息，发现在 import * from Krita 的这个星号位置可以填入什么样的功能。要学习可用的 Krita 功能列表和用法，可以参考 Krita API 参考文档。

Krita 的 API

LibKis API 概览 [https://api.kde.org/extragear-api/graphics-apidocs/krita/libs/libkis/html/index.html]

Krita 程序类文档 [https://api.kde.org/extragear-api/graphics-apidocs/krita/libs/libkis/html/classKrita.html]

上述页面可能一眼看上去非常高深。这是因为 Krita 的文档反映了 Krita 是通过 C++ 编程语言编写的本质。Python 脚本会调用 SIP 来在与 Krita 建立联系时使用 C++，这样当我们使用 import krita 来调用功能时，我们实际上会使用这些文档里列举的 C++ 功能。

让我们仔细观察一下这些功能是如何工作的。在 Krita 程序类参考文档 [https://api.kde.org/extragear-api/graphics-apidocs/krita/libs/libkis/html/classKrita.html#aa55507903d088013ced2df8c74f28a63] 页面列出了 Krita 进程的所有可用功能。如果你在 Python 里输入 dir(Krita.instance()) ，它返回的结果应该和该页非常相近。你可以查看一下前个例子中使用过的下列功能： createDocument() 、activeWindow() 、action() 。

看到 Krita 的各种 C++ 程序类和 Q 开头的 Qt 程序类混列在一起会让人觉得眼花缭乱。不过这正是 SIP 大展身手的地方：它会尽可能把这些类以简单明了的方式翻译为 Python 格式。例如你可以看到 function filters() 返回一个 QStringList ，而 SIP 会把那些 QStringList 转换成正常的 Python 字符串。

from krita import *

print(Krita.instance().filters())

Outputs as:

['asc-cdl', 'autocontrast', 'blur', 'burn', 'colorbalance', 'colortoalpha', 'colortransfer',
'desaturate', 'dodge', 'edge detection', 'emboss', 'emboss all directions', 'emboss horizontal and vertical',
'emboss horizontal only', 'emboss laplascian', 'emboss vertical only', 'gaussian blur', 'gaussiannoisereducer',
'gradientmap', 'halftone', 'height to normal', 'hsvadjustment', 'indexcolors', 'invert', 'lens blur', 'levels',
'maximize', 'mean removal', 'minimize', 'motion blur', 'noise', 'normalize', 'oilpaint', 'perchannel', 'phongbumpmap',
'pixelize', 'posterize', 'raindrops', 'randompick', 'roundcorners', 'sharpen', 'smalltiles', 'threshold', 'unsharp',
'wave', 'waveletnoisereducer']

不过有时候这种转换也会遇到一些问题。

from krita import *

print(Krita.instance().documents())

返回的是:

[<PyKrita.krita.Document object at 0x7f7294630b88>,
<PyKrita.krita.Document object at 0x7f72946309d8>,
<PyKrita.krita.Document object at 0x7f7294630c18>]

它列出了一坨不知道是什么玩意，这下怎么办？我们可以回头参考一下 Krita API 文档页面，看看 documents() 是怎么回事。你会看到在“Document”程序类那里其实是一个链接， 点进去该页面 [https://api.kde.org/extragear-api/graphics-apidocs/krita/libs/libkis/html/classDocument.html] 你便会发现 document 类下面有个叫做 name() 的功能用来返回文档名称，width() 和 height() 则会返回文档尺寸。如果我们想要生成 Krita 所打开文件的信息报表，我们可以编写下面的脚本：

from krita import *

for doc in Krita.instance().documents():
    print(doc.name())
    print(" "+str(doc.width())+"x"+str(doc.height()))

We get an output like:

==== Warning: Script not saved! ====
Unnamed
 2480x3508
sketch21
 3508x2480
Blue morning
 1600x900

希望通过上面的介绍，你已经学会了如何检索和使用 Krita API 文档的内容。

Krita 的 API 有许多程序类。你可以在文档页面的左上列表找到它们，也可以点击名称来查看各个功能的 API 文档。print() 和 dir() 功能可以用来列出 Krita 的全部操作，你只需要把前面例子中的“python_scripter”换成 API 文档中的所需名称即可。

[print([a.objectName(), a.text()]) for a in Krita.instance().actions()]

Python 的 inspect 模块就是用来干这个的。下面的例子展示了如何在控制台里输出一个程序类的信息。

import inspect
def getInfo(target):
    [print(item) for item in inspect.getmembers(target) if not item[0].startswith('_')]

getInfo(Krita.instance())

Finally, in addition to the LibKis documentation, the Qt documentation, since Krita uses PyQt to expose nearly all of the Qt API to Python. You can build entire windows with buttons and forms this way, using the very same tools that Krita is using! You can read the Qt documentation [https://doc.qt.io/] and the PyQt documentation [https://www.riverbankcomputing.com/static/Docs/PyQt5/] for more info about this, and also definitely study the included plugins as well to see how they work.

技术细节

在 Windows 环境进行 Python 编程

要在 Windows 7/8/8.1 下面正常运行 Python 环境，请从微软的网站下载安装 通用 C 运行时 [https://www.microsoft.com/en-us/download/details.aspx?id=48234] 。(Windows 10 已经预装)

Python 2 和 3

Krita 默认为 Python 3 进行编译。

要为 Python 2 进行编译，把下面的参数添加到 Krita 的 cmake 配置:

-DENABLE_PYTHON_2=ON

如何制作 Krita Python 插件

你可能已经编写了一些可以在 Python 脚本工具中执行的脚本，但你还想进一步扩展其功能并且让它随 Krita 进程自动被调用。把脚本包装成插件可以比在脚本工具中执行具有更好的弹性，功能也更加强大。

尽管你可能已经对 Python 了如指掌，但是为了能让 Krita 正确识别你的插件，你还需要学习一些细节。本节将对如何创建 Krita 专用的几种 Python 脚本进行介绍。

本文包含的例子是为那些对 Python 已经具备基本了解的人们准备的。这些范例和相关的 API 文档鼓励读者大胆进行实验，而不是盲目地复制粘贴大段代码，所以请认真阅读它们。

如何让 Krita 识别你的插件

Krita 的脚本有两个组成部分 - 该脚本的文件夹 (存有该脚本的 Python 文件) 和一个”.desktop” 文件供 Krita 载入和注册该脚本使用。要让 Krita 载入你的脚本，两者必须被放置在 Krita 的资源文件夹的 pykrita 子文件夹 (Linux 环境下为 ~/.local/share/krita/pykrita)。要显示资源文件夹，可在菜单栏打开 设置 ‣ 管理资源 对话框。点击 打开资源文件夹 按钮后将使用系统自带的资源管理器显示 Krita 的资源文件夹。参考 API 文档 [https://api.kde.org/extragear-api/graphics-apidocs/krita/libs/libkis/html/index.html] 的“Auto starting scripts”一节。如果 Krita 的资源文件夹里没有 pykrita 子文件夹，可以手动在资源管理器里新建一个。

脚本是通过一个 .desktop 后缀的文件进行识别的，它包含了脚本的基本信息。

因此，每个插件都需要你为它们创建一个文件夹和一个 desktop 文件。

该 desktop 文件的内容格式如下:

[Desktop Entry]
Type=Service
ServiceTypes=Krita/PythonPlugin
X-KDE-Library=myplugin
X-Python-2-Compatible=false
X-Krita-Manual=myPluginManual.html
Name=My Own Plugin
Comment=Our very own plugin.

Type (类型)

此项应总是设为 Service (服务)。

ServiceTypes (服务类型)

对于 Krita 的 Python 插件，此项应总是被设为 Krita/PythonPlugin。

X-KDE-Library (KDE 程序库名称)

此项指定你为该插件创建的文件夹名称。

X-Python-2-Compatible (Python 2 兼容性)

指定是否兼容 Python 2。例子中此项为 false (否)，如果 Krita 是为 Python 2 而不是 3 进行编译 (-DENABLE_PYTHON_2=ON 使用 cmake 配置参数)，那么 false 意味着此插件不会在 Krita 里面显示。

X-Krita-Manual (插件使用手册)

一个可选的参数，指向该插件配套的使用手册项目。它会被显示在 Python 插件管理器中。HTML 格式的手册将被作为富文本显示 [https://doc.qt.io/qt-5/richtext-html-subset.html] ，否则将作为纯文本显示。

Name (插件名称)

The name that will show up in the Python Plugin Manager.

Comment (注释)

显示在 Python 插件管理器中的该插件的描述。

Krita Python 插件必须是 Python 模块，记得创建一个 __init__.py 脚本，包含下面这行代码：

from .myplugin import *

.myplugin 字串指定你的插件的主程序文件的文件名。如果你把上面的脚本放到资源文件夹之后重启 Krita，它便会被显示在设置菜单的 Python 插件管理器中，但它会被显示为灰色，因为插件的文件夹里并没有一个叫做 myplugin.py 的文件。如果把鼠标悬停在被停用的插件上，你还可以看到相关的错误信息。

小结

总而言之，如果你想要创建一个叫做 myplugin 的脚本：

在 Krita 的资源文件夹的 pykrita 子文件夹里，创建

一个名为 myplugin 的文件夹

一个名为 myplugin.desktop 的文件

在 myplugin 文件夹里，创建

一个名为 __init__.py 的文件

一个名为 myplugin.py 的文件

在 __init__.py 文件里放置这行代码：

from .myplugin import *

在 desktop 文件里放置这段代码:

[Desktop Entry]
Type=Service
ServiceTypes=Krita/PythonPlugin
X-KDE-Library=myplugin
X-Python-2-Compatible=false
Name=My Own Plugin
Comment=Our very own plugin.

在 “myplugin/myplugin.py” 文件里编写脚本代码。

创建一个扩展程序

扩展程序 [https://api.kde.org/extragear-api/graphics-apidocs/krita/libs/libkis/html/classExtension.html] 是在 Krita 启动时执行的相对简单的 Python 脚本。它们通过在 Extension (扩展) 程序类上进行扩展来进行编写。一个最简单的扩展程序代码如下：

from krita import *

class MyExtension(Extension):

    def __init__(self, parent):
        #This is initialising the parent, always  important when subclassing.
        super().__init__(parent)

    def setup(self):
        pass

    def createActions(self, window):
        pass

# And add the extension to Krita's list of extensions:
Krita.instance().addExtension(MyExtension(Krita.instance()))

这段代码当然不具备任何功能。一般来说我们会在 createActions 处为 Krita 添加功能，这样我们就可以通过 工具 菜单来访问该脚本了。

首先，让我们创建一个 操作 [https://api.kde.org/extragear-api/graphics-apidocs/krita/libs/libkis/html/classAction.html] 。我们可以用 Window.createAction() [https://api.kde.org/extragear-api/graphics-apidocs/krita/libs/libkis/html/classWindow.html#a72ec58e53844076c1461966c34a9115c] 来实现它。Krita 会为每个创建的窗口调用 createActions ，并把我们需要使用的那些窗口对象传递过去。

示例如下：

def createActions(self, window):
    action = window.createAction("myAction", "My Script", "tools/scripts")

“myAction”

此项应该被替换为 Krita 用来查找该操作的唯一 ID。

“My Script”

此项为该脚本在工具菜单中的显示名称。

If you now restart Krita, you will have an action called “My Script”. It still doesn’t do anything, because we haven’t connected it to a script.

现在让我们把它写成一个简单的导出文档脚本。把下面的代码添加到 extension 程序类，确保它位于把该扩展程序添加到 Krita 所用的那行代码上方：

def exportDocument(self):
    # Get the document:
    doc =  Krita.instance().activeDocument()
    # Saving a non-existent document causes crashes, so lets check for that first.
    if doc is not None:
        # This calls up the save dialog. The save dialog returns a tuple.
        fileName = QFileDialog.getSaveFileName()[0]
        # And export the document to the fileName location.
        # InfoObject is a dictionary with specific export options, but when we make an empty one Krita will use the export defaults.
        doc.exportImage(fileName, InfoObject())

然后为上面代码中调用的 QFileDialog 添加 import 功能：

from krita import *
from PyQt5.QtWidgets import QFileDialog

最后，把该操作连接到一个新建导出文档：

def createActions(self, window):
    action = window.createAction("myAction", "My Script")
    action.triggered.connect(self.exportDocument)

This is an example of a signal/slot connection [https://doc.qt.io/qt-5/signalsandslots.html], which Qt applications like Krita use a lot. We’ll go over how to make our own signals and slots a bit later.

重新启动 Krita 后，你刚刚编写的这个新操作应该就可以导出文档了。

创建可配置的键盘快捷键

做到这一步的时候，你的新操作并未在菜单栏的 设置 ‣ 配置 Krita ‣ 键盘快捷键 处列出。

Krita 出于某些考虑，只有在操作通过一个 .action 文件呈现时才会把该操作添加到快捷键列表。要把我们的操作添加到快捷键列表，我们把 action 文件编写如下：

<?xml version="1.0" encoding="UTF-8"?>
<ActionCollection version="2" name="Scripts">
    <Actions category="Scripts">
        <text>My Scripts</text>

        <Action name="myAction">
        <icon></icon>
        <text>My Script</text>
        <whatsThis></whatsThis>
        <toolTip></toolTip>
        <iconText></iconText>
        <activationFlags>10000</activationFlags>
        <activationConditions>0</activationConditions>
        <shortcut>ctrl+alt+shift+p</shortcut>
        <isCheckable>false</isCheckable>
        <statusTip></statusTip>
        </Action>
    </Actions>
</ActionCollection>

<text>My Scripts</text>

此项会在脚本分类下面新建一个“My Scripts”子分类，然后把快捷键添加到它下面。

name (名称)

此项填写你在编写该扩展程序时给它命名的唯一 ID。

icon (图标)

此项指定一个可用的图标名称，仅在 KDE Plasma 下面显示，因为 Gnome 和 Windows 用户觉得在菜单里显示图标不美观。

text (文字)

指定在快捷键编辑器里显示的文字。

whatsThis (这是什么说明文字)

此项指定的文字会在 Qt 应用程序调用“这是什么”帮助信息时显示。

toolTip (工具提示文字)

指定在鼠标悬停时显示的工具提示文字。

iconText (图标文字)

指定在工具栏中显示时的替代文字。例如“缩放图像至新尺寸”可以被缩写为“调整图像大小”以节省工具栏空间。

activationFlags (激活标记)

此项决定该操作是否被禁用。

activationConditions (激活条件)

此项决定该操作被激活的条件 (例如只在选中对象可编辑时激活)。可以参考 相关用例代码 [https://cgit.kde.org/krita.git/tree/libs/ui/kis_action.h#n76] 。

shortcut (快捷键)

指定默认的快捷键。

isCheckable (可否勾选)

指定它是否一个复选框。

statusTip (状态提示文字)

指定显示在状态栏的提示文字。

把该文件保存为“myplugin.action”，“myplugin”字串应与你的插件名称相同。要注意的是，action 文件不是保存在资源文件夹的 pykrita 子文件夹，而是 actions 子文件夹。(把 Python 插件和 desktop 文件放在 share/pykrita 文件夹，把 action 文件放在 share/actions 文件夹) 重新启动 Krita。现在该快捷键应该会被显示在快捷键列表了。

创建工具面板

创建一个 工具面板 [https://api.kde.org/extragear-api/graphics-apidocs/krita/libs/libkis/html/classDockWidget.html] 和创建一个扩展程序的做法差不多，工具面板在某些方面更容易编写，但需要用到更多的窗口部件。一个最简单的工具面板代码如下：

from PyQt5.QtWidgets import *
from krita import *

class MyDocker(DockWidget):

    def __init__(self):
        super().__init__()
        self.setWindowTitle("My Docker")

    def canvasChanged(self, canvas):
        pass

Krita.instance().addDockWidgetFactory(DockWidgetFactory("myDocker", DockWidgetFactoryBase.DockRight, MyDocker))

代码中的 setWindowTitle (设置窗口标题) 一项用于指定该工具面板在 Krita 的工具面板列表中显示的名称。setWindowTitle 一项不可省略，但你无需用它来做任何事情，所以是“pass”。

在 addDockWidgetFactory 里面：

“myDocker”

把此项替换为你的工具面板的唯一 ID，Krita 使用该 ID 来跟踪此面板。

DockWidgetFactoryBase.DockRight

此项指定面板的位置，可以是 DockTornOff、DockTop、DockBottom、DockRight、DockLeft 或者 DockMinimized。

MyDocker

把此项替换为你想要添加的工具面板的程序类名称。

如果我们想要把之前编写的导出文档扩展程序添加到这个工具面板的代码里，我们要怎样才能让用户激活它呢？首先，我们需要进行一点 Qt GUI 编程：添加一个按钮！

By default, Krita uses PyQt, but its documentation is pretty bad, mostly because the regular Qt documentation is really good, and you’ll often find that the PyQT documentation of a class, say, QWidget [https://www.riverbankcomputing.com/static/Docs/PyQt4/qwidget.html] is like a weird copy of the regular Qt documentation [https://doc.qt.io/qt-5/qwidget.html] for that class.

不管怎样，我们首先要做的是创建一个 QWidget，这并不是非常复杂，在 setWindowTitle 下面添加：

mainWidget = QWidget(self)
self.setWidget(mainWidget)

然后创建一个按钮：

buttonExportDocument = QPushButton("Export Document", mainWidget)

Now, to connect the button to our function, we’ll need to look at the signals in the documentation. QPushButton [https://doc.qt.io/qt-5/qpushbutton.html] has no unique signals of its own, but it does say it inherits 4 signals from QAbstractButton [https://doc.qt.io/qt-5/qabstractbutton.html#signals], which means that we can use those too. In our case, we want clicked.

buttonExportDocument.clicked.connect(self.exportDocument)

重新启动 Krita 之后我们就有了一个工具面板，面板上还有一个按钮。点击按钮就会调用我们编写的导出功能。

不过这个按钮的对齐有点怪怪的。这是因为我们的 mainWidget 部件没有布局。让我们完成这一步：

mainWidget.setLayout(QVBoxLayout())
mainWidget.layout().addWidget(buttonExportDocument)

Qt has several layouts [https://doc.qt.io/qt-5/qlayout.html], but the QHBoxLayout and the QVBoxLayout [https://doc.qt.io/qt-5/qboxlayout.html] are the easiest to use, they just arrange widgets horizontally or vertically.

重新启动 Krita 之后，按钮的位置应该就好看的多了。

PyQt 信号和信号槽

We’ve already been using PyQt signals and slots already, but there are times where you want to create your own signals and slots. As pyQt’s documentation is pretty difficult to understand [https://www.riverbankcomputing.com/static/Docs/PyQt4/new_style_signals_slots.html], and the way how signals and slots are created is very different from C++ Qt, we’re explaining it here:

你在 PyQt 里面使用的所有 Python 功能都可以作为信息槽来理解，意味着它们可以被像是 Action.triggered 或者 QPushButton.clicked 这样的信号所连接。但 QCheckBox 有一个开关信号，它发送的是布尔值。我们要怎样才能让编写的功能接受布尔值呢？

首先，确保你给要创建的自定义信息槽指定了合适的 import 功能：

from PyQt5.QtCore import pyqtSlot

(If there’s from PyQt5.QtCore import * already in the list of imports, then you won’t have to do this, of course.)

然后你需要在你的功能前面添加一个 PyQt 信息槽定义：

@pyqtSlot(bool)
def myFunction(self, enabled):
    enabledString = "disabled"
    if (enabled == True):
        enabledString = "enabled"
    print("The checkbox is"+enabledString)

接下来，在你创建了复选框之后，你可以使用类似下面的这些功能：myCheckbox.toggled.connect(self.myFunction)

与之类似，要创建你自己的 PyQt 信号，可以如下进行：

# signal name is added to the member variables of the class
signal_name = pyqtSignal(bool, name='signalName')

def emitMySignal(self):
    # And this is how you trigger the signal to be emitted.
    self.signal_name.emit(True)

And use the right import:

from PyQt5.QtCore import pyqtSignal

要让非标准 Python 对象发出信号或者在其上创建信号槽，你要把它们的名称放到引号里面。

结语

好了，到这里我们就把要为 Krita 创建 Python 插件所需的特有细节进行了介绍。虽然本教程既没有介绍如何解析像素数据，也没有介绍处理文档时的最佳做法，但只要你有一点 Python 的编程经验，你现在应该能够创建自己的插件了。

还是那句话，认真阅读为 Krita、Qt 和 Python 准备的 API 文档，大胆探索你可以用它们来做些什么，我们相信你一定能够把 Krita 的 Python 功能运用自如，开拓出一片新天地。

标签管理

Krita 通过标签来管理常见资源。你可以把标签指定给笔刷、渐变、图案，甚至笔尖。你可以在资源列表顶端的下拉菜单选取标签。选中一个标签后列表会过滤出被指定了该标签的所有资源。选中 All 标签将列出全部可用资源。Krita 已经预先提供了一些默认的标签。你也可以自行编辑或者创建新的标签。不同类型的资源都通过类似的标签系统进行管理。

你可以配合 浮动画具板 功能使用标签，提高工作效率。

注解

你可以在浮动画具板中加载一个标签下面的笔刷预设，这样你就可以在画布上快速调用常用的笔刷了。

新建标签并指定给一个笔刷

在预设列表的顶端，按标签下拉菜单右侧的 标签 按钮会弹出标签菜单，在“新建标签”输入框输入一个新标签的名称，然后点击右边的 + 按钮或者按 回车`以完成添加。接下来重新选择 :guilabel:`All 标签，然后准备把预设指定到刚刚新建的标签。

将已有标签指定给一个笔刷

在笔刷预设面板里右键单击一个笔刷，在弹出的菜单中选择“指定给标签”即可把该笔刷指定给某个标签。

更改标签名称

在标签下拉菜单中选中你需要改名的标签，然后点击该菜单右侧的 标签 按钮，在弹出的菜单中即可找到重命名标签输入框。输入一个新名字，然后点击右边的 + 按钮或者按 :kbd:`回车`以完成修改。旧标签名下的所有笔刷预设将被继承过来。

删除标签

在标签下拉菜单中选中你需要删除的标签，然后点击该菜单右侧的 标签 按钮，在弹出的菜单中点击“删除此标签”。

注解

你不能移除 Krita 自带笔刷的默认标签。

软打样

我们在 Krita 里面制作的图像和把它打印出来之后的效果往往看起来并不一样。有时候颜色深了，有时候颜色浅了，有时候红色会更冲，有时候反差弱化了。如果只是在打印一些简单的文档，这点小事没什么大不了的。然而到了专业印刷场景里这可能就是印刷事故了，毕竟颜色的失之毫厘可能会导致图像视觉效果谬以千里。

这一切背后的原因是打印机使用的色彩模型 (CMYK) 和显示器的并不一致，它能够调用的颜色范围 (色域) 往往更小。

有些人会天真地以为：那在 CMYK 色彩模型下面工作不就得了吗！但这种想法其实有三大问题：

在 CMYK 空间下绘画无法保证颜色和打印机的完全一致。因为不同的油墨、纸张和印刷设备的组合会产生无数的色域变化，每个不同组合都会有一个与之匹配的特性文件。

即使你用来工作的特性文件和打印机的输出特性文件完全一致，CMYK 本身依然是一种相当难以预测的色彩空间。色彩运算在 CMYK 空间下面的结果要比在其他空间中的要差，混色模式的结果也会大相径庭。

最后，在一个特定 CMYK 空间下工作意味着制作出来的文件会被限制在该空间狭窄的色域里。如果你想要为另一个不同的 CMYK 特性文件作印前准备，由于纸张、打印机和油墨发生了变化，现在你能够使用的色域可能就变大了，可是你的旧文件却无法发挥新设备的潜力。

所以在理想状况下，你应该在 RGB 空间下绘制图像，使用各种你所惯用的 RGB 功能，然后让计算机随时切换到某个 CMYK 空间下面检查校对。这种技术早已成为现实，我们把它叫做“软打样”。

左边的是原图，右边的是一个软打样功能启用后的视图。两者的区别相当微妙，因为原图并未使用特别明亮的颜色，但不难发现在软打样状态下的右图中，花朵的白色没有原图那么偏青蓝，而叶子的绿色也没有原图那么鲜艳。

你可以在任何图像下面按 Ctrl + Y 切换软打样功能。和其他程序不同的是，在 Krita 里面我们允许为每个视图指定不同的显示模式，因此你可以把原图的视图和软打样状态下的视图并排进行对比。软打样的设置会被保存到 .kra 文件里，你可以通过菜单栏的 图像 ‣ 属性 ‣ 软打样 页面对其进行配置。

软打样功能有下列选项：

特性、深度、模型

这三个选项里只有“特性”一项是特别重要的。特性文件是软打样的目标文件。在专业打印流程中，此特性文件应该由印刷公司决定。

再现意图

设置软打样的再现意图。它使用 色彩管理流程 章节介绍过的再现意图。

左图：软打样的适应状态滑动条被拉到最大。右图：软打样的适应状态滑动条被拉到最小。

适应状态

此选项控制在 绝对比色模式 下面使用屏幕白作为画面白的比例。滑动条拉到最大将完全使用屏幕白，拉到最小则完全使用特性文件指定的白。通常情况下 CMYK 特性文件的白和屏幕的不同，在不同纸张颜色下面也会不同。

黑点补偿

此选项控制黑点补偿的开关。取消勾选此选项将按屏幕和软打样的特性文件所允许的最小值断层挤压暗部。勾选此项则按照屏幕范围缩放黑的数值，从而显示出图像全部的灰阶色调。

色域警告

设置超出色域警告色。

You can set the defaults that Krita uses in Settings ‣ Configure Krita ‣ Color Management.

为确保选项得到正确配置，我们推荐把图像在安装正确的打印机上进行试印，然后把样张跟屏幕软打样的效果进行比对，以决定是否进一步调整软打样的选项。

超出色域警告

超出色域警告色，也称色域警告，它是覆盖在软打样之上的额外选项：它会用被指定的警告色来标记那些无法被包含在软打样特性文件色彩空间内部的颜色。

此功能有助于发现损失的反差，让你可以有针对性地调低图像的色彩反差。

左图：原图视图，右图：软打样视图且打开了色域警告色。Krita 会在 KRA 图像的软打样选项中保存色域警告色。你可以为你的当前图像选择一种易于发现的警告色。

要激活色域警告色，按 Ctrl + Shift + Y ，但要此功能完整地工作，你还要激活软打样功能。

注解

软打样在浮点空间下面无法正常工作，会造成错误的色域警告色显示。因此在浮点空间下软打样会被禁用。

警告

色域警告色有时候会在线性特性文件下面对暗部颜色给出怪异的警告。这是 LCMS 的一处程序问题，你可以 在此 [http://ninedegreesbelow.com/bug-reports/soft-proofing-problems.html] 阅读相关信息。

矢量图形

Krita 4.0 对矢量工具进行了大幅重写。我们将在本页面对全新的矢量工具进行介绍：

什么是矢量图形？

Krita 总体来说是一个栅格图像编辑工具，它的编辑操作主要针对构成图像的栅格数据中的像素进行数值修改。

而矢量图形和栅格图像不同，它通过数学运算来描述形状。而正是因为它使用的是数学算式，矢量图形可以被缩放成任意尺寸而不会损失精度。

上述特性让矢量图形特别适合用于制作徽标和广告横幅。但另一方面，它编辑起来却比栅格图像麻烦得多。所以矢量图形往往只会被用于那些需要严格控制尺寸的设计上面。

创建矢量图形的工具

要创建矢量图形，首先要新建一个矢量图层。点击图层面板左下角的 + 按钮旁边的小箭头，从弹出的菜单中选择“矢量图层”。在矢量图层上面，你可以使用除了手绘笔刷工具、力学笔刷工具、多重笔刷工具以外的全部常规绘画工具来绘制矢量形状。

在矢量图层上你用得最多的工具应该是路径工具和折线工具，它们可以让你绘制出变化多端的形状。

另一方面， 椭圆工具 和 矩形工具 可以画出某些特定的形状。你可以用椭圆工具来绘制饼状图，而矩形工具还可以很方便地生成圆角。

你还可以通过西文书法工具和文字工具来创建特别的矢量图形。西文书法工具可以画出类似于手绘笔刷的矢量形状，而文字工具则用于制作可随时编辑的文字对象。

所有上述工具都会使用当前笔刷、前景色和背景色等来决定生成的图形的样式。

最后，我们还可以使用 矢量图库 工具面板来添加预制的 SVG 文件。和其他工具不同的是通过矢量图库插入的文件就像是符号一样，有它们自己的一套填充色和描边色。

排列形状

一个矢量图层所包含的图形有属于它们自己一套的层级关系，就像是图像的图层的层级关系一样。不同的形状可以相互遮挡，我们可以使用“矢量图形排列”工具面板或者 形状选取工具 来对矢量图形进行排序。

你还可以在矢量图形排列面板里面组合或者拆散形状，对各个形状进行精确对齐，例如把它们沿中心对齐，或者以均匀间距分布等。

编辑形状

要编辑矢量图形，可使用 形状选取工具 和 形状编辑工具 。

形状选取工具 可以用来选择形状和进行简单变形，通过右键菜单 mouseright ，还可以组合/拆散形状、调整图形的先后顺序、使用布尔逻辑来对形状进行结合、减去等操作。

填充

要更改一个矢量形状的填充色，先选中它，然后更改当前的前景色。

你还可以在 形状选取工具 的工具选项面板切换到 填充 页面更改填充色。

矢量图形可以用实色、渐变和图案进行填充。

描边

矢量图像的描边色也具有和填充一样的各种选项。

不过描边还有别的选项来提供更加丰富的变化，例如把线条换成虚线或者在线条上面加入箭头。

坐标

要移动矢量形状，可以使用 形状选取工具 ，你可以在它的工具选项中指定确切的坐标数值。

编辑节点和特有参数

在选中了一个矢量形状时，对它再次双击可以切换到用于编辑该形状的对应工具。一般情况下这会切换到 形状编辑工具 而双击文字形状时则会切换到 文字 工具。

在使用 形状编辑工具 时，你可以在画布上移动一般路径的节点。而特殊的路径，如椭圆和矩形路径等，除了移动节点之外还可以在 工具选项 面板里面编辑它们的特有参数。

与其他程序配合工作

Krita 4.0 版引入的其中一项重大变化是从 ODG 规范转向 SVG 规范。Krita 把矢量图形按 SVG 格式保存在 KRA 文件中，当然也就可以正常打开 SVG 文件。这项变化之所以值得一提，是因为 SVG 是目前适用范围最广的矢量图像格式。

Inkscape

你可以把矢量图形从 Krita 复制粘贴到 Inkscape，也可以反过来从 Inkscape 复制粘贴到 Krita。不过 Krita 仅支持 SVG 1.1 版的特性，如果使用了网格渐变，跨程序转移后的效果并不总能保持一致。

吸附

从 Krita 3.0 开始我们提供了网格和参考线，但要是离开了吸附功能，网格和参考线就会失去意义。

吸附是 Krita 把选区或者形状自动对齐到网格和参考线、文档中心和边框等处的功能。在矢量图层里面还可系吸附到对象的外框、交点、延长线等处。

要切换各种吸附功能的开关状态，按 Shift+S 即可弹出相应的菜单。

接下来让我们介绍一下每种吸附功能的特性：

网格

将光标吸附到当前网格，网格可在网格面板进行配置。隐藏网格后吸附依然生效。网格配置会保存到文档中。用于将将画作对齐到网格，例如游戏的像素拼合图或者基于网格的设计等。

指南

吸附到参考线。参考线可以从标尺上拉出来。隐藏参考线后吸附依然生效。参考线会被保存到文档中。用于对齐漫画画格或者类似的印刷排版。如需进行深入的排版作业，我们推荐使用 Scribus。

正交线 (仅矢量)

吸附到矢量对象的节点所在的水平或者垂直线 (仅改变宽度和高度的情况不算在内，因为在那种情形下你可以直接把光标拉到与路径重合)。用于在水平或者垂直方向上对齐对象，如漫画画格等。

节点 (仅矢量)

把一个对象或者节点吸附到其他路径的节点上面。

延长线 (仅矢量)

如果我们绘制了一根开放的路径，该路径的端点可以按数学原理画出一根延长线。此吸附功能可以吸附到这种延长线上。节点的延长方向取决于在编辑路径模式下的调整点位置。

交点 (仅矢量)

吸附到两个矢量图形的交点上。

边框 (仅矢量)

吸附到一个矢量形状的外框上。

图像边框

吸附到图像的水平和垂直边缘。

图像中心

吸附到图像的水平或者垂直中心。

吸附功能对下列工具有效：

直线

矩形

椭圆

折线

路径

手绘路径

多边形

渐变

形状选取工具和形状编辑工具

文字工具

绘画辅助尺编辑工具

移动工具 (吸附到光标位置而不是正在移动的图层、选区等对象的外框)

变形工具

矩形选区

椭圆选区

多边形选区

路径选区

Guides themselves can be snapped to grids and vectors

吸附功能尚未具备敏感度选项，它的默认值为 10 个屏幕像素。

动画制作

作为 2015 年度 Kickstarter 筹款活动的一项重要目标， Krita 3.0 实现了动画制作功能，可用于制作逐帧栅格动画。尽管依然缺少了包括补间在内的大量功能，但基本的动画制作流程已经就位了。

要使用动画功能，最直接的办法就是把工作空间更改为“Animation (动画)”。工作空间将显示与动画有关的各个工具面板和制作流程。

动画曲线

To create an animation curve (currently only for opacity) expand the New Frame button in the Animation dock and click Add Opacity Keyframe. You can now edit the keyframed value for opacity directly in the “Layers” dock, adding more keyframes will by default fade from the last to the next upcoming keyframe in the timeline over the frames between them. See animation curves for details.

制作流程

在传统动画的制作流程中，动画师首先绘制 关键帧，它们包含了重要的镜头和动作，然后在这些关键帧之间绘制过渡的动画帧 (动画行业术语为“中间画”)。

Krita 的动画制作流程要用到三个重要的工具面板：

时间线 。用于查看和控制当前动画的全部动画帧。该面板还具备图层管理功能。在时间线面板中创建的图层也会被显示在一般图层面板。

动画 。提供播放和切换帧按钮，具有更改帧率、回访速度和 自动帧 模式等选项。

洋葱皮 。控制洋葱皮视图功能的显示方式，用于观察当前帧的前后帧。

动画入门：如何绘制步态循环

想要熟悉这些功能，最好的办法就是去使用它们。步态循环一般被认为是全动画的最基础的形态，因为它要涉及到动画制作的每一方面，所以通过学习制作一组步态循环来入门是再合适不过了。

初始设置

首先我们要创建一个新文档：

打开新建文档对话框，在自定义文档的尺寸页面上，将文档尺寸设为 1280 x 1024，分辨率设为 72 ppi (因为它将用于屏幕显示)，把文档名字命名为“walkcycle” (步态循环)。

切换到内容页面，我们可以指定一个看起来舒服的背景色，然后选中“作为画布颜色”。这样 Krita 将自动在背景的透明区域填充指定的背景色。你还可以在菜单栏的 图像 ‣ 属性 处对此进行更改。这一设置对于动画制作尤其重要，这是因为洋葱皮显示功能必须要在一个含透明度的图层上才可生效。

注解

Krita 有一系列与元数据相关的功能。 创建新文档 对话框里面就有不少。文档标题可以在保存图像时自动用作新文件名候选，而描述则可以被数据库抓取，也可以用来留言。尽管单枪匹马的作者应该用不着这些东西，但在大团队协作时将派上用场。

现在点击 创建 按钮，完成新文档的创建吧！

接下来我们要显示动画制作流程的所需工具面板。点击窗口右上角的工作空间选择按钮：

红色箭头所指的就是工作空间切换按钮。

从弹出的可用工作空间列表中选择 “Animation” (动画)。

工作空间切换后效果如下：

动画工作空间会把时间线和动画面板放置在窗口的底部。要显示洋葱皮面板，点击动画面板的洋葱皮按钮。

绘制动画

我们新建的文档里有两张透明图层。双击图层名称可以重命名图层。把下面的图层命名为“environment” (环境)，把上面的图层命名为“walkcycle” (步态循环)。

用直线工具画一条水平线，这将是我们的地面。

然后选中步态循环图层，随便选择一种笔刷，把人物的头部和躯干画出来。

接下来让我们把注意力转向时间轴面板。我们可以看到时间轴里面空无一物。这是因为我们还没有将图层添加成一个动画帧，所以 Krita 不把它视作动画的一部分。

想要把图层变为动画的一部分，我们必须先在时间线上添加一个动画帧。在时间线的空槽上右键单击 mouseright ，在右键菜单中选中 创建空白帧。

你会发现该图层现在多了一个灯泡状的图标，它是洋葱皮视图的开关。这意味着这个图层已经成为了动画图层。

在前一帧的后面的时间槽里右键单击，选中 创建重复帧 ，这会把前一帧的内容复制为第二帧。现在按 Shift + ↑ ，把第二帧的内容在画面上上移一些。

现在点击时间线左边的灯泡图标，启用洋葱皮显示：

现在你可以看到前一帧的内容被显示为红色。

警告

Krita 把白色也视作一种颜色，而不是把它当成透明。所以你要确保用来绘制动画的图层在没有内容的区域是透明的。如果你不小心把动画图层整个填充了底色，可以使用 颜色转为透明度 滤镜来补救，但比起亡羊补牢，注意预防更重要。

未来帧的内容则会被显示为绿色。过去帧和未来帧的显示颜色可以在洋葱皮面板中进行更改。要显示洋葱皮面板，点击动画面板的洋葱按钮。

接下来是时候画出步态循环动作的两个极端了。其一是两脚迈得最开时的动作，其二是一条腿完全伸直，另一条腿屈曲，准备向前迈出的动作。

现在我们要把这两帧复制到时间槽 2 和 3。要注意的是鼠标拖动在时间线面板里的工作方式有点不一样。直接拖动鼠标不会选中多个帧，而是会移动点击到的第一个帧。要选中多个帧，必须按住 Ctrl 进行拖放。Ctrl + 左键单击 mouseleft 也可以选中或者取消选择动画帧。

现在让我们再试一次，把动画帧 0、1 复制到时间槽 2、3：

首先，用 Ctrl + 鼠标左键 mouseleft 来选中需要复制的帧。被选中的帧会显示为橙色，如上图。

接着，用 Ctrl + 拖放 把动画帧 0、1 拖放到时间槽 2、3。

接下来我们要播放这个循环：

如果左侧工具面板空间不够，你可以把动画面板和洋葱皮面板拖放到底侧空间，和时间线面板并排。

Copy frame 0 to frame 2.

Copy frame 1 to frame 3.

In the animation docker, set the frame-rate to 4.

Select all frames in the timeline docker by dragging-selecting them.

Press play in the animation docker.

你的第一条动画就做好了！

添加并绘制中间画

要在相邻的动画帧之间插入一些时间槽，按 Alt + 拖动 任意帧，这将把该帧和它后面的帧一起整体移动。

Then draw inbetweens on each frame that you add.

不过你很快会发现，插入的帧越多，用洋葱皮视图追踪前后帧就越困难。

你可以用洋葱皮视图面板对洋葱皮的显示方式进行修改。点击顶栏的数字可以控制该帧数位置的洋葱皮显示开关，数字越大，与当前帧离得越远。数字栏下方的柱状图可以控制透明度的变化。面板下方的色块和滑动条可以调整颜色和着色强度。

制作多图层动画

这个步态循环还缺了一双手，我们打算在别的图层上绘制它们。现在到图层面板，或者在时间线面板的左上角按“+”按钮，新建一个图层，把它命名为“hands” (手)。可现在问题来了……

刚才画的步态循环从时间线面板上消失了！不必担心，这其实是时间线和图层的协同显示功能。在全动画制作流程里，画面的组成部分可能会有很多，动画师有时需要将一些当前无需处理的部分从时间线上隐藏起来。你可以手动将它们添加进来。

要把任意图层显示在时间轴，在图层列表中右键单击 mouseright ，勾选 显示在时间轴 。

导出

When you are done, select File ‣ Render Animation.

在渲染动画对话框，选中“图像序列”。Krita 目前只能导出 PNG 图像序列，所以要在图像序列选项中把文件格式设为“PNG 图像”。为避免混乱，最好为输出的图像序列指定一个单独的文件夹。

点击确定按钮后 Krita 将开始渲染动画。渲染过程可长可短，你可以在窗口的底部的状态栏观察导出进度。

该图像序列将被保存成“文件名XXXX.png”的格式，XXXX后缀为该张图像的帧号。

接下来你便可以使用 GIMP、ImageMagick 等工具来把该图像序列合成为一个 GIF 动画了：

在 Windows 下面还可以使用 VirtualDub [http://www.virtualdub.org/] ，在里面打开所有帧的图像，然后在菜单栏选择 File ‣ Export ‣ GIF 。

好好欣赏你的步态循环大作吧！

注解

Krita 从 3.1 版开始支持直接渲染为动画。详情请参考 渲染动画 页面。

导入动画帧

从 Krita 3.0 版开始你也可以导入动画帧。

首先，让我们从 Open Game Art 网站找一张像素拼合图。(以 Libre Pixel Cup male walkcycle 为例)

在菜单栏找到 图像 ‣ 分割图像 ，把像素拼合图进行分割。

这个拼合图内含 9 张图，所以我们要把它分成 9 块。将垂直分割线设为 8 条，水平分割线设为 0 条，随便输入一个文件名前缀，文件类型为 PNG，点击应用。图像将被分割为均等大小。

然后，我们新建一个文档，在菜单栏选择 文件 ‣ 导入动画帧 。在弹出的对话框中点击 添加图像 ，从导入图像对话框中找到刚才分割的拼合图。

你可以同时选中多个图像进行导入。

准备导入的动画帧将被自动排序。你也可以在对话框右侧栏的“排序”下拉菜单对排序方式进行调整。

首帧

此参数指定从第几帧开始导入该动画帧序列。

帧长

此参数指定导入的每张图像在动画中停留的帧数。下方的“源帧率”会自动按照此数值和当前文档帧率来计算出被导入动画序列的理想原始帧率。在本例中，动画文档的帧率为 24，因此当帧长为 3 时，可推算出导入图像序列的理想源帧率为 8，这和我们将要导入的序列是一致的。

点击 确定 ，你的图像序列将会被导入到一个新的动画图层。

参考资料

https://community.kde.org/Krita/Docs/AnimationGuiFeaturesList

The source for the libre pixel cup male walkmediawiki cycle [https://opengameart.org/content/liberated-pixel-cup-lpc-base-assets-sprites-map-tiles]

日本动画模板

此模板用于制作日式动画。它假定用户的使用场景为协作式动画生产。你可以按照具体制作流程的规模和细节需要调整文件夹的组织结构。

基本图层结构

各图层按照从底层开始逐层往上绘制的顺序进行组织，上色图层除外。

图层用途概要

由下至上分别为 (本文以英语图层名的日式动画模板为准)：

Layout Paper (定位纸)

这些图层构成了纸张的版面元素。在投写台上用来对齐的孔洞位置也已备好，以便随时打印出来以传统方式作业。

Layout (Background) (构图) (背景)

这些图层包含了从传统画材上扫描过来的背景场景或者构图。用不上的话可以移除它们。

Key drafts (原画草图)

这些图层用于以纯数字方式起草画面构图。

Keys (原画)

用于对构图进一步细化以制作动画原画的图层。

Inbetweening (中间画)

Where you add inbetweens to keys for the process of coloring, and remove unnecessary details to finalize keys (To be accurate, I finish finalization of keys before beginning to add inbetweens).

Coloring (上色) (中间画图层下方)

用于按照中间画的色线填充颜色的图层。

Time Sheet (律表)、Composition sheet (合成表)

此分组包括一个律表和一个合成表。将图像 90 度旋转后即可使用。

Color Set (色指定表)

包括用来指定主、次线条颜色、固有色、光影色的表格。你可以把这些颜色添加进调色板里。

动画制作的基本流程

原画草图 –> 标注到律表 (或者按律表调整，完成后在标注到律表) –> 在律表上进行调整 –> 如有需要，插入用来绘制中间画草图的动画帧 –> 开始绘制原画。(以下为下图截图文字翻译) 左上：可以一边播放动画进行预览一边调整时间点，也可以把这里的结果反向标注到律表里。留意时间线上的 1、2、3、4 在下图画面上的位置。右上：多个分层和分镜可以整个分组复制后重新命名为 A、B、C 等。虽说主线、色线、影线等要分开在不同图层，但还是要根据具体情况进行增减。

你可以添加新图层并把它们显示在时间线上。

我们在下图对不同帧率的时间点进行了介绍。左上：首帧和末帧。右上：播放速度和帧率。下图时间线由下至上分别为：每秒 24 帧的全动画 (一拍一)、每秒 12 帧的半动画 (一拍二)、每秒 8 帧的一拍三动画。

图层按照律表的标注指定为不同颜色标签。Black (黑色) 图层用于绘制主线。Red (红色) 图层用于绘制指定高光的色线。Blue (蓝色) 图层用于绘制指定阴影的色线。Shadow (影子) 图层用于指定更深色阴影的亮绿色色线。可按照具体情况增减图层。

原画完成之后便是时候绘制中间画了。如果你开始觉得 Krita 开始变慢，可以把原画草图跟原画图层合并，还可以移除那些不再需要的图层。

以律表和中间画草图等为参照，完成原画、清理冗余图层、添加中间画这一系列的工作。

下图为根据律表作出的时间线安排。

一旦 Krita 的矢量功能得到完善，我推荐使用矢量图形来绘制中间画。

如果你打算在 Krita 里面对动画进行上色，可以使用 Coloring (上色) 图层。如果你打算在别的软件里面上色，建议将动画帧导出为 .TGA 文件。

图像分辨率

此模板的打印分辨率为 300 DPI，这是因为在日本动画工作室里，传统动画制作手段依然扮演着相当重要的角色。如果在全数字条件下工作，其实 150 - 200 DPI 已经足够了。你可以按照需要适当降低图像的分辨率。

本文原始作者为本瀬一晃 (时名：税所一輝 / Saisho Kazuki)，日本专业动画师。英文版原始翻译为 KDE 贡献者 Tokiedian。

一般概念

了解非 Krita 特有的一般美术和技术概念。

目录：

色彩

位深度

色彩管理流程

混合颜色

色彩模型

色彩空间体积

Gamma 和线性

Profiling and Calibration

场景线性绘画

观察条件

文件格式

压缩

元数据

开放性

透视投影原理

正交投影

斜轴测投影

轴测投影

透视投影

实践运用

结语和后记

色彩

好了，那么……就让我们来谈论一下**色彩**吧！

色彩不但看上去赏心悦目，它们对于绘画来说也至关重要。在绘画的时候我们都会希望能够便捷地调用和改变颜色，例如对不同的颜色进行 :ref:混合`mixing_colors` 或匹配等有趣的处理，以实现视觉上的**和谐**与**对比**。我们也会希望能够便捷地确定所需的色调而无需绞尽脑汁去思考。我们调用的颜色越多，这些与色彩相关的知识就显得越重要。

一般来说，我们首先要对颜色进行组织。我们常常会把自己对自然现象的观察经验用作依据。比如，我们倾向于按照在彩虹中的先后顺序排列色相，我们也倾向于按照由白到黑的方式理解亮度。自然现象本身又是物理原理的反映。色彩本质上是环境光进入肉眼后的视觉感知，色相的先后顺序与光线的波长有关，而亮度又与光线的能量强弱有关。

对于*传统介质*而言，我们按照颜色与其他颜色的混合结果来排列颜色 (色相)。首先是*减色法*下的三种**原色**：青、品红、黄。将原色中的任意两种混合后可以得到三种间色 (二次色)：紫、橙、绿。将间色与其他颜色混合后可以得到复色 (三次色)，如此类推。两种不同名称的颜色之间的色相变化可以被无限地细分下去，而把全部颜色按照色相的相邻关系连接起来便形成了所谓的*“色环”。一种颜色与白混合后会被**减淡 (提高亮度)*，与黑混合后会被**加深 (降低亮度)**。一种颜色与色环上位置相反的另一种颜色混合后会**变灰 (降低饱和度)**。

在计算机的数字化环境中我们也是通过类似的原则，按照*屏幕产生颜色的方式*来整理颜色。计算机屏幕的每个像素的颜色是通过组合不同亮度的*微小*的红、绿、蓝发光体来实现的。传统颜料在混合时亮度会**相减**，全部颜色混合后会得到浑浊的褐或灰。与之相对的，色光混合时亮度会**相加**——完全无光则为黑，全部色光混合后则为白。照此原则，我们把一种原色的几种可能的**亮度**组织成表：

上表列出了不同亮度的红色光。电脑屏幕可以显示包括这些在内的许多不同亮度的红色。现在让我们引入另外两种原色：绿、蓝，把它们混合为不同的色光来感受*像素的魔法*。例如，下表列出了红和绿的多种混合结果。

但这只是红和绿的组合，那么蓝色呢？下面我们准备了*更多的表格*来展现蓝色被加入后的结果：

如果你用过诸如 Flash 等程序来制作互联网应用，你应该会对这种颜色组织方式感到熟悉。在这个例子中每个色彩通道的样品数为 5，如果把样品数提高到 6，我们就会得到 216 网络安全颜色 [https://websafecolors.info/color-chart]!

不过，通过表格来表现色彩总是觉得哪儿不对劲。这是因为我们的表格是*二维*的，需要混合的原色却有*三种*。其实我们可以通过*三维*方式来思考色彩。这种思路一开始可能会让人觉得有些跳跃，但如果把这些表格按照蓝的比例由上至下垂直叠放成一堆，它们就组成了一个**立方体**。

这个立方体里面填充的不是水、沙子或是*混凝土*之类的实体，它里面填充的是色彩。我们通常会把代表了抽象概念的立方体或其他三维物体理解成一个**空间**，色彩在这里也是一个相当*抽象*的概念，所以我们把这个填充了色彩的立方体叫做**色彩空间**。由于这个立方体的三个轴线为红 (R)、绿 (G)、蓝 (B)，我们便说它是一个 RGB 色彩模型 的色彩空间。

色彩模型有许多种。如图，如果我们把立方体纯黑的一角放在最下方并平衡三个原色色轴，那么纯白的一角就会在最上方，如图指尖的位置。我们沿着平衡点切开这个立方体，连接顶上白点和底下黑点的那根线便是**灰度**直线。

请想象在立方体的中心有一串连贯的灰连接着立方体的白点和黑点。当我们从灰阶线上的任意一点向除了白点与黑点之外的立方体的表面移动时，颜色会变得越来越饱和 (鲜艳)。以灰阶轴上的任意一点为圆心画一个圆，则此灰阶的全部色相会被囊括在此圆中，圆的每个方向是一种颜色。

这便是 HSV、HSL、HSI 和 HSY 色彩模型 的基本概念。例子中展现的是 HSI 模型 (hue-色相、saturation-饱和度、intensity-强度)，它按照混合出某种颜色的三种原色色光的强度来整理颜色。

除此之外还有别的色彩模型，如 L*a*b*, 在该模型中我们首先定义一种颜色的灰阶值，然后再对其作进一步描述。前一个模型通过色相与饱和度进行描述，而这个模型则是通过红、绿、蓝、黄的纯度进行描述。对人类的大脑而言，红和绿、蓝和黄是两组相反的颜色。例如纯红里面一定不会含有任何绿，反之亦然。这个特性让它们非常适合被用作滑动条的*两个极端*。由于此模型*基于人类对于色彩的感知方式而非色彩本身的产生方式*，我们将其称作**可感知模型**。

色彩模型用于描述色彩空间，而色彩空间本身又有不同的体积和形状。Krita 可以让你在不同的色彩模型和色彩空间中进行作业，我们把这一功能称作**“色彩管理”**。

色彩管理是实现 **CMYK** (减色法) 支持所必须的功能。其实除了基本 CMYK 支持之外，色彩管理还有许多妙趣横生的用途。 以需要通过计算机才有可能实现的方式去控制色彩*本是数字绘画最为独特的一个方面，遗憾的是*某些*开发人员认为画手用不着那些功能。

Krita 完整的色彩管理功能让画手们可以对色彩进行*前所未有*的掌控，但网络上面向画手的色彩管理的教程少之又少。为了填补空白，我们为本分类撰写了一系列言简意赅、图文并茂的文章来对色彩管理的相关概念进行说明。

我们建议你至少通读下一章节的 色彩管理流程 页面。因为即使你不打算使用色彩管理功能，了解相关流程也会帮助你搞懂 Krita 的许多与颜色和色彩管理相关的功能。除此之外的其他页面请按需选读。

主题：

位深度

色彩管理流程

混合颜色

色彩模型

色彩空间体积

Gamma 和线性

Profiling and Calibration

场景线性绘画

观察条件

位深度

位深度大体上指的是你为一张图片的每个像素保留的工作内存大小。

这就好象在现实世界里，一张 A2 纸能容纳比 A4 纸更多的图像细节，但也会占用更大的桌面面积。

然而这不仅与图像大小有关，也与颜色的精度有关。

为了便于描述，请容我通过一项 Krita 尚不具备的功能来进行说明：

索引颜色

在旧式程序中，计算机中的每个图像文件都内建了一个调色板，它记录了图像所用的颜色数目。这个调色板通过比特进行定义，因为计算机只能以比特为单位存储数据。

1 位

只包含两种颜色，通常是黑和白。

4 位 (16 色)

总共包含 16 种颜色，因为许多老游戏通过这类调色板呈现色彩，知名度也因此较高。

8 位

总共包含 256 种颜色。8 位图像可以节约纹理和拼合图的内存占用，因而被广泛用于游戏中。

不过 Krita 并不支持这类图像。Krita 以通道方式工作，它计算的是每个通道可以显示的颜色数目 (即“每通道位深度”)。这种处理方式叫做“真彩色”。

真彩色

每通道 1、2、3 位的图像并不存在于任何实际图形应用中，但我们可以想象一下它们位数的差异会如何影响其精度：一般而言每个色彩通道增加一比特，色彩立方体中的方格都会被细分一次，细分后的精度为细分前的二次方。

每通道 4 位 (Krita 不支持)

也称高彩色，或总计 16 位色彩。这是一个较旧的色彩系统，只被运用在某些特定显示器上。

每通道 8 位

也称“真彩色”或“24 位、32 位”。这是大多数显示器的标准，也是 Krita 可以处理的最低的位深度。

每通道 16 位

每通道 16 位比 8 位更进一步，能够处理连显示器都无法展现的细腻色彩变化。这种通道类型有时候也被叫做“高色深”，它的 16 位精度意味着每个通道能处理 65536 个颜色值而不存在负值。得益于这些特性，你能够得到更为平滑的颜色渐变。

16 位浮点

与 16 位类似，但此通道类型的范围相对更广而精度则相对较低。16 位只允许如 [1, 4, 3] 这样的坐标，而16 位浮点则可以处理如 [0.15, 0.70, 0.3759] 这样的坐标，[1.0,1.0,1.0] 代表白。因为整数变量和浮点变量的差异，也因为场景参照图像允许负值，你在 16 位浮点下面可以得到 10 至 11 位的每通道色彩精度。相对的16 位整数下面每通道的色彩精度就是 16 位。16 位浮点的每个通道在 0 到 1 的区间中有 2048 个数值。这是 HDR 或场景参照图像必须的位深度，常常也被称作“半浮点”。

32 位浮点

与 16 位浮点类似，但精度更高。这是 OpenColor IO 的内建色彩深度，因此它在 HDR 图像的处理中要比 16 位浮点更快。由于浮点数据的特性，32 位浮点的每通道精度约为 23 到 24 位，在 0 到 1 的区间中有 16777216 个数值。但它的范围更宽，可以远超 1。这是 HDR 或场景参照图像必须的位深度，也被称作“单浮点”。

如果你的工作色彩空间大于你的设备色彩空间，那么上述知识会很重要——如果你不想见到颜色条纹的话。

虽然你可以尝试运用 32 位浮点来创建你的全部图像，但这种通道类型很容易耗尽你的内存。因此我们应该针对不同的图像来选择不同的位深度。

色彩管理流程

你可能听说过 Krita 具备一种叫做色彩管理的功能。或者你很好奇在菜单中显示的“色彩模型”和“色彩特性文件”等这些东西都是用来干什么的。色彩管理对于从事专业数字影像工作的人员来说非常有用，我们尽可能通过本页面对此进行解释。

基本信息

如果你从未使用过色彩管理进行作业，或者对此一无所知，那么你很可能正在使用一个 sRGB 色彩特性文件，在 8 位 RGB 色彩空间下进行作业。这意味着你可以选用 sRGB built-in 或 sRGB-elle-v2-srgbtrc.icc 预设。在 Krita 全新的色彩空间浏览器中，该色彩特性文件是在使用 8 位色彩通道时的默认值。

我们将深入了解这些术语在理论上的含义，但如果你在这里只是为了试图找出哪个是默认值，你现在就已经知道了。也许在阅读了这篇文章后，你可能会想要改变默认值，以便从滤镜、混合模式抑或是运用了颜色涂抹模型的笔刷中获得新奇有趣的结果。

色彩管理用来解决什么问题？

为了说清楚为什么要进行色彩管理，你首先要弄懂它试图去解决哪些问题。

让我们在脑海里想象一个幼儿园：

一个有 28 名儿童的班级被分为 7 人小组，每个组都有自己的桌子。

老师给他们布置了一个绘画作业：他们需要画出一个红色的三角形、一个蓝色的正方形、一个绿色的圆形，然后用黄色把这三个图形给框起来。孩子们对绘画已经相当熟悉，所以老师可以放心地任凭聪明的孩子自由施展，而把更多的时间花在那些需要帮助的孩子身上。

下面就是孩子们最后画出来的画：

尽管每个组的任务都是一样的，但是他们的成果看起来却不一样。

第一组使用的颜色是朱红、明黄和群青。他们绘制的三角形的红色很鲜明，但他们绘制的圆形的绿色却很浑浊。这是因为群青的颜色实在是太暗了，用它很难调出好看的绿色系。

第二组用了品红、明黄和天蓝。洋红是一种接近粉红的红，朱红与之相反，更接近橙色。不过他们画的绿色看起来更顺眼，因为天蓝是一种浅得多的蓝。

第三组用了朱红、明黄、翠绿和天蓝。他们的绿色不是调出来的，所以颜色也显得更纯。

最后，第四组用了朱红、明黄和天蓝。他们绘制的颜色应该和你想象的差不多。

不过他们都还是幼儿园里的孩子，这点颜色差异没什么大不了的。但想象一下如果这样的事情发生在一家印刷公司里会怎样？车间里的四台打印机把同一本杂志印成截然不同的效果，那可是要完蛋的！

为了解决这个问题，我们发明了色彩管理。

色彩管理是什么？

色彩管理，简要地说，是用于在不同的显色设备之间正确转换颜色以保持颜色相同的一套系统。

它的工作方式是将一种颜色转换到参考色彩空间 XYZ。XYZ 是一个包含了人眼可以感知的一切颜色的坐标系。

然后再从 XYZ 转换到其他设备的色彩空间，如 RGB (用于屏幕) 或 CMYK (用于打印)。

Krita has two systems dedicated to color management. On the one hand, we have lcms2, which deal with ICC profiles, and on the other, we have OCIO, which deal with LUT color management.

粗略的讲，ICC 特性文件用于保证在不同设备 (屏幕、打印机等) 上呈现一致的颜色，而 OCIO 则用于对颜色的展现方式进行调整。

在这两个系统下面我们都可以识别出下列色彩空间：

设备空间

Device spaces are those describing your monitor, and have to be made using a little device that is called “colorimeter”. This device, in combination with the right software, measures the strongest red, green and blue your screen can produce, as well as the white, black and gray it produces. Using these and several other measurements it creates an ICC profile unique to your screen. You set these in Krita’s color management tab. By default we assume sRGB for screens, but it’s very likely that your screen isn’t exactly fitting sRGB, especially if you have a high quality screen, where it may be a bigger space instead. Device spaces are also why you should first consult with your printer what profile they expect. Many printing houses have their own device profiles for their printers, or may prefer doing color conversion themselves. You can read more about colorimeter usage here.

工作空间

用于 ICC 的特性文件随 Krita 预装，用于 OCIO 的配置文件则可以从 OCIO 网站下载。Krita 和类似的软件需要进行大量与色彩相关的运算，而工作空间特别适合该用途。因此我们建议为你的图像指定一个工作空间特性文件。

审美或观察空间

这是一些经过畸变的特殊色彩空间，用来以某种特殊的视觉效果来呈现图像。Krita 没有为 ICC 预装观察空间，也未在 OCIO 中对其提供支持。

色彩管理流程

Knowing this about these spaces of course doesn’t give you an idea of how to use them, but it does make it easier to explain how to use them. So let us look at a typical color management workflow:

这是一个典型的色彩管理流程实例。我们先从扫描仪和数码相机输入图像，然后把这些图像转换到一个能被不同编辑软件使用的工作空间，最后转换到用于屏幕观察和打印的空间。

在一个传统的色彩管理流程里，我们通常关注的是现实世界色彩与计算机色彩之间的转换。例如数码相机的照片或者扫描进计算机的图像等。如果你的成像设备具有一个设备空间，我们便要首先将该设备空间指定给它生成的图像，然后将图像转换至一个工作空间。

我们接下来便要在该工作空间中完成所有的编辑作业，不同的编辑软件之间也通过该工作空间进行互换。Krita 通过 ICC 特性文件与 GIMP 2.9 +、Inkscape、Digikam 和 Scribus 等软件进行互换，通过 OCIO 配置来与 Blender 和 Natron 等进行互换。

你也可以使用工作空间来保存你具备高分辨率、图层分离的工作文件。

在图像的编辑过程中，我们有时会把具有某种审美意趣的所谓“观察空间”应用到图像上。这是一个相当高级的运用领域，在使用 Krita 的时候一般用不着关注这个。

我们完成编辑后便要把图像转换到输出空间，这个输出空间是另一个设备空间。它可以是打印机的 CMYK 特性文件，也可以是某个特定屏幕的 RGB 特性文件。在和专业印刷公司洽谈业务时，你应该留意这一步的相关信息。他们对于如何实现最佳的转换有丰富的经验，可能习惯把客户的工作空间转换到他们打印机的设备空间。

另一种输出形式是屏幕显示色彩的方式。和常规输出不同的是，输出屏幕时发生的色彩转换是在整个编辑过程中持续不断进行的：你需要看见自己正在进行的操作，而你的屏幕又具备自己的设备空间，它当然会影响图像的视觉效果。你可以把屏幕看作是一个望远镜，你必须通过它才能看到你的图像，而望远镜会扭曲图像的成像。

因此，如果你的显示器没有特性文件，电脑就无法得知你的屏幕的相对特性并进行相应的色彩转换，你也就无法确定你正在处理的颜色是否准确。你必须首先为你的显示器进行特性化，得到它的设备特性文件，然后在 Krita 的设定里指定该特性文件作为设备空间，并且为你要进行绘画作业的图像选取 sRGB 色彩空间，满足了这些条件，你才能在你的显示器上看到在 sRGB 色彩空间下准确的颜色。

那么这意味着什么呢？

当我们从零开始绘制作品时，我们可以把显示器的特性文件作为输入空间，因为我们在它下面确定选取的颜色。这样会稍微简化色彩管理流程，但也会让显示器特性文件和观察条件变得更为重要。

为了让输入和输出的色彩完全一致，摄影师和特效行业负责“颜色级配”的人员会穷尽一切手段。现在是几点钟、墙壁的颜色等都是他们要计较的因素。举个例子，如果你显示器背后的墙壁是纯红色的，你的眼睛为了适应这个环境会降低对红色敏感程度，于是在程序里选择的颜色就会偏红。我们把这称为*观察条件*。

好在画手不需要为此担心太多。画作是全人工绘制的，我们会为不同的颜色之间营造出合适的对比以突出重点。这意味着即使我们的图像会比我们原来的意图要偏红一些，作品整体也不至于会因此毁掉。我们回顾之前孩子们绘制图形的例子，虽然每张图的颜色不尽相同，我们依然可以理解图像想要表达的颜色是什么。除此之外，由于画作的颜色是人为选取的，我们自然也可以在日后对其进行修正。当然修正的过程会很痛苦，要是一开始就把观察环境考虑在内，我们日后的工作就可以更加灵活。

尽管如此，了解工作空间的相关知识对于画手来说还是相当有用的。在不同的工作空间下面运用滤镜和混合颜色的结果会有所不同，而如果要运用像 HDR 这样的高科技，也需要知道哪些工作空间与之兼容。

与这类似，Krita 就是一个专门为了从头开始绘制图像而设计的程序，它不需要在图像制作出来之后才去指定工作空间。由于你必须通过显示器这个“望远镜”去观察你的图像，在它对图像的影响下选取颜色，你可以把你的显示器的设备空间看作是图像的输入空间。这也是为什么你应该为你的显示器进行特性化，并把生成的显示器特性文件指派给 Krita，这对于以后打印以及其他工作会大有帮助。

Overall, it is kinda useful to keep things like viewing conditions in the back of your mind. Many professional artists use a mid-gray color as their default canvas background because they find they create much more dynamic images due to having improved their viewing conditions. It is also why a lot of graphics programs, including Krita, come with a dark theme nowadays. (Though, of course this might also be because dark themes can be considered cool, who knows.)

ICC 特性文件

ICC 特性文件是一组用于色彩管理的坐标数据，它描述了在 XYZ 坐标中设备空间的各个顶点。它用于在工作空间和打印机之间，或者在不同的印刷行业软件之间进行交互，如 GIMP、Scribus、Photoshop、Illustrator、Inkscape、Digikam、RawTheraphee 等。ICC 特性文件有两种：

阶调矩阵特性文件。

这些特性文件是随 Krita 预装的。阶调矩阵特性文件中包含了各个坐标的参数和参数之间的插值，以此确定色彩空间的确切体积。因为它们是预装文件，Krita 的色彩空间浏览器已经为它们准备了详尽的介绍资料。这些特性文件适合用作工作空间。

阶调矩阵特性文件包含了一些描述色彩空间的坐标参数，在这些参数之间的部分则是通过插值来填补的，这需要进行大量的数学运算。

cLUT 特性文件

这种特性文件并不常见，主要用于描述打印机设备空间，如 CMYK 等。cLUT 是 Color Look-up Table 即查找表的英文缩写，它们比阶调矩阵特性文件的数据量要大得多，这样才能能针对一些难以预见的情况，如某些颜料的混合特性等保存所需的数据。这是描述色彩空间的一种极为专业的手段，所以许多不关注色彩管理的程序不会支持它们。

cLUT 特性文件为处于该色彩空间中的每种颜色准备了表格以记录它们在参考空间中的坐标。对 CMYK 而言一般采用 L*A*B* 空间，而其他类型的特性文件通常使用 XYZ 空间。这些表格的制作过程格外麻烦，所以它们也较为少见。

ICC 特性文件的有趣之处是你可以使用一个比设备空间更宽广的工作空间。一般来说这不是坏事，可到了转换空间的时候你就得面对如何转换工作空间数值的问题。

可感知

此模式把工作空间中的数值进行挤压，然后塞进要转换到的目标空间里。这种转换手段对于得出可用颜色数值来说没问题，但不适合需要精确重现颜色的用途。如果你想看得清一个图像中的全部颜色，或者想要完整表达原图各种光色之间的对比，可以选用此模式。此模式不兼容阶调矩阵特性文件，它默认给相对比色模式使用。

绝对比色。

与可感知模式相反，绝对比色模式会牺牲一切其他因素来保持正确的颜色数值，这样有可能产生难看的颜色。建议仅用于色彩重现工作。由于 ICC v4 色彩管理流程标准的限制，此模式不兼容阶调矩阵特性文件。

相对比色

An in between solution between perceptual and absolute, relative will try to fit whatever colors it can match between color spaces. It does this by aligning the white and black points. It cuts off the rest to their respective borders. This is what all matrix shaper profiles default to during conversion, because the ICC v4 workflow specifies to only use Relative Colorimetric for matrix shaper profiles.

饱和度优先

此模式会不惜一切代价来保持颜色的鲜艳程度，为此可以牺牲色相的一致性。用于信息图。此模式不兼容阶调矩阵特性文件，因为它们要默认使用相对比色模式。

ICC profile version is the last thing to keep in mind when dealing with ICC profiles. Krita delivers both Version 2 and Version 4 profiles, with the later giving better results in doing color maths, but the former being more widely supported (as seen below in ‘Interaction with other applications’). This is also why Krita defaults to V2, and we recommend using V2 when you aren’t certain if the other programs you are using support V4.

LUT 工具面板和 HDR 成像

LUT 色彩管理 是 Krita 次要的色彩管理模块，与 Blender、Natron 和 Nuke 有共通性，它仅使用配置文件中定义的查找表。

你可以在输入色彩空间处设置图像的工作空间，然后把显示器设为 sRGB 或者你添加到配置中的自定义 LUT 文件。在此场景下的查看下拉选单用于模拟某种显示设备进行软打样。

颜色分量、曝光、gamma、白点和黑点滑动条用于对显示滤镜进行操控。

正如前面解释的那样，我们可以把显示器看作是用来观察图像的一个望远镜，它会对图像造成轻微的影响。我们也可以对这个望远镜进行改造，就好象插入了一片滤镜的方式来以另外一种方式去观察图像。例如我们可以通过某种改造让我们可以看见比我们的显示器的白点更白的白。要说清楚这一点，我们要首先讨论一下白是什么。

例如，我们显示器上的白是纯红、纯绿和纯蓝叠加而来的。它和白纸的白、牛奶的白、阳光的白，甚至是某些手机显示的白都不尽相同。

黑也是同理，在 LCD 面板上的黑要比 LED 面板上的黑要更亮，它与一间被彻底密封起来的房间内部的黑根本没有可比性。

这意味着可能存在比屏幕显示的黑更黑的黑，比屏幕显示的白更白的白。不过为了方便起见，让我们先将黑点和白点指定成某个数值，然后据此比较确定某种黑是否比该黑点更黑，某种白是否比该白点更白。

LUT 工具面板让我们可以对显示滤镜对色彩施加的变化进行控制。这项功能用于修改那些为场景参照亮度而制作的图像，如 HDR 照片或者由渲染引擎输出的图像。

例如我们可以选择把比屏幕白更白的白按照我们的屏幕白进行压缩，以便看清整体的对比状况。

这么做的意义是让你看清楚图像亮部所包含的细节。尽管你无法分辨屏幕白和比它更白的白的区别 (因为你的屏幕显示不出来)，图像程序依然能够照常处理其中的色彩数据。

一个常见的用例是在一个 3D 模型与现实场景之间匹配光照效果。另外一个用例是高级照片修图作业时通过这种手段向用户呈现图像中更多的色彩对比信息。对于绘画作业本身而言，这让你可以自如地控制对比度，颜色想要多亮就可以有多亮。

LUT 面板可以对每个视图单独进行色彩控制，你可以创建一个新视图并设置为亮度模式，这样你就可以同时看见颜色和灰阶，便于把握图像整体的亮度。

还有一个用例就是对某段色彩渐变的呈现效果进行监测。

和 ICC 一样，你可以在 LUT 面板里创建一个类似的特性文件。在这个场景下需要创建的是 ‘LUT’，’Look Up Table’ 即查找表的缩写，通过修改 OCIO 配置文件可将其添加进 OCIO。当 OCIO 已被启用时，位于 设置 ‣ 配置 Krita ‣ 色彩管理 的该项设置将被关闭，你必须使用 内建 色彩引擎。

总结

Krita 具备两种色彩管理模式：

ICC 基于 CIEXYZ 色彩空间工作，需要使用 ICC 特性文件。

OCIO 按照色彩演绎原则工作，使用 LUT 查找表。

ICC 特性文件和 LUT 查找表都可以使用色差计进行制作。

If you want to have a properly color managed workflow, you have one made customary for the input device (your screen) and the output devices (your printer, or target screen). For web the output is always sRGB.

在 设置 ‣ 配置 Krita ‣ 色彩管理 下设置你显示器的特性文件。

切勿在你绘制的图像中使用显示器或者其他设备的特性文件作为工作空间。你应当为图像指定一个例如 elle 系列的工作空间，这样色彩的相关运算会更易于进行，最终成品也会更好看，色彩的变化也更容易预计。Krita 会持续地在屏幕的设备空间和工作空间之间进行色彩转换，确保你可以选取正确的颜色。这便是如前面所述的将屏幕变成望远镜来查看图像一样。

Use the appropriate color management for the appropriate workflow. If you are working with Blender, you will be better off using OCIO, than ICC. If you are working with Scribus or Photoshop, use ICC.

Krita 会进行大量的色彩运算，这常常与颜色的混合有关。此类运算在线性的色彩空间中效果最好，而线性的色彩空间要求至少 16 位的通道深度才能正常工作。线性空间的缺点是容易在使用时混淆。

If you like painting, have a decent amount of RAM, and are looking to start your baby-steps in taking advantage of Krita’s color management, try upgrading from having all your images in sRGB built-in to sRGB-v2-elle-g10.icc or rec2020-v2-elle-g10.icc at 16bit float. This’ll give you better color blending while opening up the possibility for you to start working in hdr!

注解

某些显卡，如使用 Nvidia 芯片的显卡在使用 16 位浮点通道时性能最佳，这是因为 Nvidia 显卡会在内部将数据转换成浮点格式。如果图像本身就是使用浮点，它便不需要进行这个转换过程，处理速度也会因此提高。

注解

现实中并没有一种色彩管理手段可以图像在屏幕显示和打印输出之间保持完全一致的颜色。

导出

在处理完一张图像并准备导出它时，你可以修改其色彩空间以优化效果：

如果你要为网络用途准备该图像：

如果你的工作空间色彩深度在 16 位或以上，你应该在导出时把图像转换为 8 位深度。这样会大大缩小图像的体积。

Krita 目前尚不具备内建的抖动算法，这意味着从 16 位转换到 8 位深度时会发生轻微的色阶现象。不过你可以通过下述手段来模拟抖动：插入一个填充图层，在其中填充一个图案，将不透明度设为 5% 然后把图层的混合方式设成叠加。把整个图像平整为一层，然后再把它转换成 8 位。你刚才填充的图案便会如同抖动效果一样，让转换后的渐变色彩更为平滑。

如果图像只含有灰阶，那就把它的色彩空间转换为灰阶。

如果图像是彩色的，那就把它的工作空间特性文件保存到图像中。现在许多网页浏览器都能处理嵌入在图像中的色彩特性文件。以 Firefox 为例，如果对方的显示器具备一个色彩特性文件，Firefox 便会把你的图像按照该设备空间进行转换。这样一来该图像便可以在你的源显示器和已特性化的其他显示器上呈现几乎一致的效果。

注解

在某些版本的 Firefox 里颜色会显得不正常。这是 Firefox 的一个 bug，因为它的 色彩管理系统并不完整 [http://ninedegreesbelow.com/galleries/viewing-photographs-on-the-web.html] 。要避免这种情况，可以在保存 png、jpg 或 tiff 图像时不嵌入特性文件。

如果你在进行印前准备：

你应该在一个工作空间特性文件下面制作需要打印的图像，而非使用屏幕的自定义设备空间。如果你的图像使用的是自定义空间，你应该把它转换成例如 Adobe RGB、sRGB 或者 rec2020 这样的工作空间。

搞清楚打印机所能接受的图像色彩空间。有些打印机可以接受 sRGB 色彩空间，另外一些则要使用它们自己的特性文件。

与其他应用程序的交互

Blender

如果你想要使用 Krita 的 OCIO 功能，尤其是要与 Blender 的色彩管理协同工作时，你可以让它使用 Blender 的 OCIO 配置。

Blender 的 OCIO 配置可以在 <Blender 程序文件夹>/版本号/datafiles/colormanagement 下面找到。将 LUT 面板设为使用 OCIO 引擎，然后把配置指定为上述路径。这将让你能够使用 Blender 的输入和屏幕空间，但 Krita 尚不支持它的观察空间。

Windows 照片查看器

你可能在与一些其他应用程序进行互通时遇到一些问题。其中一个重要的问题发生在 Windows 自带的照片查看器上面，因为它无法处理新型的 ICC 特性文件。Krita 使用第 4 版的特性文件，而 Windows 照片查看器只能处理第 2 版的特性文件。如果你在导出成 JPEG 时嵌入了特性文件，Windows 照片查看器会把该图像显示得过于昏暗。

色彩管理流程范例

下面时一些色彩管理流程的范例，你可以参考它们来筹划自己的色彩管理流程。

如前所述，你的屏幕的输入空间是在 设置 ‣ 配置 Krita ‣ 色彩管理, 或者在 LUT 面板的 ‘屏幕空间’ 处设置的。工作空间既可以在新建文档时设置，也可以在 LUT 面板的 ‘输入空间’ 处设置。

网络漫画

输入空间

你的屏幕的特性文件。(因为你在你的屏幕上选取颜色)

工作空间

sRGB (默认显示器特性文件)，如果你喜欢也可以换用其他空间更大的特性文件，但前提是你的计算机能够流畅处理更高的位深度。

输出空间

sRGB, ICC version 2, sRGB TRC for the internet, and a specialized CMYK profile from the printing house for the printed images.

使用 sRGB-elle-V2-srgbtrc.icc 来在 Inkscape、Photoshop、Painttool SAI、Illustrator、Paintstorm Studio、Mypaint、Artrage、Scribus 和 Krita 之间进行交互。

如果你在通过 ICC 运用比这更大的色彩空间，你将只能在 Krita、Photoshop、Illustrator、GIMP 2.9、Manga Studio 和 Scribus 之间进行互换。其他的软件会无条件地假定你的工作空间是 sRGB，因为它们并没有色彩管理功能。

如果你在 Krita 与 Blender、Nuke、Natron 之间进行互换，使用 OCIO 并将输入空间设为 “sRGB”，但记得在创建新文档时为 ICC 选择 sRGB 色彩特性文件。

对于面向网络输出的最终图像，应把图像转换为 8 位的 sRGB，srgbtrc，不要嵌入 ICC 特性文件。如果你输出成 PNG，还可以用 PNGCrush 或者其他应用对其进行优化处理。在此场景中选用 sRGB 的理由是你可以假设绝大多数受众都不会为他们的屏幕进行特性化，而他们的屏幕大概也不会高级到可以支持宽色域之类的特性。所以我们应该默认使用 sRGB 来转换用于互联网的图像。

Print

输入空间

你的屏幕的特性文件。(因为你在你的屏幕上选取颜色)

工作空间

sRGB，如果你能使用 16 位深度，则使用 rec2020。

输出空间

印刷公司为打印图像提供的专用 CMYK 特性文件。

每台打印机的 CMYK 特性文件都是不同的，有些打印机甚至针对不同的纸张和油墨准备了不同的特性文件，因此不能随便找一个 CMYK 特性文件用于印刷，应该直接向你的印刷公司索取合适的特性文件。正如在前文的观察条件一节所说的那样，思路要灵活些。

You can set the advanced color selector to transform to a given profile via Settings ‣ Configure Krita ‣ Color Selector Settings. There, tick Color Selector Uses Different Color Space than Image and select the CMYK profile you are aiming for. This will limit your colors a little bit, but keep all the nice filter and blending options from RGB.

游戏

输入空间

你的屏幕的特性文件。(因为你在你的屏幕上选取颜色)

工作空间

对于粗糙度和高光贴图，应选用线性 sRGB 或灰阶。

输出空间

这个比较棘手，但一般情况下使用 sRGB。

这一点比较棘手的原因是，虽然你可以在不同的程序之间使用 OCIO 和 ICC，但推荐你把提供给引擎的图像设为 sRGB 或灰阶。许多较新的基于物理原理的渲染器允许你指定某图像被视作线性还是 srgbtrc 图像来进行处理。在基于物理原理的游戏渲染器中正确地设置此项参数是至关重要的。

虽然游戏引擎需要加载为它们优化过的内容，一般推荐使用 8 位深度，但未来的屏幕可能会具备更高的位深度，而渲染器终有一天会支持这些特性。为了减少日后更新游戏素材时的痛苦，可以现在就打造一个采用更大色彩空间的色彩管理流程，然后编写一些脚本来满足当下的渲染需要。

法线贴图和高度贴图虽然是在一个“非彩色数据”的工作空间下进行定义的，但你会发现绝大多数引擎都不太在乎这个。你应该告诉游戏引擎在导入时不要进行任何转换操作。

高光、光泽度、金属度和粗糙度贴图全部基于线性运算，所以如果某种材质的金属度是 0.3，就意味着它是在一个线性空间中 30% 的灰。因此记得告诉游戏引擎的渲染器这是一个线性图像 (或者至少不要对其进行转换操作)。

参见

对 XYZ 色彩空间的视觉化介绍 [https://www.youtube.com/watch?v=x0-qoXOCOow]

Gamma 校正的基础知识 [http://www.cambridgeincolour.com/tutorials/gamma-correction.htm]

Panda3D 关于并非通过 3D 渲染器编码的图像会被提示其 gamma 编码将造成图像过暗的说明 [https://www.panda3d.org/blog/the-new-opengl-features-in-panda3d-1-9/]

Gamma 编码方式对于色彩运算的影响的 2D 示例 [http://ninedegreesbelow.com/photography/linear-gamma-blur-normal-blend.html]

ArgyllCMS 手册中关于色彩管理基础的概览章节 [http://www.argyllcms.com/doc/ColorManagement.html]

混合颜色

跟真实画材类似， Krita 也有许多混合颜色的方式。传统美术工作者常常在画布上使用“厚涂”， “薄涂”和“排线”等混色技法，而他们使用的颜色又是从**调色板**上混合得来，颜色的混合甚至发生在**笔刷**的刷毛之间。通过进行少许实践和理论学习，我们可以借助 Krita 的各种功能强大的工具在数字绘画中模仿上述混色技法。

不管是传统还是数字绘画，混色技法可以被区分为两大类：“画布内”**和**画布外。

画布内混色

画布内混色技法是作者在画布上直接混合多种颜色的美术技法。这种技法有多种形式，包括在其他颜色上方**层叠半透明颜色**、巧用**肌理**来改变颜色的感受效果、使用传统画材时甚至可以利用两块未干颜料之间的相互影响。总之：画布内混色是一种直接在画布上面进行混色的技法，它是探索创作的有用工具，有时还会带来一些意外收获。

厚涂法

在传统绘画中， 厚涂法**是一种通过层叠多种半透明颜色来在画布上混色的技法。在数字绘画中我们也可以运用厚涂法在画布上直接混色。它也是数字绘画中最常用的基本混色技法。

首先，我们在已有颜色的上方涂上一层半透明的其他颜色，然后按 Ctrl + mouseleft (此快捷键可在画布输入设定中设置) 拾取**混合后的颜色**，用拾取到的颜色再画一层。混合后的颜色处于笔刷颜色和画布已有颜色之间，根据笔刷的 透明度选项**而变化。如此反复操作，可以得到均匀的混合效果。

我们可以调低笔刷的**流量**选项，让厚涂法用起来更得心应手。流量和透明度的特性略有不同：透明度以每一笔画的整体为单位，而 flow 按笔画内部每次笔尖作用为单位。调低流量选项可以让混色结果更均匀，又不至于失去对混色过程的精细掌控。

除此之外，我们还可以把厚涂法与**混合模式**配合使用，以实现其他有趣的效果。例如配合**乘法运算 (正片叠底)**模式来绘制柔和的阴影：

首先勾画线稿并铺上底色。

选用一个半透明的笔刷，把混合模式设为乘法运算，这样笔刷会将它所影响的区域变暗，颜色的混合效果依底色变化。用这种方式我们可以方便地绘制中间调和阴影。

接下来用一个低流量 (0.30 左右) 的笔刷，拾取混合后的颜色反复绘制。这样不但可以帮助我们区分不同的受光面来表现立体感和深度，还可以营造出一种厚涂的效果。

继续调低透明度和流量来营造更平滑的渐变。按照绘画对象和绘画风格来处理**边缘**的锐利或柔顺程度。

涂抹法

涂抹混色法 是通过一个名为 颜色涂抹笔刷引擎 的特殊笔刷引擎实现的，它可以把笔刷颜色和画布已有颜色进行混合，非常适合用来营造厚涂感。性能方面，它比常规像素笔刷稍慢。

如果*涂抹笔刷上没有颜料*，可以产生简单但明显的涂抹效果：

不同的涂抹笔刷效果不尽相同，每一种都试试看吧！

薄涂法

薄涂法**和厚涂法一样，都是混合颜色的技法。它们的不同之处在于厚涂法使用半透明的颜色进行多次层叠，而薄涂法使用一层具有某种**肌理**或**图案**不透明颜料进行混色。

和绝大多数绘画软件一样，Krita 可以通过指定 笔尖 来绘制薄涂法所需的带有肌理的效果。

Krita 的笔刷引擎还可以指定 纹理 来绘制有趣的风格化网点效果。

厚涂法可以有效地*勾画受光面和形体*，薄涂法则有利于*营造肌理和为扁平的色块增添变化*。

画布外混色

Off-canvas mixing has basically always been a core tool for artists everywhere; when we think of the stereotypical artist we might imagine someone with a few brushes in one hand and a wooden palette in the other. Whether it’s oils, watercolor, or other traditional media, for the artist to have absolute control over their colors it’s crucial to have some kind of palette, plate, jar, or other off-canvas area to mix colors together. While it’s easy to overlook this in digital painting (where selecting fresh new colors without mixing at all is both easy and free), Krita has a few very useful and unique features for off-canvas mixing.

拾色器混色

4.1 新版功能.

Krita 和绝大多数美术图形程序一样，具备 拾色器工具 来对画布上的任意像素进行便捷的颜色采样。拾色器虽然并不起眼，但它可能是除笔刷之外数字绘画工作者最重要、最常用的工具。拾色器是颜色混合工作的核心，它与厚涂、薄涂等画布内混色技法配合使用，可以营造出柔顺的颜色混合效果。

然而这个小工具的本领还远不止如此！Krita 的拾色器可被设为拾取以一定像素**为半径区域**内的平均颜色，它还有强大而直观的**混色**功能来辅助画布外混色。

拾色器混色功能改变了数字绘画领域数十年来的拾色方式。相比起以往用新颜色直接替换当前笔刷颜色的做法，混色功能让你可以便捷地“蘸取”一定量的新采样颜色，并把它与当前笔刷的颜色混合。

You can use Color Picker Blending much like a physical paint brush in traditional media. If you were to dip your paint brush into a pool of blue paint, and then immediately dip again into a pool of red paint and paint a stroke across your canvas, the stoke wouldn’t be pure red - it would be some combination of blue and red which would mix to create an intermediate purple color. Which shade of purple would depend on the ratio of paints that mix together within the hairs of your brush, and this is essentially what the Color Picker’s “blend” option controls: what percentage of sampled color is mixed together with your current brush color!

Not only does Krita’s Color Picker Blending feel even more like mixing paints, it is also completely off-canvas and independent of opacity, flow, shape, and other brush settings. Furthermore, unlike most on-canvas mixing techniques, Color Picker Blending works regardless of the location of colors on your canvas - enabling you to mix with colors at any position, on any layer, or even in different documents! Quickly mix lighting colors with local colors, mix the ambient sky color into shadows, create atmospheric depth, mix from a preselected palette of colors in another layer/document, etc.

要使用拾色器混合功能，可在**工具选项**面板中调整“混色”选项。混色为 100% 时拾色器以传统模式工作 (以新采样颜色直接替换当前笔刷颜色)，为 50% 时混合出两者的中间色，更低的数值会让颜色的变化更加微妙。混色选项会同时影响拾色器和 Ctrl + mouseleft 快捷键的功能。

注解

Clicking and dragging the Color Picker around the canvas currently causes it to sample many times as it switches pixels. You can use this trait to quickly soak up more color by “dipping” your color picker into color and swirling it around. This can be pretty satisfying! However, this also means that some care must be taken to prevent from accidentally picking up more color than you want. It’s pretty easy to click a single pixel only one time using a mouse, but when painting with a drawing tablet and pen it can sometimes be desirable to use a slightly lower blend setting!

数字混色器

数字混色器被隐藏在 工具面板 菜单的深处 (设置 ‣ 工具面板 ‣ 数字混色器)，是用来进行画布外混色的有力工具。数字混色器与录音棚里的混音器面板有几分神似，不过它混合的不是音频而是颜色。它具有 6 条独立的**混色滑块**来把当前笔刷颜色与任意所需颜色进行混合。

点击每条混色滑块下方的**颜色按钮**即可在调色板中选取一种用来进行混色的颜色。每条混色滑块上方有一个**色块**，它显示的是该通道所选颜色与笔刷当前颜色混合后的颜色。混色滑块越接近顶端，混合结果就与当前笔刷颜色越接近，画出来的颜色变化也就越微妙。混色滑块越接近底端，混合结果就与该通道所选颜色越接近。

其他提示

除了可以画出平滑的渐变色，混色还有另一个功用：让画作的色调有序，衔接自然。

绘画时并不需要毫无节制地引入新颜色。使用少数几种颜色并在它们之间进行混色即可调出更为协调的色彩，而协调的色彩又有利于为图像营造某种氛围。在这个基础上引入妙笔生花的重点色，还可以让观者可以在画作的世界中领略到更多色彩的妙趣。

学习了这么多混色的相关知识，下次在我们选用颜色的时候，与其随便在高级拾色器里拾取一种中性灰，何不利用 Krita 的各种混色工具来调出一种更具视觉趣味的，以主色色相的补色 (位于色环对面) 为基础的灰呢？

尽管画布内和画布外混色技法是两类完全不同的颜色混合方式，你并不需要在两者之间进行二选一。本文所介绍的混色技法各有各的优点和缺点，适用于不同的场合。把不同的混色技法配合运用，可以实现更为多变和有趣的效果。

最后，混色的效果在使用 16 位以上的高位深色彩通道 时效果更好，但这会消耗更多的 内存。使用 线性色彩空间 的混色效果也会好于 gamma 校正色彩空间，不过起草和描线阶段在 gamma 校正空间中进行会更加方便。

色彩模型

Krita 支持多种色彩空间和色彩模型。本文将对它们进行简要介绍并推荐各个模型的用途。

RGB 模型

红 (Red)、绿 (Green)、蓝 (Blue)。

红绿蓝是光色混合时最有效的三原色，计算机的屏幕便是使用此模型。将红绿蓝混合后得到白，因此这种模型也被叫做加色法模型。

RGB 模型有两种用途：

用于在屏幕上观看的图像：

用于互联网的图像，如按钮、图标和头像等。

用于视频游戏的图像，如像素拼合图和材质等用 RGB 模型效果最好。

为 3D 渲染、视觉特效和 CG 动画准备的图像。

还有就是用作工作空间。RGB 色域更为宽广和可预测，在该模型下建立的工作空间对于图像处理更加有利。最好可以在一个带有色彩特性文件的显示器上使用此模型，这样不但可以得到准确的颜色，还可以确保在其他屏幕上的观察效果保持一致。

RGB 模型中的混色模式

| 颜色 1 | 颜色 2 | 正常模式 | 正片叠底 | 滤色模式
| R | G | B | R | G | B | R | G | B | R | G | B | R | G | B
R & G | 1.0 | 0.0 | 0.0 | 0.0 | 1.0 | 0.0 | 0.5 | 0.5 | 0.0 | 0.0 | 0.0 | 0.0 | 1.0 | 1.0 | 0.0
灰 | 0.5 | 0.5 | 0.5 | 0.5 | 0.5 | 0.5 | 0.5 | 0.5 | 0.5 | 0.25 | 0.25 | 0.25 | 0.75 | 0.75 | 0.75

RGB 模型：HSV、HSL、HSI 和 HSY

Krita 并未提供这些模型的独立色彩空间，但提供了对应每种模型的混色模式和拾色器。下面对它们进行简要介绍：

——给 RGB-HSV 关系图等预留的位置。

色相 (Hue)

颜色的色调，例如红、黄 、绿等。Krita 的色相以 360 度来测量数值，0 度为红、120 为绿、240 度为蓝。

饱和度 (Saturation)

How vibrant a color is. Saturation is slightly different between HSV and the others. In HSV it’s a measurement of the difference between two base colors being used and three base colors being used. In the others it’s a measurement of how close a color is to gray, and sometimes this value is called Chroma. Saturation ranges from 0 (gray) to 100 (pure color).

明度 (Value)

有时也称作亮度，是像素被照亮程度的指标。范围也是从 0 到 100。

亮度 (Lightness)

颜色在白与黑之间的位置。这是一个非线性数值，范围从 0 到 100，饱和度最高的颜色位于 50。

强度 (Intensity)

与亮度 (Lightness) 类似，但将黄 (1,1,0) 视为比蓝 (0,0,1) 更亮。范围从 0 到 100。

光度 (Luma, Y’)

与亮度 (Lightness) 和 强度 (Intensity) 类似，但通过实际测量颜色反射的光量来决定亮度值。范围从 0 到 100。光度常见于电影行业的色彩空间。

灰阶模型

This color space only registers gray values. This is useful, because by only registering gray values, it only needs one channel of information, which in turn means the image becomes much lighter in memory consumption!

这对于制作纹理很有用，也适用于任何需要保持灰阶颜色的图像，如黑白漫画等。

| 颜色 1 | 颜色 2 | 正常模式 | 正片叠底 | 滤色模式
| G | G | G | G | G
灰 | 0.5 | 0.5 | 0.5 | 0.25 | 0.75

CMYK 模型

青 (Cyan)、品红 (Magenta)、黄 (Yellow)、黑 (Key)

这是用于打印机的色彩空间。和计算机屏幕不同，打印机使用的是这四种颜色，它们混合后得到的是黑而不是白。因此这也被称作“减色法”色彩空间。

| 颜色 1 | 颜色 2 | 正常模式 | 正片叠底 | 滤色模式
| C | M | Y | K | C | M | Y | K | C | M | Y | K | C | M | Y | K | C | M | Y | K
R & G | 0.0 | 1.0 | 1.0 | 0.0 | 1.0 | 0.0 | 1.0 | 0.0 | 0.5 | 0.5 | 1.0 | 0.0 | 0.25 | 0.25 | 1.0 | 0.0 | 0.75 | 0.75 | 1.0 | 0.0
灰 | 0.0 | 0.0 | 0.0 | 0.5 | 0.0 | 0.0 | 0.0 | 0.5 | 0.0 | 0.0 | 0.0 | 0.5 | 0.0 | 0.0 | 0.0 | 0.25 | 0.0 | 0.0 | 0.0 | 0.75

根据特性文件具体情况，“彩灰”和“中性灰”又会有所差异。

| 25% | 50% | 75%
| C | M | Y | K | C | M | Y | K | C | M | Y | K
彩灰 | 0.25 | 0.25 | 0.25 | 0.25 | 0.5 | 0.5 | 0.5 | 0.5 | 0.75 | 0.75 | 0.75 | 0.75
中性灰 | 0.0 | 0.0 | 0.0 | 0.25 | 0.0 | 0.0 | 0.0 | 0.5 | 0.0 | 0.0 | 0.0 | 0.75

Krita 的默认颜色是 RGB 模型下面的纯黑，由于算法问题它被转成 CMYK 模型时会导致画出来的笔画偏黄。这也是为什么我们应该在 RGB 模型下面工作，让印刷公司来进行色彩转换。

尽管 CMYK 的色域比 RGB 的要小，但我们依然建议使用 RGB 工作空间特性文件来编辑图像。你可以在事后把成品图像通过可感知或相对比色模式转换至打印机的 CMYK 配置文件。你还可以直接把 RGB 图像输出到打印机，让它自行完成转换。

YCrCb

光度、红色品、蓝色品

YCrCb 名称含义

Y’/Y

光度 (Luma/Luminosity) 。某种颜色反射的光量。

Cr

红色品 (Red Chroma)。某种颜色中红和绿的比例。

Cb

蓝色品 (Blue Chroma)。某种颜色中蓝和黄的比例。

此色彩空间常用于摄影和符合规范的 JPEG 实现方式。人类对亮度比色彩更为敏感，所以 JPEG 会对 Cr 和 Cb 通道进行压缩，但保持 Y 通道的品质不变。

警告

Krita 并未预装用于 YCrCb 的 ICC 特性文件，这是因为该色彩空间并无开源的 ICC 特性文件可用。缺少该色彩空间造成了 Krita 严重缺乏相关方面的测试，且在使用该空间时工作效果不稳定。

XYZ

CIE 委员会 (国际照明委员会，Institute of Color and Light) 在 1931 年对人类的颜色感知方式进行了研究，在此过程中他们发明了第一个色彩空间，其中 XYZ 空间最接近人类视觉特点。

XYZ 空间的道理很难讲清楚，下面的介绍并不精确。

Y

等同于绿。

Z

类似于蓝。

X

应该是红。

XYZ 空间是所有其他色彩特性文件和色彩模型的参考基准。一切色彩转换都在 XYZ 空间中进行，所有色彩空间的坐标都与 XYZ 空间匹配。

L*a*b*

名称含义：

L*

亮度，在此模型中与光度的特性类似。

a*

a* 是品红和绿的比例指标。

b*

b* 是黄和蓝的比例指标。

L*a*b* 空间应该是 XYZ 空间的一个更易理解的变种，也是在所有色彩空间中色域覆盖最为完全的一种。它常被用作色彩转换的过渡空间，更是进行色彩平衡作业的正确色彩空间。在 L*a*b 空间中调整对比和色调远比其他方案要来的简单。

L*a*b* 空间在技术层面与 Photoshop 的 LAB 空间一致。Photoshop 指定使用 CIELAB d50。

滤镜和混色模式。

你可能会发现在 LAB 空间下面混色模式的作用和在 RGB 或 CMYK 空间下面不一样。这是因为混色模式使用色彩坐标进行数学运算，而每个色彩空间的坐标系统都不一样，因此混色结果也会有所不同。

色彩空间体积

在 Krita 的色彩空间浏览器里，你会发现各个空间的体积不尽相同。

不同的色彩空间体积对图像有什么影响，又应如何选用？

使用较大的色彩空间的理由有三种：

尽管你看不见部分颜色，但计算机程序依然可以理解并使用这些颜色进行色彩运算。

用于在程序和设备之间交换图像：大多数 CMYK 特性文件在某些位置大于 Krita 默认的 sRGB 空间，却又在某些位置小于该空间。为了最佳化色彩转换效果，图像的色彩空间应该同时涵盖你的屏幕和打印机的特性文件空间。

用于保存档案。因为未来的显示器可以显示更丰富的色彩 (剧透：有些显示器已经可以)，使用更大的色彩空间可以让你未雨绸缪。

让我们对比下面不同色彩空间中的渐变色：

在左边的是一张伪像较多的 JPEG 图像，它已被按照所附带的一个 ACES sRGBtrc v2 特性文件进行了色彩管理 (如果未进行色彩管理，那么各组渐变色的差异会更明显)。在左边的则是一张用 Krita 从源文件直接转换来的 sRGB PNG 图像。

每组渐变色都是从一个通道的最大值渐变为另一个通道的渐变值。你会发现 ACES 色彩空间的中间调远比 RGB 色彩空间中的要更亮，这是因为它的原色距离更远。

上述例子想要说明的是，Krita 可以在混色和应用滤镜时输出大于可见范围的颜色数值，混色的结果和生成的渐变也会更加准确。尤其是在进行色彩校准时，更大的色彩空间有利于给出更精确的颜色信息。

如果你有一个使用 LUT 的显示器特性文件，你可以使用可感知模式来模拟图像在目标空间的观察效果。

更大的色彩空间也有缺点，它们需要更高的色彩精度来避免发生颜色条纹。因此在使用更大的空间时记得选用 16 位深度以上的色彩通道。

Gamma 和线性

Now, the situation we talk about when talking theory is what we would call ‘linear’. Each step of brightness is the same value. Our eyes do not perceive linearly. Rather, we find it more easy to distinguish between darker grays than we do between lighter grays.

由于计算机是供人使用的，为了迁就人类视觉的特点，我们在图像的色彩坐标系统里为暗部的颜色预留了更多空间。这种调整发生在图像 TRC 的 gamma 函数上，所以我们把它叫做“gamma 编码”。此处的 TRC 的含义可以是阶调响应曲线、也可以是阶调重现曲线、也可以是转换函数什么的 (色彩管理专家爱跟自己过不去)，它们的作用是告诉计算机或打印机某个颜色数值应该怎样去进行响应。

在使用 Krita 的色彩管理功能时，人们常见的困难之一是为不同方式编码的 TRC 指定正确的色彩空间。在上图中间位置的 Pepper 是正确的，它编码所用的和被指定的 TRC 是一致的。左侧的 Pepper 在 sRGB 空间下编码，却被指定为线性空间；右侧的 Pepper 用线性 TRC 编码，却被指定为 sRGB 空间的 TRC。图像来自 Pepper & Carrot [http://www.peppercarrot.com/]

The following table shows how there’s a lot of space being used by lighter values in a linear space compared to the default sRGB TRC of our modern computers and other TRCs available in our delivered profiles:

观察 rec 709 TRC 空间的亮度分布，你会发现暗部色调和亮部色调之间有着明显的差异，而 Lab L* TRC 和 the sRGB TRC 空间的亮度间隔看起来更均匀。这是因为人眼对暗部色调更为敏感。这也意味着如果色彩通道位深度不足，线性色彩空间会产生难看的颜色条纹。所以在制作用于屏幕显示的图像时，我们总是采用 LAB L*、sRGB 或 Gamma 2.2 TRC 等来编码图像。

但是，这种修正会在混色时干扰色彩运算。

我们可以通过下面的实验来演示：

左图**彩色圆形在常规 sRGB 空间下的模糊效果； 右图**彩色圆形在线性空间下的模糊效果。

我们运用滤镜对几个彩色的圆形进行半模糊处理。在 gamma 校正后的环境下，该操作会产生奇怪的黑边。而在线性环境下，该处理给出了自然的渐变效果。

Krita 的颜色涂抹笔刷引擎也受其影响：

看到了没，“颜色很脏”这个数字画手常有的抱怨，实质上是 gamma 校正后的色彩空间扭曲了颜色。如果你想要在 LAB 空间中工作以避免这个问题，记得要使用一个线性的色彩空间。

色彩扭曲现象背后的原理

想象我们要对红和绿进行混色。

首先，让我们确定红和绿在选定的色彩空间和色彩模型中的坐标。它们是：

颜色 | 红 | 绿 | 蓝
红 | 1.0 | 0.0 | 0.0
绿 | 0.0 | 1.0 | 0.0

接着我们给三种不同的混色搭配分配坐标值：

| 红 | 混色 1 | 混色 2 | 混色 3 | 绿
红 | 1.0 | 0.75 | 0.5 | 0.25 | 0.0
绿 | 0.0 | 0.25 | 0.5 | 0.75 | 1.0
蓝 | 0.0 | 0.0 | 0.0 | 0.0 | 0.0

为了得出这些颜色在屏幕上的显示效果，我们要先把每组数值通过当前色彩空间的 TRC 进行换算：

然后我们将得到的数值填入相应的位置。感受一下最终数值和上面混色表的差异之大。

这便是为什么颜色在线性空间中的混色结果更为明亮和柔和。尽管线性空间在物理上更准确，但 sRGB 对色彩空间的利用更高效，所以大多数图像都是用 sRGB TRC 来进行编码的。不过在这个例子中后者并不合适：sRGB 在某些坐标上给出了比线性空间 暗得多的数值。

So different TRCs give different mixes between colors, in the following example, every set of gradients is in order a mix using linear TRC, a mix using sRGB TRC and a mix using LAB L* TRC.

So, you might be asking, how do I tick this option? Is it in the settings somewhere? The answer is that we have several ICC profiles that can be used for this kind of work:

scRGB (线性)

所有后缀为“g10”的“elle”系列特性文件，如 sRGB-elle-v2-g10.icc。

每个“elle”系列特性文件最后的数字代表了该空间的 gamma 值。1.0 为线性空间，大于 1.0 就是 gamma 校正空间。“srgbtrc”是初版 sRGB 特性文件所采用的特殊的 gamma 校正值。

在使用色彩空间浏览器时，你可以从“估算 gamma 值”一项看出该空间是否为 TRC 空间 (如果是 1.0 则为线性空间)。Krita 3.0 则可在 TRC 工具列找到，它看起来和上方的曲线图一模一样。

即使你不怎么绘画，只是需要为视频游戏和 3D 渲染制作材质，使用线性空间依然可以减少引擎内的转换环节，从而提高渲染速度。

The downside of linear space is of course that white seems very overpowered when mixing with black, because in a linear space, light grays get more room. In the end, while linear space is physically correct, and a boon to work in when you are dealing with physically correct renderers for videogames and raytracing, Krita is a tool and no-one will hunt you down for preferring the dark mixing of the sRGB TRC.

Profiling and Calibration

简单来说，色彩特性文件是一个在纯粹的 XYZ 色彩立方体中定义了一组颜色的文件。这组颜色用于定义不同用途下的色彩：

图像中的色彩

设备可以输出的色彩

要选择合适的工作空间特性文件，取决于你所需颜色的多少和计划使用色彩通道位深度大小。想象有一条线，它位于一个单纯 XYZ 色彩立方体内部，显示了从纯黑 (0,0,0) 到纯蓝 (0,0,1) 的一系列颜色。如果你用固定的间距将它分成几段，你就得到了一个线性特性文件。gamma 为 1 的曲线就是一条从 0 到 1 的直线。在每通道为 8 位时，我们只能在整条线上保存 256 个颜色数值。如果我们用上述的线性特性文件来定义这些颜色，我们将丢失一些重要的颜色过渡，无论数值多少看上去都一样 (导致色调分离效应)。

这也是为什么我们设计了 sRGB 特性文件，它可以用有限的数值容纳更多不同的颜色。sRGB 特性文件以人类感知上的等距为准进行级配，用一条据此修正的 gamma 曲线 (参见：http://en.wikipedia.org/wiki/SRGB) 来模拟旧式 CRT 显示器的标准阶调响应曲线。通过上述手段，sRGB 为容纳常见屏幕可显示的每 R/G/B 通道 256 种颜色进行了优化。一些其他特性文件，如 AdobeRGB 等是为了在同样颜色数量下面容纳更多的可打印颜色而优化的，它们一般会在色彩空间的青-绿方位进行延伸。使用宽色域进行作业可以改善打印效果，但必须配合已校准并有正确特性文件的高品质显示器使用，否则极易造成问题。绝大多数常见 CMYK 工作空间特性文件可以在每通道 8 位下面容纳它们的全部颜色，但它们之间的差别很大，所以最好先用常规的 RGB 工作空间制作图像，然后在输出时才转换至所需的 CMYK 特性文件。

在把每通道位深度提升至 16 位时，我们便可以容纳 65536 个数值，比 8 位的 256 个要多得多。因此在 16 位或更高位深度下面我们可以使用色域更宽的工作空间特性文件，如 Wide-gamut RGB 或 Pro-photo RGB，甚至无限色域的空间，如 scRGB。

但 sRGB 毕竟只是一个通用特性文件 (它来自旧式 CRT 规范)，你的显示器还有它的色彩特性文件的颜色响应曲线可能与 sRGB 不符。因此在使用 sRGB 工作空间时可以加载正确的显示器特性文件，Krita 会按 sRGB 空间解读文件所含颜色，然后把那些颜色数值按照显示器特性文件进行转换，最后显示到画布上。

要注意的是，在你导出了文件并用另一个软件查看它时，该软件应该做两件事：

读取嵌入的特性文件以判断哪些颜色可以显示 (绝大多数当代软件会做这一步，即使它们不做，也往往会默认文件为 sRGB，这在我们当前描述的情景下是安全的)

然后把文件的颜色按照显示器的特性文件进行转换 (极少软件会做这一步，大多数只会输出成 sRGB，因此会造成观察效果不一致)。

Krita 会尽可能地使用特性文件，并随软件预装了大量特性文件。

你的显示器的特性文件是最重要的一个特性文件。它不随软件预装，你必须使用校色设备自行制作。如果你缺少该设备，你将无法按照软件的设计意图来使用 Krita 的色彩管理功能。但不管怎样，你依然可以在 Krita 里面任选一种预装的特性文件作为工作空间。

校色设备

校色设备，通常叫做色差计，可被看作是一种特殊的小型数码相机。要进行校色和特性化，先把色差计通过 USB 连接到计算机，然后再运行特性化软件 (一般随该设备提供)。

注解

如果你的色差没有自带软件，或者你不满意自带软件的结果，我们推荐使用 Argyllcms [http://www.argyllcms.com/]

The little camera then measures what the brightest red, green, blue, white and black are like on your screen using a predefined white as base. It also measures how gray the color gray is.

上述信息会被存入一个 ICC 特性文件，计算机便可以使用该文件来校准颜色了。

我们不建议在进行特性化之后更改显示器的显示参数 (对比度、亮度等)。一旦更改，之前制作的特性文件就失去了意义，因为屏幕的显示效果已明显变化。

要让你的显示器更加精确地显示颜色，你可以有两种校色办法：仅进行特性化或校准并进行特性化。

Just profiling your screen means measuring the colors of your monitor with its native settings and put those values in a color profile, which can be used by color-managed application to adapt source colors to the screen for optimal result. Calibrating and profiling means the same except that first you try to calibrate the screen colors to match a certain standard setting like sRGB or other more specific profiles. Calibrating is done first with hardware controls (lightness, contrast, gamma curves), and then with software that creates a vcgt (video card gamma table) to load in the GPU.

这两种方法我们应该如何选择呢？

仅进行特性化：

高品质显示器

你可以得到 sRGB 空间内的绝大多数颜色，还能得到 sRGB 空间之外的许多颜色。更多的可见颜色是件好事。

低品质显示器

你只能得到 sRGB 空间的一部分颜色，大量的颜色细节会丢失，甚至色相也会发生变化。在制作配置文件之前校准显示器有助于得到更为接近完整 sRGB 空间的色彩。

校准并进行特性化：

低品质显示器

如上所述。

多显示器配置

在使用多个显示器时，尤其是在使用镜像模式在多个显示器上显示相同画面时，你无法把内容同时用两个不同的特性文件进行色彩管理。在这种情况下，可把两个显示器按照 sRGB 特性文件 (或者两个显示器同时支持的其他特性文件) 进行校准匹配。

软打样

如果你需要为软打样匹配一模一样的渲染环境，显示器校准有助于得到更为接近的效果。但在不同的显示器和特性文件之间来回切换时应当极为谨慎。

场景线性绘画

场景线性绘画和我们之前提过的 HDR 绘画和场景参照绘画是一回事。场景线性绘画是在一种特定色彩空间下的数字绘画作业方式。该色彩空间必须满足下面的条件：

线性 - 色彩空间不使用 gamma 编码，或者色调映射之类的会影响你正在操作的像素的功能 (这与你正在观察的像素不是一回事，我们会在后面讨论)

浮点 - 每色彩通道 16 位浮点或 32 位浮点。

这两项特性是最重要的。色彩空间的其他属性，像白点、色域的组成颜色等可以五花八门，但只要该空间是线性的，色彩位深是浮点的，那就行了。

So, Scene Linear is not a single one colorspace, but a TYPE of colorspace. You can have a scene linear space that uses the sRGB/rec 709 colorants, or one that uses adobeRGB, or maybe one that uses rec 2020, as long as it is linear and in a floating point bit depth.

These two factors are for one reason: To make black and white arbitrary values. This might seem a bit weird. But when you are dealing with light-sources, you are dealing with a massive range of contrasts, and will have to decide afterwards which white and black you’d like to have. This is what the scene means in scene-linear, the relevant values are unique per scene, like a real world scene: a flower field lit by moonlight, a city in twilight or a sunny beach. You want to be able to put the right emphasis on the most important contrasting values, and being able to choose what is white and what is black is a very powerful tool here. After all, humans in the real world can see much more when they get used to the dark, or to the sun, so why not apply that to how we make our images?

这也是为什么符合要求的空间必须是线性的。使用 gamma 校正和色调映射的色彩空间已经硬性规定了最重要的明暗对比区域，并为此选取了固定的白和黑的数值。线性空间不存在上述情况 ，所以更方便用户自行选择。虽然你终究需要把图像转换成 gamma 校正或色调映射的色彩空间，但那应该是完成混色和应用滤镜之后进行输出时才要做的最后一步。

其实在你处理包含阶调映射的图像时总会伴随着某种非破坏性的色彩转换，这便是显示或视图色彩转换。它好比一副你用来观看图像的望远镜，没了它，你的计算机就无法正确地解读图像的颜色，当然也就无法准确地呈现颜色，这往往会造成图像色彩昏暗。色彩管理的首要功能就是提供这种转换并允许用户进行调整。

Between different view and display transforms, there’s also a difference in types. Some are really naive, others are more sophisticated, and some need to be used in a certain manner to work properly. The ICC color management can only give a certain type of view transforms, while OCIO color management in the LUT docker can give much more complex transforms easily configurable and custom settings that can be shared between programs.

Above, an example of the more naive transform provided by going from scene-linear sRGB to regular sRGB, and to the right a more sophisticated transform coming from the filmic blender OCIO configuration. Look at the difference between the paws. Image by Wolthera van Hövell tot Westerflier, License: CC-BY-SA

但另一方面，对图像色彩进行解读和转换是 OCIO 的唯一功能。虽然 OCIO 可以快速进行复杂的转换，但它并不能理解图像原本的色彩空间，也不能理解 CMYK，也没有相应的 OCIO 色彩特性文件，所以在准备打印图像时必须切换至 ICC 工作流程。

那它有什么用呢？

为了长远打算，使日后的工作更轻松：

高饱和度、非灰调的颜色在线性空间中更容易保持纯净。

高位深下更容易得到平滑的混色。

滤镜在线性空间下的性能和效果都更好，更容易生成好看的模糊和光晕效果。

相乘、相加之类的简单混色模式效果会突然变得极为好用。这是因为线性空间与色彩运算的物理学模型最为接近，在这个模型里光的效果本来就是通过将色彩数值的坐标相乘得出的。

将绘画过程与其他图像如照片等的整合将更加方便，毕竟它们也在使用同类色彩空间。这让你在使用参考图像时不必担惊受怕，为渲染器等准备图像时也会更加得心应手。

总的来说使用线性空间的好处是：更好看的颜色、更好用的滤镜、更好的色彩控制和在不同工作流程之间更方便的图像交换。

那为什么都见不到人在用它？

简单来说，虽然线性空间是个长久之计，但它要求你必须在当下就抛弃熟悉的工具和摒弃多年的习惯。

尤其需要指出的是，在数字绘画工具箱中的许多工具都**对白和黑的特性作了硬性规定**。

一个简单却很大的问题出在**反相**处理上面。颜色的反相在代码层面是用白减去被反相的颜色，许多混色模式和滤镜都在使用这种代码。问题是当前并没有软件允许用户设置反相操作的明度范围，它们全都硬性规定了白的数值，这么一来反相功能就废了。这也意味着使用这种代码的滤镜和混色模式也跟着废了，它们包括但不仅限于：

滤色 (反相+相乘+反相)

叠加 (对明度低于中间调的颜色进行滤色，在 sRGB 下使用中间灰)

颜色减淡 (下层颜色与上层颜色的反相相除)

颜色加深 (下层颜色的反相与上层颜色相除)

强光 (另一种进行叠加的算法，也用了反相)

柔光 (在运算过程中用了好几次反相)

另一方面，相乘、线性减淡/相加 (这两个其实是一回事)、相减、相除、调暗颜色 (仅对比色彩通道数值)、调亮颜色 (同上)、插值等模式*均可正常使用*，只要你的软件不对颜色进行什么怪异的操作就行。

还有就是使用 HSL、HSI 和 HSY 模型的各种算法。这些模型必须假定一个最大明度为白，以此为准对空间进行等比缩放。HSV 不存在这种问题，所以最好使用 HSV 模型的拾色器。

使用 HSY 的混色模式一直有着硬性规定使用 sRGB/rec709 明度值的毛病。虽然除此之外问题不大 (实际上它们在线性空间里能给出准确得多的结果)，但它们并不适合用于宽色域的色彩空间。也因为它们硬性规定了白和黑，所以也不适合用于场景线性绘画。使用 HSY 的混色模式如下：

颜色

光度

饱和度

较暗颜色 (使用光度来决定颜色)

较亮颜色 (同上)

混色模式的问题就这么多，可滤镜的问题也不少。大多数应用软件的滤镜并不能在自定义白下面正常工作。

说到滤镜 (过滤器)，在使用变形工具时你应该避免使用 lanczos3 过滤器，它会在场景线性的锐利明暗线上生成古怪的暗色光晕。双线性插值过滤器就不会有任何问题。

第二个大问题则是**黑的混色效果不同了**。

如果你以前调过颜料，应该知道黑颜料特别容易压倒其他颜料，所以用一丁点儿就足够了。而白色则特别容易被弄脏。

可在场景线性颜色空间下面情况却恰恰相反。白占尽上风，而黑却特别容易被冲淡。这与数字色彩理论的加色模型有关，只是在线性空间下面变得尤其明显而已。

这会影响起草工作，毕竟现在想要留下点痕迹挺不容易的。要应对这个问题，你可以采用下列办法：

在中性灰背景上起草。这本来就是一种值得推荐的习惯，因为它带来了中性的背景色。对于线性空间来说，18% 或 22% 的灰是理想的中性灰。

制作一个比你的常规起草笔刷透明度更低的笔刷。

或者反过来用白来起草。

对于绘画上色，可先用不透明的粗笔刷填满对象轮廓后再进行混色。

万事开头难，这需要一点磨合的时间，但你应该可以很快适应。

最后的问题就是**文件体积**。

16 bit float per channel images are big. 32 bit float per channel images are bigger. This means that they will eat RAM and that painting and filtering will be slower. This is something that will fix itself over the years, but not many people have such a high-end PC yet, so it can be a blocker.

所以问题出在：工具兼容性、定势思维还有文件体积上。

总结

场景线性绘画是指的是在浮点色彩深度的线性色彩空间下面作画。这种模式不会硬性规定白和黑的数值，所以你只能使用不会硬性规定白和黑的工具。它的优点是滤镜和混色的效果更好，与其他场景线性输出的互换性也更好。

To be able to view such an image you use a view transform, also called a display conversion. Which means that if you wish to finalize your image for the web, you make a copy of the image that goes through a display conversion or view transform that then gets saved to png or jpeg or tiff.

场景线性绘画实践

我们说完了理论，接下来就该介绍一下场景线性下面的绘画流程了。

设置画布

选择 16 位或 32 位浮点，Krita 会默认选择一个线性 sRGB 特性文件。这样就行了。

然后去下载一个 OCIO 配置文件。在这里我将使用 Filmic Blender [https://sobotka.github.io/filmic-blender/] ，因为它配置起来特别简单。把下载到的 ZIP 文件解压到方便找回的地方。打开 LUT 工具面板，启用 OCIO，选择“OCIO”并把路径指向刚才解压的 OCIO 配置文件夹。

把视图一项设为“Filmic log encoding”，再把观看一项设为“Base Contrast”。现在你可以开始画画了！

给前文提到过的各种问题留个心眼。不是所有滤镜和混色模式都能正常工作。这些日后会得到改进。其他方面则一如既往。

如何拾取极亮颜色

拾取一般颜色很容易，但我们要如何去拾取非常亮的颜色呢？在 Krita 里面有三种获取极亮颜色的方法：

把 LUT 面板里面的曝光调低。这将增加拾色器中的可见颜色范围。你还可以指定画布快捷键来控制曝光。

或者通过双击双重颜色按钮打开内部拾色器，在明度一项输入大于 1 的数值。

最后从具有极亮色数值的图像中拾取它。

接下来可以绘画了。在 Krita 的全新调色板面板就位之前，请先在画布上的一角留存所用颜色以代替目前无法正常保存该颜色的调色板。

基于光照的绘画流程

我们对典型的基于明度的绘画流程已经很熟悉了。在这种流程里我们只需在图像的底色上面叠加灰，把注意力全部放在控制图像各处的明度上。我们也可以在场景线性绘画中进行类似操作。

在基于明度的绘画流程里绘制调子图层就像是在画一张灰阶图，所画的部分都会让混合后的颜色变深。而在基于光照的绘画流程里光照图层的光是可以有颜色的，对象的固有色和光色相乘后得出混色结果。你可以先把光照图层中的对象画成全白，在白的基础上用其他颜色勾勒出整个对象的受光情况，在另一个图层上绘制对象的固有色，最后使用相乘混色模式就可以得到正确的颜色了。

The leftmost image is both the lighting based one and the color layer separate, the middle with the two layers multiplied and the right a luminosity based view. This cat is a nice example as it demonstrates why having textures and lighting separate could be interesting.

你还可以在基于明度的绘画流程里利用光照原理。打开一个新视图，然后将明度分量设成光度。这样你就可以在基于明度法的流程里把灰阶图和光照图进行并列比较了。

The keen minded will notice that a lighting based workflow kind of resembles the idea of a light pass and a color pass in 3d rendering. And indeed, it is basically the same, so you can use lighting passes from 3d renders here, just save them as EXR and import them as a layer. One of the examples where scene linear painting simplifies combining methods.

结语

When you are done, you will want to apply the view transform you have been using to the image (at the least, if you want to post the end result on the internet)… This is called LUT baking and not possible yet in Krita. Therefore you will have to save out your image in EXR and open it in either Blender or Natron. Then, in Blender it is enough to just use the same OCIO config, select the right values and save the result as a png.

在此阶段你还可以应用 Blender 和 Natron 的滤镜，如果需要协作，你应将图像保存为 EXR 格式以便他人使用。

观察条件

我们在前文曾经简单介绍过观察条件，但它与“白点”又有什么联系呢？

两者的关系非常密切。白点实际上就是在描述一种观察条件。

我们通常所说的观察条件指的是我们观看图像时所在房间的光照和装修情况。我们的眼睛会试图同时理解我们正在注意的颜色 (图像的颜色) 和那些我们并未注意的颜色 (房间的颜色)。这意味着两组颜色都会影响该图像的视觉效果。

左图：让我们在维米尔的大作外面套上一圈比画面本身更显眼的颜色来糟蹋大师的手笔吧。中图：室内设计师所不屑的中性灰背景却有助于突出画面本身的颜色。右图：本文作者参观莫瑞泰斯皇家美术馆时本作展区的大致背景色。原图来自 Wikipedia Commons。

以上面组图为例，我们不难理解为什么博物馆的布展人员会对那些把博物馆的内墙给刷成鲜艳的红色或者蓝色的室内设计师深恶痛绝，因为这样的室内环境会强烈地扭曲人们对参展作品色彩的感受。(尤其是当画家的用色风格与维米尔接近时，观展体验将会非常糟糕)

光照是观察条件的另一因素，它的影响可以非常强烈。光照会影响所有颜色的视觉效果。如果你画了一张向日葵和虞美人的画，然后把明亮的黄光打在画面上，向日葵和白色的背景将很难区分开来，而虞美人的红色变成了橙色。这种现象叫做 同色异谱 [https://en.wikipedia.org/wiki/Metamerism_%28color%29]，在通常情况下应避免发生在色彩管理流程中。

下面让我们通过具体的例子来学习，为什么条件同色异谱会在不同来源的颜色之间进行比对时造成问题。

For example, if you are designing a print for a red t-shirt that’s not bright red, but not super grayish red either. And you want to make sure the colors of the print match the color of the t-shirt, so you make a dummy background layer that is approximately that red, as correctly as you can observe it, and paint on layers above that dummy layer. When you are done, you hide this dummy layer and sent the image with a transparent background to the press.

可当你拿到衬衫时却发现颜色有点不对劲，图案好像有点偏黄，而衬衫的颜色则变紫了。

这就是白点在起作用。

在之前观察衬衫颜色的时候，你可能身处一个用白炽灯照明的白色房间。而你和其他画画的一样都是夜猫子，所以你在半夜挑灯夜战画出了这个图案。但是白炽灯的色温只有 2300K 到 2800K 左右，它们发出的光是偏黄的，被规定为白点 A。

你的显示器的色温为 6500K，也被称作 D65。和白炽灯相比它要偏蓝许多。

更糟糕的是，打印机的基准白点是 D50，是白纸在阳光直射下的颜色。

因此，在晚上点亮白炽灯观察衬衫的颜色时，你感觉到的是被白炽灯的黄光扭曲过的红色。如果你在阴天的室外光下观察 (大致是 D65)，或者在直射的阳光下观察，在打印时选用 D50 的特性文件，那么打印出来的结果会更加接近你的设计预想，图案不会再偏黄。

通过应用白平衡滤镜，你可以把色调显示成中间的模样。但如果一开始就在准确的背景色上制作图案的话，效果肯定会更好。

在技术上你可以用白平衡滤镜来进行补救，G’MIC 里面就有一个那样的滤镜。但因为这个失误在流程末尾才被发觉，所以你在设计阶段的选色就已经受到了不必要的限制，这是很可惜的。

另外一个同色异谱造成负面影响的例子是屏幕投影。

我们在演示文稿里插入了三个分别用红、黄、紫填充的对象，在电脑屏幕上它们的颜色差异相当明显。

可到了投影的时候，房间的灯光没有关掉，这一方面导致投影画面的颜色范围遭到挤压，另一方面黄色的灯光染黄了幕布，导致黄和白之间难以分辨，而紫色也变成了红色，导致红和紫之间也难以分辨。这样一来演示文稿的图像就不好读懂了。

就这两个例子而言，你都可以通过 Krita 的色彩管理功能进行一些弥补，但最重要的还是你要为观察条件“留个心眼”，毕竟它无法改变你在夜里看到的颜色，也无法替你关掉会议室的灯光。

That said, unless you have a display profile that uses LUTs, such as an OCIO LUT or a cLUT icc profile, white point won’t matter much when choosing a working space, due to weirdness in the icc v4 workflow which always converts matrix profiles with relative colorimetric, meaning the white points are matched up.

文件格式

此分类介绍图像文件格式。虽然大多数文件格式的信息可以在维基百科上查阅，但它不一定能说清楚这些格式的用途和各自的优缺点。

在这个分类中我们会尽可能用一种初学者易于理解的方式来对此进行说明。

一般而言，关于文件格式，人们会关注下列特性：

压缩

压缩指的是某种文件格式以尽可能少的数据来描述图像的手段，以便在不损失画质的前提下尽可能减小文件体积。

我们通常会发现占用磁盘空间较少的文件格式要么有损画质，要么需要计算机花费大量时间去演算图像的结果。

矢量文件格式，如 svg 是后者的一个典型。这些格式的文件都非常小，因为用来打造这些格式的技术基于数学，保存的都是些数学参数，还可以实现极高的画质。但它们的缺点是：计算机需要花费大量时间来演算图像应该如何显示，而且有时不同的程序会对同一张图片会有不同的解读。此外矢量文件格式意味着矢量图形，这和 Krita 主攻的方向完全不同。

有损文件格式 ，如 jpg 或 webp 是占用磁盘空间较少但会降低画质的例子。它们适用于特定类型的图像。有损意味着该文件格式在描述图像时将省略一些细节来加快速度和减小文件的体积。

无损格式 ，如 png、``gif``或``bmp``与此相反，占用多得多的磁盘空间，但也更能保持画质。

然后就是专门的工作文件格式，如 Krita 的 .kra，Gimp 的 xcf，Photoshop 的 psd 等。此外还有互换的工作文件格式，如 ora 和 exr。这些格式不但会占用最多的磁盘空间，还需要专门的软件来打开它们，不过它们可以完整地保存全部的图层、导线以及其他工作环境。

元数据

元数据是某种文件格式包含的除图像内容之外的信息。它可以是人类能够理解的数据，如创建日期、作者姓名、图像描述等，也可以是计算机能够理解的数据，如 icc 配置文件可以告诉计算机应该如何对该文件所含图像的色彩进行解读。

开放性

这是一个比较特别的性质，但它会影响该文件打开和恢复的难易程度，也会影响该文件格式受支持的广泛程度。

大多数程序的内建文件格式，如 PSD 等是完全封闭的。企业外部的人员想要不通过 Photoshop 恢复文件的数据极为困难。另外一个例子则是数码相机生成的 RAW 文件，每家数码相机企业的文件特性都不尽相同。

SVG 作为一种矢量文件格式，则是一个完全相反的极端。随便一个文本编辑器都可以打开它们进行编辑。

大多数文件格式处在这两种极端之间，于是问题就变成了某种格式受支持的广泛程度了。jpg 和 png 的数据无法直接被人类理解或编辑，但绝大多数的程序都能够打开它们，意味着文件的所有者可以方便地对其进行操作。

目录：

*.bmp

*.csv

*.exr

*.gbr

*.gif

*.gih

*.jpg

*.kpl

*.kra

*.ora

*.pbm, *.pgm, *.ppm

*.pdf

*.png

*.psd

*.svg

*.tIFF

有损和无损图像压缩

*.bmp

.bmp，也称位图，是最简单的栅格图像文件格式。由于该格式不受专利保护，大多数程序都可以打开和保存位图文件。

不过大多数程序不会对位图文件进行压缩，BMP 也因此落下了文件体积巨大的恶名。如果你需要使用无损文件格式保存图像，我们建议使用 *.png 。

*.csv

.csv 是逗号分隔值的缩写，而它是一种开放的纯文本电子表格格式。由于.csv 格式本身就是纯文本，因此可以使用电子表格程序，甚至用文本编辑器来编辑 .csv 文件。

Krita 支持 TVPaint 使用的 .csv 版本，以便在这两个软件，乃至别的软件（比如 Blender）之间传输分层动画。这不是图像序列格式，因此请使用 Krita 中的文档打开和保存功能，而不是 导入动画序列 和 导出动画 菜单项。

该格式包含一个扩展名为 .csv 的文本文件，还有一个与该文件名同名的文件夹和一个扩展名为 .frame 的文件。该 .csv 文件与文件夹必须在同一路径下面。该文本文件包含了场景的参数，如场分辨率和帧率，还有各图层的曝光表。该文件夹包含了:ref:file_png 图像文件。和图像序列不同的是，在这里每个关键帧实例只是一个单独文件，而曝光表会在时间线上对它进行多次链接。

在 LbreOffice Calc 中作为电子表格打开的 .csv 文件

Krita 可以导出和导入此格式。建议使用 8位 sRGB 色彩空间，因为 TVPaint 只支持这一种色彩空间。图层分组和图层蒙版也不被支持。

TVPaint 只能导出单独的该格式的文件。在 TVPaint 11 中，打开 File （文件）菜单中的 Export to… （导出到…）选项 ，在接下来的 Export footage 窗口，选择 Clip: Layers structure 选项卡。

导出用于 TVPaint 的 .csv 文件

要将此格式重新导入到 TVPaint 中，可使用一个以 George 语言编写的脚本扩展。请参阅 TVPaint 社区论坛上的“Packs, Plugins, Third party”（包、插件以及第三方内容）分区。Moho/Anime Studio 和 Blender 也有插件来导入这种格式。

参见

用于 TVPaint 的 .csv 导入脚本 [http://forum.tvpaint.com/viewtopic.php?f=26&t=9759]

用于 Moho/Anime Studio 的 .csv 导入脚本 [http://forum.tvpaint.com/viewtopic.php?f=26&t=10050]

用于 Blender 的 .csv 导入脚本 [https://developer.blender.org/T47462]

*.exr

.exr 是用来保存和载入 :ref:`浮点位深度 <bit_depth>`图像的首选文件格式。由于保存和载入 EXR 的程序库也全都是开源软件，它也是图像交换的最常用格式。

浮点位深度是数字影像工业用于保存场景参照亮度的色彩通道格式，场景参照图像可以用数码相机或渲染器制作。场景参照亮度意味着文件可以有比白更白的亮度值，使它们可以准确地记录光照条件，如日落等。EXR 文件可被用在渲染器里，合成出写实的光照效果。

Krita 可以为了临摹而载入或保存 EXR 文件 (Krita 可以进行场景参照绘画)，也可以用于与 Blender、Mari、Nuke 和 Natron 等软件的图像互换。

*.gbr

GIMP 笔刷格式。Krita 可以把它们作为 predefined brushes 打开和保存。

在导出成 *.gbr 文件时你要选择三件事：

名称

这个名称和文件名不同，Krita 会把它显示成笔刷名称。

间距

此项设置默认笔刷间距。

使用颜色作为蒙版

该选项把图像的最黑值视作绘制区域，把最白值视作透明区域。如果你要把彩色图像用作笔刷，则取消勾选此项。

.gbr 笔刷除此之外并没有什么值得一提的特性，它还会把色彩精度限制在 8 位。

*.gif

.gif 是人们熟悉的用于保存动画的文件格式。它年代久远，每帧最多 索引 256 种颜色。因为这种特性，我们可以在技术上设计一张 256 色的图像，这样在 GIF 格式下面反复编辑保存也不会造成图像品质劣化，所以它也是一种 无损 压缩技术。

256 色的最大颜色限制也意味着它可以在处理灰阶图像时不会发生可见的品质损失。但无论如何，只要图像不是动画，最好还是使用 *.jpg 或者 *.png。

*.gih

GIMP 图像管道格式。Krita 不但可以打开和保存这种文件，还可以在 :ref:`预制形状笔刷选项卡 <predefined_brush_tip>`导入它们。

图像管道的意思是这种文件格式允许你保存多张图像，并通过一些选项来规定如何输出这几个图像。

从上到下：增量、压力和随机模式

GIMP 图像管道格式选项：

常量

在任何情况下均使用第一张图像。

增量

按图层顺序依次绘制各个图像。可以用几个图像配合创造出一组图案。

压力

按压力绘制图像，适用于模拟真实笔刷刷毛的笔刷图案。

随机

随机绘制图像。适合用于快速绘制一组图像集合和生成材质。配合图形符号使用更佳。

角度

使用拖动的角度来决定绘制的图像。

把 Krita 文件导出为 .gih 时，你可以选择默认间距、名称 (方便在界面中发现它) 和是否用图像颜色生成蒙版。

把颜色用作蒙版

该选项把图像的最黑值视作绘制区域，把最白值视作透明区域。如果你要把彩色图像用作笔刷，则取消勾选此项。

我们准备了一个 Krita 笔尖页面 来介绍如何制作 gih 笔刷。

*.jpg

.jpg、.jpeg 和 .jpeg2000 等是专门为编码照片设计的文件格式家族。

照片有大量微妙的颜色渐变，因此并不适合使用 *.gif 的索引颜色方式来进行压缩。JPEG 的解决方案则是把文件转换为感知模型的色彩空间 (YCrCb)，对颜色通道进行压缩，但不压缩明度通道。这种做法的效果特别好，因为人眼对颜色的敏感程度远不及明度。JPEG 还会使用其他的 有损 压缩技术，例如使用余弦波来描述图像反差等。

这也意味着 JPEG 特别适合某些用途。对于包含了大量颜色渐变的完整色彩范围的画作，JPEG 的压缩性能要好于 *.png 和 *.gif。

可是对于包含有大量明显反差的图像，如文字和漫画之类的图像风格，PNG 比 JPEG 更加适合，尽管前者文件更大。对于灰阶图像，PNG 和 GIF 的压缩效率都要比 JPEG 更高。

由于 JPEG 使用了有损压缩方式，不建议用 JPEG 格式反复修改保存文件。有损压缩的特性会在每次保存文件时造成画质的劣化。在编辑图像时应该使用工作文件格式，避免使用有损文件格式。

*.kpl

自 4.0 版开始 Krita 启用了一种全新的调色板文件格式。它支持宽色域颜色，包括 RGB、CMYK、XYZ、GRAY、和 LAB 等，也兼容任意一种色彩位深度，还可以对颜色进行分组。这便是 Krita 调色板文件，或 *.kpl。

*.kpl 本质上是一个 ZIP 文件，内涵两个 XML 文件和一个 ICC 配置文件。colorset.XML 文件保存了颜色样本数据，颜色样本被保存为 ColorSetEntry 项，样本分组被保存为 Group 项。profiles.XML 文件包含了一个色彩配置文件列表，ICC 配置文件本身也被嵌入，以确保在不同电脑上的兼容性。

*.kra

.kra 是 Krita 内建的文件格式，它能够保存 Krita 所支持的全部特性。该格式大体上是基于 Open Document 规范构建的，这意味着你可以将 .kra 文件的扩展名改为 .zip，然后打开它查看文档的内部数据。

该格式的文件体积较大，不适合用来在互联网上分享作品。

*.ora

.ora，或者说开放栅格图像格式，是一种用于在不同程序间交换图像数据的文件格式。它旨在替代 *.psd，因为后者并不是为了交换数据这个目的设计的。和 *.kra 一样，ORA 格式大致基于 Open Document 文件结构，所以它本质上是一个包含了一组 XML 和 PNG 文件的 ZIP 文件。它使用 *.png 而非 Krita 那样通过二进制数据编码图像的理由是保持文件格式的开放性和易支持性。

该文件格式用于数据交换，体积较大，不适合用来在互联网上分享作品。

参见

开放栅格图像格式规范 [https://www.openraster.org/]

*.pbm, *.pgm, *.ppm

.pbm、.pgm、.ppm 是一系列具有相似逻辑的文件格式。它们保存的图像可以作为 ASCII 编码的文件打开，是来自过去电子邮件客户端还无法稳定载入图像的时代的遗物。

它们是年代久远的文件格式，只在非常特定的条件下使用，例如把图像嵌入到代码里面。

.pbm

1 位图像，只能显示黑白两色。

.pgm

8 位图像，可以显示 255 种灰度。

.ppm

可以显示 8 位的 RGB 颜色。

*.pdf

.pdf 是一种用于确保文档在所有计算机上显示效果一致的格式。PDF 的流行是因为它允许创建者确保文档看起来相同，并且不能被读者更改。现在它是一个开放标准，有很多程序可以读取和保存 pdf 文件。

Krita 可以打开包含多个图层的 pdf 文件。但 Krita 目前不支持导出为 PDF，也没有实现 PDF 导出功能的计划。如需使用 Krita 输出的图像创建PDF，请使用 Scribus [http://scribus.net/] 。

PDF 文件虽然可以使用绝大多数浏览器查阅，但它的文件体积较大，我们不建议在官方文档之外的用途使用该格式。印刷厂一般都会接受 PDF 文件。

*.png

.png，也称可移植网络图形，是一种 *.gif 格式的新型替代方案。它们和 *.jpg 一起是目前互联网上三种受支持程度最广的图像文件格式。

png 是一种 无损 文件格式，这意味着它可以完美地保持你的图像的全部色彩。它的高画质带来了较大的文件体积，在保存含有大量渐变和不同颜色的图像时建议使用 *.jpg 。灰阶和含有大量文字和强烈色彩对比的图像，如漫画等，在保存为 PNG 时效果更好。

PNG 和 :ref:`file_gif`一样支持索引颜色，但它却不能和 :ref:`file_gif`一样支持动画。目前有两种为 PNG 提供动画支持的方式，它们是 APNG 和 MNG。前者并非官方项目，而后者又过于复杂，它们至今都没有真正得到推广。

*.psd

.psd 是 Photoshop 的内建文件格式。由于历史原因，人们习惯了把它用作一种图像交换格式，尽管它并非为此设计。

.psd 和 *.pdf、*.tIFF、*.exr、*.ora 和 *.svg 等图像交换文件格式不同，在网上是找不到它的官方规范文件的。这意味着其他软件想使用它，必须对其进行逆向工程。还有就是作为一种内建格式，它的文件结构缺乏明显的指导思想，只关注如何把新版本正在关注的功能给添加进来。PSD 文件就像是 Photoshop 清奇思路的化身，大家虽然都在用它，却也都在嫌弃它。

由于 .psd 被用作一种图像交换格式，人们使用图像程序时往往会为某个程序竟然不支持打开 PSD 文件而感到困惑。你有时候会听到用户说某个程序很糟糕，因为它不能良好地支持 PSD 格式。但考虑到 PSD 是一种未公布规范的内建文件格式，其他软件永远也不可能做到对其完美支持。

Krita 支持 PSD 格式的栅格图层、混色模式、图层央视、透明度蒙版等功能，但不能，也不会支持它的矢量和文本图层，因为相关编程过于困难。

我们建议，尽量使用其他格式取代 PSD 作为图像交换文件格式，如 *.ora 或 *.tIFF 都是有力候补。

作为工作文件格式，PSD 的体积很大，大多数网站都不会接受这种格式。

*.svg

.svg，或可缩放矢量图形 (Scalable Vector Graphics)，是目前最新型的矢量图形交换文件格式。

作为矢量图形，SVG 非常轻量，因为它一般只会保存矢量图形计算所需的坐标和参数。

它由 W3C 组织的 SVG 工作组进行维护，该组织也在维护组建了当今互联网的各种开放标准。

虽然你可以用任意一个文本编辑器编辑它们，但最好的办法还是使用一个矢量图形软件，如 Inkscape。Krita 在 2.9 到 3.3 版支持从形状工具面板处导入 SVG 图像。从 4.0 版开始，Krita 可以正常导入 SVG 图像，也可以把 singlevector 类图层从 图层 ‣ 导入/导出 ‣ 将矢量图层另存为 SVG… 进行导出。从 4.0 版开始，Krita 也将使用 SVG 规范在其 内部格式 中保存矢量图形数据。

SVG 是为互联网设计的，但遗憾的是由于矢量图形不如栅格图像流行，许多网站都尚未对其提供支持。但把它用在你自己的网站上是不会有问题的。

*.tIFF

.tiff，或标签图像文件格式 (Tagged Image File Format)，是一种原本作为扫描仪和打印机的通用格式而设计的交换用栅格文件格式。

它支持多种色彩空间，也支持图层，但图层的保存方式甚是古怪。作为一种 Adobe 所有的格式，它的官方规范记载的图层保存方式和同为 Adobe 所有的 PSD 格式完全不同。

作为一种交换格式，.tiff 不适合用于在互联网上分享图像，支持它的网站也很少。不过印刷公司一般会接受这种文件格式。

有损和无损图像压缩

我们在压缩一个图像时，我们要么想暂时把它的体积变小 (通过电子邮件发送工作文件时)，要么想永久性地把它的体积变小 (在互联网上展示图像时)。

无损*压缩技术是为了*暂时/可逆*地减少信息量而开发的。正如名字所述，它们在压缩时不会损失信息。我们对文字的缩写就是一种无损压缩技术的例子。人们都知道“etc.”展开成“etcetera (其他)”，所以你可以用 4 个字符的“etc.”取代 8 个字符的“etcetera”。

在图像格式中，类似上面例子的压缩方式是通过“索引”颜色进行的。我们先列出图像的所有颜色，然后为每种颜色指定一个编号。我们在描述像素的颜色时只需给出颜色编号，而无需反复描述颜色的具体数值。

有损压缩*是用来*永久/不可逆地*减少图像体积的。这对于网站上展示的成品图像而言非常有用，因为这些输出到网站的图像不是用来再次编辑的，所以我们大可以使用心理学和统计学手段去有选择性地抛弃一部分对观感影响不大的图像数据。

One of the primary things JPEG for example does is chroma sub-sampling, that is, to split up the image into a grayscale and two color versions (one containing all red-green contrast and the other containing all blue-yellow contrast), and then it makes the latter two versions smaller. This works because humans are much more sensitive to differences in lightness than we are to differences in hue and saturation.

JPEG 和其他有损格式还会使用余弦波来描述图像的明暗反差，它们也因此*擅长描述颜色渐变，却不擅长描述锐利的颜色反差*。

而无损图像压缩则与此相反，它们*擅长描述颜色数目较少的高反差图像，但却不擅长压缩颜色渐变较多的图像。

有损和无损格式的另一个重要区别是，有损格式的每次编码都会劣化图像品质，而无损格式能保证每次编码前后的图像品质一致。如果你在 Krita 里面打开一张 JPEG 图像，进行少许编辑然后进行保存，如此反复操作几次，你会发现图像的品质会明显变差。这是有损图像压缩的一个基本特性，因此我们要保留图像的工作文件。

参见

如果你想学习各种压缩技术的特性，可以访问 `维基百科的图像压缩页面<https://en.wikipedia.org/wiki/Image_compression>`_。这个页面比较技术化，但非常有用。

透视投影原理

The Perspective Projection tutorial is one of the Kickstarter 2015 tutorial rewards. It’s about something that humanity has known scientifically for a very long time, and decent formal training will teach you about this. But I think there are very very few tutorials about it in regard to how to achieve it in digital painting programs, let alone open source.

The tutorial is a bit image heavy, and technical, but I hope the skill it teaches will be really useful to anyone trying to get a grasp on a complicated pose. Enjoy, and don’t forget to thank Raghukamath [http://www.raghukamath.com/] for choosing this topic!

部件:

正交投影

斜轴测投影

轴测投影

透视投影

实践运用

结语和后记

So let’s start with the basics…

正交投影

Despite the fancy name, you probably know what orthographic is. It is a schematic representation of an object, draw undeformed. Like the following example:

This is a rectangle. We have a front, top and side view. Put into perspective it should look somewhat like this:

While orthographic representations are kinda boring, they’re also a good basis to start with when you find yourself in trouble with a pose. But we’ll get to that in a bit.

斜轴测投影

So, if we can say that the front view is the viewer looking at the front, and the side view is the viewer directly looking at the side. (The perpendicular line being the view plane it is projected on)

Then we can get a half-way view from looking from an angle, no?

If we do that for a lot of different sides…

And we line up the sides we get a…

But cubes are boring. I am suspecting that projection is so ignored because no tutorial applies it to an object where you actually might NEED projection. Like a face.

First, let’s prepare our front and side views:

I always start with the side, and then extrapolate the front view from it. Because you are using Krita, set up two parallel rulers, one vertical and the other horizontal. To snap them perfectly, drag one of the nodes after you have made the ruler, and press Shift to snap it horizontal or vertical. In 3.0, you can also snap them to the image borders if you have Snap Image Bounds active via Shift + S

Then, by moving the mirror to the left, you can design a front view from the side view, while the parallel preview line helps you with aligning the eyes (which in the above screenshot are too low).

Eventually, you should have something like this:

And of course, let us not forget the top, it’s pretty important:

小技巧

When you are using Krita, you can just use transform masks to rotate the side view for drawing the top view.

The top view works as a method for debugging your orthos as well. If we take the red line to figure out the orthographics from, we see that our eyes are obviously too inset. Let’s move them a bit more forward, to around the nose.

If you want to do precision position moving in the tool options docker, just select ‘position’ and the input box for the X. Pressing down then moves the transformed selection left. With Krita 3.0 you can just use the move tool for this and the arrow keys. Using transform here can be more convenient if you also have to squash and stretch an eye.

We fix the top view now. Much better.

For faces, the multiple slices are actually pretty important. So important even, that I have decided we should have these slices on separate layers. Thankfully, I chose to color them, so all we need to do is go to Layer ‣ Split Layer .

This’ll give you a few awkwardly named layers… rename them by selecting all and mass changing the name in the properties editor:

So, after some cleanup, we should have the following:

Okay, now we’re gonna use animation for the next bit.

Set it up as follows:

Both front view and side view are set up as ‘visible in timeline’ so we can always see them.

Front view has its visible frame on frame 0 and an empty frame on frame 23.

Side view has its visible frame on frame 23 and an empty view on frame 0.

The end of the animation is set to 23.

Krita can’t animate a transformation on multiple layers on multiple frames yet, so let’s just only transform the top layer. Add a semi-transparent layer where we draw the guidelines.

Now, select frame 11 (halfway), add new frames from front view, side view and the guidelines. And turn on the onion skin by toggling the lamp symbols. We copy the frame for the top view and use the transform tool to rotate it 45°.

So, we draw our vertical guides again and determine a in-between…

This is about how far you can get with only the main slice, so rotate the rest as well.

And just like with the cube, we do this for all slices…

Eventually, if you have the top slices rotate every frame with 15°, you should be able to make a turn table, like this:

Because our boy here is fully symmetrical, you can just animate one side and flip the frames for the other half.

While it is not necessary to follow all the steps in the theory section to understand the tutorial, I do recommend making a turn table sometime. It teaches you a lot about drawing 3/4th faces.

How about… we introduce the top view into the drawing itself?

This is a continuation of the orthographic and oblique tutorial, be sure to check it out if you get confused!

轴测投影

So, the logic of adding the top is still similar to that of the side.

Not very interesting. But it gets much more interesting when we use a side projection:

Because our cube is red on both front-sides, and blue on both left and right side, we can just use copies, this simplifies the method for cubes a lot. We call this form of axonometric projection ‘dimetric’ as it deforms two parallel lines equally.

Isometric is sorta like dimetric where we have the same angle between all main lines:

True isometric is done with a 90-54.736=35.264° angle from ground plane:

(as you can see, it doesn’t line up perfectly, because Inkscape, while more designed for making these kinds of diagrams than Krita, doesn’t have tools to manipulate the line’s angle in degrees)

This is a bit of an awkward angle, and on top of that, it doesn’t line up with pixels sensibly, so for videogames an angle of 30° from the ground plane is used.

Alright, so, let’s make an isometric out of our boy then.

We make a new document, and add a vector layer.

On the vector layer, we select the straight line tool, start a line and then hold Shift to make it snap to angles. This’ll allow us to make a 30° setup like above:

We then import some of the frames from the animation via Layers ‣ Import/Export ‣ Import layer.

Then crop it by setting the crop tool to Layer, and use Filters ‣ Colors ‣ Color to alpha to remove any background. I also set the layers to 50% opacity. We then align the vectors to them:

小技巧

To resize a vector but keep its angle, you just select it with the shape handling tool (the white arrow) drag on the corners of the bounding box to start moving them, and then press Shift to constrain the ratio. This’ll allow you to keep the angle.

The lower image is ‘the back seen from the front’, we’ll be using this to determine where the ear should go.

Now, we obviously have too little space, so select the crop tool, select Image and tick Grow and do the following:

Grow is a more practical way of resizing the canvas in width and height immediately.

Then we align the other heads and transform them by using the transform tool options:

(330° here is 360°-30°)

Our rectangle we’ll be working in slowly becomes visible. Now, this is a bit of a difficult angle to work at, so we go to Image ‣ Rotate ‣ Rotate Image and fill in 30° clockwise:

(of course, we could’ve just rotated the left two images 30°, this is mostly to be less confusing compared to the cube)

So, we do some cropping, some cleanup and add two parallel assistants like we did with the orthographic:

So the idea here is that you draw parallel lines from both sides to find points in the drawing area. You can use the previews of the assistants for this to keep things clean, but I drew the lines anyway for your convenience.

The best is to make a few sampling points, like with the eyebrows here, and then draw the eyebrow over it.

使用变形工具的备选轴测投影绘制法

Now, there’s an alternative way of getting there that doesn’t require as much space.

We open our orthographic with Open existing Document as Untitled Document so that we don’t save over it.

Our game-safe isometric has its angle at two pixels horizontal is one pixel vertical. So, we shear the ortho graphics with transform masks to -.5/+.5 pixels (this is proportional)

Use the grid to setup two parallel rulers that represent both diagonals (you can snap them with the Shift + S):

Add the top view as well:

if you do this for all slices, you get something like this:

Using the parallel rulers, you can then figure out the position of a point in 3d-ish space:

As you can see, this version both looks more 3d as well as more creepy.

That’s because there are less steps involved as the previous version – We’re deriving our image directly from the orthographic view – so there are less errors involved.

The creepiness is because we’ve had the tiniest bit of stylisation in our side view, so the eyes come out HUGE. This is because when we stylize the side view of an eye, we tend to draw it not perfectly from the side, but rather slightly at an angle. If you look carefully at the turntable, the same problem crops up there as well.

Generally, stylized stuff tends to fall apart in 3d view, and you might need to make some choices on how to make it work.

For example, we can just easily fix the side view (because we used transform masks, this is easy.)

And then generate a new drawing from that…

Compare to the old one and you should be able to see that the new result’s eyes are much less creepy:

It still feels very squashed compared to the regular parallel projection above, and it might be an idea to not just skew but also stretch the orthos a bit.

Let’s continue with perspective projection in the next one!

This is a continuation of the axonometric tutorial, be sure to check it out if you get confused!

透视投影

So, up till now we’ve done only parallel projection. This is called like that because all the projection lines we drew were parallel ones.

However, in real life we don’t have parallel projection. This is due to the lens in our eyes.

Convex lenses, as this lovely image from wikipedia [https://en.wikipedia.org/wiki/Lens_%28optics%29] shows us, have the ability to turn parallel lightrays into converging ones.

The point where all the rays come together is called the focal point, and the vanishing point in a 2d drawing is related to it as it’s the expression of the maximum distortion that can be given to two parallel lines as they’re skewed toward the focal point.

As you can see from the image, the focal point is not an end-point of the rays. Rather, it is where the rays cross before diverging again… The only difference is that the resulting image will be inverted. Even in our eyes this inversion happens, but our brains are used to this awkwardness since childhood and turn it around automatically.

Let’s see if we can perspectively project our box now.

That went pretty well. As you can see we sorta ‘merged’ the two sides into one (resulting into the purple side square) so we had an easier time projecting. The projection is limited to one or two vanishing point type projection, so only the horizontal lines get distorted. We can also distort the vertical lines

… to get three-point projection, but this is a bit much. (And I totally made a mistake in there…)

Let’s setup our perspective projection again…

We’ll be using a single vanishing point for our focal point. A guide line will be there for the projection plane, and we’re setting up horizontal and vertical parallel rules to easily draw the straight lines from the view plane to where they intersect.

And now the workflow in gif-format… (don’t forget you can rotate the canvas with 4 and 6)

结果:

Looks pretty haughty, doesn’t he?

And again, there’s technically a simpler setup here…

Did you know you can use Krita to rotate in 3d? No?

Well, now you do.

The ortho graphics are being set to 45 and 135 degrees respectively.

We draw horizontal lines on the originals, so that we can align vanishing point rulers to them.

And from this, like with the shearing method, we start drawing. (Don’t forget the top-views!)

Which should get you something like this:

But again, the regular method is actually a bit easier…

But now you might be thinking: gee, this is a lot of work… Can’t we make it easier with the computer somehow?

Uhm, yes, that’s more or less why people spent time on developing 3d graphics technology:

(The image above is sculpted in blender using our orthographic reference)

So let us look at what this technique can be practically used for in the next part…

This is a continuation of the perspective projection tutorial, be sure to check it out if you get confused!

实践运用

So, if computers can already automate a ton, and it is fairly complicated, is there still a use for a traditional 2d artist to learn this?

Yes, actually. The benefit that 2d art still has over 3d is that it’s plain faster for single images, especially with complicated subjects like faces and bodies.

Perspective projection can help a lot getting down those annoying poses, like people lying down. It also helps when combining 2d and 3d, as when you know where the camera is in the 3d render, you can use that in a projection to get the character projected.

The side view of a person lying down is often easy to draw, but the top view or the view from the feet isn’t. Hence why we use the side view to do perspective projection on.

Another example with an equally epic task: sitting.

Now, with this one we have a second vanishing point above the front-view. It should be about the same distance above the front-view as it is above the head of the rotated side-view. The projection plane should also be the same distance from the vanishing point, but that doesn’t mean it has to be behind. This is something I avoided in the earlier examples, because it makes the working field really messy, but if you look up perspective projection you’ll see multiple examples of this method.

Also of note is that you actually should be having the view plane/projection plane perfectly perpendicular to the angle of the focal point, otherwise you get odd distortion, this doesn’t happen here, which means this sitting person is a bit more stretched vertically than necessary.

One more, for the road…

Here you can see that the misalignment of the vanishing point to the projection plane causes skewing which was then fixed by Krita’s transform tools, technically it’s of course correct, but what is correct doesn’t always look good. (I also mess up the position of the shoulder for a good while if you look closely.)

结语和后记

I probably didn’t make as nice result images as I could have, especially if you compare it to the 3d images. However, you can still see that the main landmarks are there. The real use of this technique lies in poses though, and it allows you to iterate on a pose quite quickly once you get the hang of it.

Generally, it’s worth exploring, if only because it improves your spatial sense.

参见

https://en.wikipedia.org/wiki/Axonometric_projection

http://blenderartists.org/forum/showthread.php?148878-Creating-an-Isometric-Camera

http://flarerpg.org/tutorials/isometric_tiles/

https://en.wikipedia.org/wiki/Isometric_graphics_in_video_games_and_pixel_art

https://en.wikipedia.org/wiki/Lens_%28optics%29

参考手册

对所有可用工具的原理和使用方式进行速查。

目录：

动画的音频功能

混色模式

笔刷

工具面板

Dr. Mingw 调试程序

滤镜

即时预览功能

Krita 随附笔刷预设介绍

图层和蒙版

Linux 命令行指令

数位板支持列表

主菜单

数学输入

首选项

渲染动画

资源管理

对选区描边

工具

动画的音频功能

警告

动画音频是一个尚未完成的功能。它仍有不少程序问题，可能无法在你的系统上正常工作。

你可以把音频文件添加到动画中，辅助进行对口型和音画同步等工作。此功能可以在时间线面板中进行控制。

导入音频文件

Krita 支持 MP3、OGM 和 WAV 音频文件。要使用它们，打开时间线面板，在左上角可以找到一个扬声器按钮。

按下该扬声器按钮，将弹出可供动画使用的音频选项。

打开

静音

移除音频

音量滑动条

Krita 会在文档中保存音频文件的所在位置。如果音频文件被移动或重命名，Krita 将无法找到它。在下次打开该 Krita 文件时，Krita 会提示音频文件已被移动或者删除。

使用音频

导入音频之后，你可以通过拖动时间轴来播放在对应时间点的音频。按下“播放”按钮时，整个音频文件将如同在动画的最终输出版本一样进行播放。音频信息不会在屏幕上显示，所以你只能一边拖动时间线一边监听来定位对应的动画帧。

导出带音频的动画

要在导出动画时包含音频文件，必须在导出前勾选相关选项。打开菜单栏的 文件-> 渲染动画 对话框，找到 包含音频 复选框，确保在导出之前勾选了此选项。

Linux 环境下音频功能所需软件包

在 Linux 环境下面，实现 Krita 的音频功能支持需要安装下列软件包：

用于编译 Krita：

libasound2-dev

libgstreamer1.0-dev gstreamer1.0-pulseaudio

libgstreamer-plugins-base1.0-dev

libgstreamer-plugins-good1.0-dev

libgstreamer-plugins-bad1.0-dev

用于运行 Krita：

libqt5multimedia5-plugins

libgstreamer-plugins-base1.0

libgstreamer-plugins-good1.0

libgstreamer-plugins-bad1.0

混色模式

混色模式有点不好解释。大体而言，当一个图层位于另一个图层之上时，计算机会通过混色模式的程序来决定两个图层合成之后的效果。

混色模式不但可以应用到图层，也可以应用到笔画之间。

常用模式

在混色模式下拉菜单中被勾选的混色模式会被加入常用模式，默认的常用模式如下：

相加

加深

Color, HSV, HSI, HSL, HSY

颜色减淡

变暗

擦除

变亮

流明度

相乘

正常

叠加

Saturation HSI, HSV, HSL, HSY

混色模式的相关快捷键

Defaultly the following hotkeys are associated with blending modes used for painting. Note: these shortcuts do not change the blending mode of the current layer.

You first need to use modifiers Alt + Shift, then use the following hotkey to have the associated blending mode:

A 线性加深

B 加深

C Color, HSV, HSI, HSL, HSY

D 颜色减淡

E 差值

F 柔光 (Photoshop) 和 柔光 (SVG)

I 溶解

J 线性光

K 变暗

L 硬混合

M 相乘

O 叠加

Q 背后

R 正常

S 滤色

T Saturation HSI, HSV, HSL, HSY

U Hue HSV, HSI, HSL, HSY

V 亮光

W 排除

X 线性减淡

Y 流明度

Z 点光

下一个混色模式 +

上一个混色模式 -

可用的混色模式

数学运算

相加

相除

反减

相乘

相减

变暗

加深

变暗

颜色加深

伽玛变暗

线性加深

HSX

HSI

HSL

HSV

HSY

HSX Blending Modes

变亮

颜色减淡

Gamma 变亮

强光

变亮

较亮颜色

线性减淡

线性光

点光

滤色

柔光 (Photoshop) 和 柔光 (SVG)

亮光

其他

凹凸贴图

组合法线贴图

复制

复制红色、绿色、蓝色

溶解

混合

相加减半

透明度变暗

背后

擦除

几何平均

颗粒抽取

晶粒合并

更不透明

硬混合

硬混合 (Photoshop)

硬叠加

正常

叠加

平行线

负片

累减

反正切值

差值

等价

排除

参见

基本混色模式

http://en.wikipedia.org/wiki/Blend_modes

颗粒抽取/颗粒合并：

http://docs.gimp.org/en/gimp-concepts-layer-modes.html

介绍 Krita 最神秘的几种混色模式：

http://illusions.hu/effectwiki/doku.php?id=list_of_blendings

数学运算

These blending modes are based on simple maths.

相加

Adds the numerical values of two colors together:

Yellow(1, 1, 0) + Blue(0, 0, 1) = White(1, 1, 1)

Darker Gray(0.4, 0.4, 0.4) + Lighter Gray(0.5, 0.5, 0.5) = Even Lighter Gray (0.9, 0.9, 0.9)

Left: Normal. Right: Addition.

Light Blue(0.1608, 0.6274, 0.8274) + Orange(1, 0.5961, 0.0706) = (1.1608, 1.2235, 0.8980) &rarr; Very Light Yellow(1, 1, 0.8980)

Left: Normal. Right: Addition.

Red(1, 0, 0) + Gray(0.5, 0.5, 0.5) = Pink(1, 0.5, 0.5)

Left: Normal. Right: Addition.

When the result of the addition is more than 1, white is the color displayed. Therefore, white plus any other color results in white. On the other hand, black plus any other color results in the added color.

Left: Normal. Right: Addition.

相除

Divides the numerical value from the lower color by the upper color.

Red(1, 0, 0) / Gray(0.5, 0.5, 0.5) = (2, 0, 0) &rarr; Red(1, 0, 0)

Darker Gray(0.4, 0.4, 0.4) / Lighter Gray(0.5, 0.5, 0.5) = Even Lighter Gray (0.8, 0.8, 0.8)

Left: Normal. Right: Divide.

Light Blue(0.1608, 0.6274, 0.8274) / Orange(1, 0.5961, 0.0706) = (0.1608, 1.0525, 11.7195) &rarr; Aqua(0.1608, 1, 1)

Left: Normal. Right: Divide.

Left: Normal. Right: Divide.

反减

This inverts the lower layer before subtracting it from the upper layer.

Lighter Gray(0.5, 0.5, 0.5)_(1_Darker Gray(0.4, 0.4, 0.4)) = (-0.1, -0.1, -0.1) &rarr; Black(0, 0, 0)

Left: Normal. Right: Inverse Subtract.

Orange(1, 0.5961, 0.0706)_(1_Light Blue(0.1608, 0.6274, 0.8274)) = (0.1608, 0.2235, -0.102) &rarr; Dark Green(0.1608, 0.2235, 0)

Left: Normal. Right: Inverse Subtract.

Left: Normal. Right: Inverse Subtract.

相乘

Multiplies the two colors with each other, but does not go beyond the upper limit.

This is often used to color in a black and white lineart. One puts the black and white lineart on top, and sets the layer to ‘Multiply’, and then draw in color on a layer beneath. Multiply will all the color to go through.

White(1,1,1) x White(1, 1, 1) = White(1, 1, 1)

White(1, 1, 1) x Gray(0.5, 0.5, 0.5) = Gray(0.5, 0.5, 0.5)

Darker Gray(0.4, 0.4, 0.4) x Lighter Gray(0.5, 0.5, 0.5) = Even Darker Gray (0.2, 0.2, 0.2)

Left: Normal. Right: Multiply.

Light Blue(0.1608, 0.6274, 0.8274) x Orange(1, 0.5961, 0.0706) = Green(0.1608, 0.3740, 0.0584)

Left: Normal. Right: Multiply.

Left: Normal. Right: Multiply.

相减

Subtracts the top layer from the bottom layer.

White(1, 1, 1)_White(1, 1, 1) = Black(0, 0, 0)

White(1, 1, 1)_Gray(0.5, 0.5, 0.5) = Gray(0.5, 0.5, 0.5)

Darker Gray(0.4, 0.4, 0.4)_Lighter Gray(0.5, 0.5, 0.5) = (-0.1, -0.1, -0.1) &rarr; Black(0, 0, 0)

Left: Normal. Right: Subtract.

Light Blue(0.1608, 0.6274, 0.8274) - Orange(1, 0.5961, 0.0706) = (-0.8392, 0.0313, 0.7568) &rarr; Blue(0, 0.0313, 0.7568)

Left: Normal. Right: Subtract.

Left: Normal. Right: Subtract.

变暗

加深

A variation on Divide, sometimes called ‘Color Burn’ in some programs.

This inverts the bottom layer, then divides it by the top layer, and inverts the result. This results in a darkened effect that takes the colors of the lower layer into account, similar to the burn technique used in traditional darkroom photography.

1_{[1_Darker Gray(0.4, 0.4, 0.4)] / Lighter Gray(0.5, 0.5, 0.5)} = (-0.2, -0.2, -0.2) &rarr; Black(0, 0, 0)

Left: Normal. Right: Burn.

1_{[1_Light Blue(0.1608, 0.6274, 0.8274)] / Orange(1, 0.5961, 0.0706)} = (0.1608, 0.3749, -1.4448) &rarr; Green(0.1608, 0.3749, 0)

Left: Normal. Right: Burn.

Left: Normal. Right: Burn.

变暗

With the darken, the upper layer’s colors are checked for their lightness. Only if they are darker than the underlying color on the lower layer, will they be visible.

Is Lighter Gray(0.5, 0.5, 0.5) darker than Darker Gray(0.4, 0.4, 0.4)? = (no, no, no) &rarr; Darker Gray(0.4, 0.4, 0.4)

Left: Normal. Right: Darken.

Is Orange(1, 0.5961, 0.0706) darker than Light Blue(0.1608, 0.6274, 0.8274)? = (no, yes, yes) &rarr; Green(0.1608, 0.5961, 0.0706)

Left: Normal. Right: Darken.

Left: Normal. Right: Darken.

颜色加深

Left: Normal. Right: Darker Color.

伽玛变暗

Divides 1 by the upper layer, and calculates the end result using that as the power of the lower layer.

Darker Gray(0.4, 0.4, 0.4)^[1 / Lighter Gray(0.5, 0.5, 0.5)] = Even Darker Gray(0.1600, 0.1600, 0.1600)

Left: Normal. Right: Gamma Dark.

Light Blue(0.1608, 0.6274, 0.8274)^[1 / Orange(1, 0.5961, 0.0706)] = Green(0.1608, 0.4575, 0.0683)

Left: Normal. Right: Gamma Dark.

Left: Normal. Right: Gamma Dark.

线性加深

Adds the values of the two layers together and then subtracts 1. Seems to produce the same result as 反减.

[Darker Gray(0.4, 0.4, 0.4) + Lighter Gray(0.5, 0.5, 0.5)]_1 = (-0.1000, -0.1000, -0.1000) &rarr; Black(0, 0, 0)

Left: Normal. Right: Linear Burn.

[Light Blue(0.1608, 0.6274, 0.8274) + Orange(1, 0.5961, 0.0706)]_1 = (0.1608, 0.2235, -0.1020) &rarr; Dark Green(0.1608, 0.2235, 0)

Left: Normal. Right: Linear Burn.

Left: Normal. Right: Linear Burn.

HSX

Krita has four different HSX coordinate systems. The difference between them is how they handle tone.

HSI

HSI is a color coordinate system, using Hue, Saturation and Intensity to categorize a color. Hue is roughly the wavelength, whether the color is red, yellow, green, cyan, blue or purple. It is measure in 360°, with 0 being red. Saturation is the measurement of how close a color is to gray. Intensity, in this case is the tone of the color. What makes intensity special is that it recognizes yellow (rgb:1,1,0) having a higher combined rgb value than blue (rgb:0,0,1). This is a non-linear tone dimension, which means it’s gamma-corrected.

HSL

HSL is also a color coordinate system. It describes colors in Hue, Saturation and Lightness. Lightness specifically puts both yellow (rgb:1,1,0), blue (rgb:0,0,1) and middle gray (rgb:0.5,0.5,0.5) at the same lightness (0.5).

HSV

HSV, occasionally called HSB, is a color coordinate system. It measures colors in Hue, Saturation, and Value (also called Brightness). Value or Brightness specifically refers to strength at which the pixel-lights on your monitor have to shine. It sets Yellow (rgb:1,1,0), Blue (rgb:0,0,1) and White (rgb:1,1,0) at the same Value (100%)

HSY

HSY is a color coordinate system. It categorizes colors in Hue, Saturation and Luminosity. Well, not really, it uses Luma instead of true luminosity, the difference being that Luminosity is linear while Luma is gamma-corrected and just weights the rgb components. Luma is based on scientific studies of how much light a color reflects in real-life. While like intensity it acknowledges that yellow (rgb:1,1,0) is lighter than blue (rgb:0,0,1), it also acknowledges that yellow (rgb:1,1,0) is lighter than cyan (rgb:0,1,1), based on these studies.

HSX Blending Modes

Color, HSV, HSI, HSL, HSY

This takes the Luminosity/Value/Intensity/Lightness of the colors on the lower layer, and combines them with the Saturation and Hue of the upper pixels. We refer to Color HSY as ‘Color’ in line with other applications.

Left: Normal. Right: Color HSI.

Left: Normal. Right: Color HSI.

Left: Normal. Right: Color HSI.

Left: Normal. Right: Color HSL.

Left: Normal. Right: Color HSV.

Left: Normal. Right: Color.

Hue HSV, HSI, HSL, HSY

Takes the saturation and tone of the lower layer and combines them with the hue of the upper-layer. Tone in this case being either Value, Lightness, Intensity or Luminosity.

Left: Normal. Right: Hue HSI.

Left: Normal. Right: Hue HSL.

Left: Normal. Right: Hue HSV.

Left: Normal. Right: Hue.

Increase Value, Lightness, Intensity or Luminosity.

Similar to lighten, but specific to tone. Checks whether the upper layer’s pixel has a higher tone than the lower layer’s pixel. If so, the tone is increased, if not, the lower layer’s tone is maintained.

Left: Normal. Right: Increase Intensity.

Left: Normal. Right: Increase Lightness.

Left: Normal. Right: Increase Value.

Left: Normal. Right: Increase Luminosity.

Increase Saturation HSI, HSV, HSL, HSY

Similar to lighten, but specific to Saturation. Checks whether the upper layer’s pixel has a higher Saturation than the lower layer’s pixel. If so, the Saturation is increased, if not, the lower layer’s Saturation is maintained.

Left: Normal. Right: Increase Saturation HSI.

Left: Normal. Right: Increase Saturation HSL.

Left: Normal. Right: Increase Saturation HSV.

Left: Normal. Right: Increase Saturation.

密度

Takes the Hue and Saturation of the Lower layer and outputs them with the intensity of the upper layer.

Left: Normal. Right: Intensity.

价值

Takes the Hue and Saturation of the Lower layer and outputs them with the Value of the upper layer.

Left: Normal. Right: Value.

亮度

Takes the Hue and Saturation of the Lower layer and outputs them with the Lightness of the upper layer.

Left: Normal. Right: Lightness.

流明度

As explained above, actually Luma, but called this way as it’s in line with the terminology in other applications. Takes the Hue and Saturation of the Lower layer and outputs them with the Luminosity of the upper layer. The most preferred one of the four Tone blending modes, as this one gives fairly intuitive results for the Tone of a hue

Left: Normal. Right: Luminosity.

Saturation HSI, HSV, HSL, HSY

Takes the Intensity and Hue of the lower layer, and outputs them with the HSI saturation of the upper layer.

Left: Normal. Right: Saturation HSI.

Left: Normal. Right: Saturation HSL.

Left: Normal. Right: Saturation HSV.

Left: Normal. Right: Saturation.

Decrease Value, Lightness, Intensity or Luminosity

Similar to darken, but specific to tone. Checks whether the upper layer’s pixel has a lower tone than the lower layer’s pixel. If so, the tone is decreased, if not, the lower layer’s tone is maintained.

Left: Normal. Right: Decrease Intensity.

Left: Normal. Right: Decrease Intensity.

Left: Normal. Right: Decrease Intensity.

Left: Normal. Right: Decrease Lightness.

Left: Normal. Right: Decrease Value.

Left: Normal. Right: Decrease Luminosity.

Decrease Saturation HSI, HSV, HSL, HSY

Similar to darken, but specific to Saturation. Checks whether the upper layer’s pixel has a lower Saturation than the lower layer’s pixel. If so, the Saturation is decreased, if not, the lower layer’s Saturation is maintained.

Left: Normal. Right: Decrease Saturation HSI.

Left: Normal. Right: Decrease Saturation HSI.

Left: Normal. Right: Decrease Saturation HSI.

Left: Normal. Right: Decrease Saturation HSL.

Left: Normal. Right: Decrease Saturation HSV.

Left: Normal. Right: Decrease Saturation.

变亮

Blending modes that lighten the image.

颜色减淡

Similar to Divide. Inverts the top layer, and divides the lower layer by the inverted top layer. This results in a image with emphasized highlights, like Dodging would do in traditional darkroom photography.

Left: Normal. Right: Color Dodge.

Gamma 变亮

Outputs the upper layer as power of the lower layer.

Left: Normal. Right: Gamma Light.

强光

Similar to Overlay. A combination of the Multiply and Screen blending modes, switching between both at a middle-lightness.

Hard light checks if the color on the upperlayer has a lightness above 0.5. Unlike overlay, if the pixel is lighter than 0.5, it is blended like in Multiply mode, if not the pixel is blended like in Screen mode.

Effectively, this decreases contrast.

Left: Normal. Right: Hard Light.

变亮

With the darken, the upper layer’s colors are checked for their lightness. Only if they are Lighter than the underlying color on the lower layer, will they be visible.

Left: Normal. Right: Lighten.

较亮颜色

Left: Normal. Right: Lighter Color.

线性减淡

Exactly the same as 相加.

Put in for compatibility purposes.

Left: Normal. Right: Linear Dodge (exactly the same as Addition).

线性光

Similar to 叠加.

Combines 线性减淡 and 线性加深. When the lightness of the upper-pixel is higher than 0.5, it uses Linear dodge, if not, Linear burn to blend the pixels.

Left: Normal. Right: Linear Light.

Left: Normal. Right: Linear Light.

Left: Normal. Right: Linear Light.

点光

Checks which is darker the lower layer’s pixel or the upper layer’s double so bright. Then checks which is brighter of that result or the inversion of the doubled lower layer.

Left: Normal. Right: Pin Light.

Left: Normal. Right: Pin Light.

Left: Normal. Right: Pin Light.

滤色

Perceptually the opposite of 相乘.

Mathematically, Screen takes both layers, inverts them, then multiplies them, and finally inverts them again.

This results in light tones being more opaque and dark tones transparent.

Left: Normal. Right: Screen.

Left: Normal. Right: Screen.

Left: Normal. Right: Screen.

柔光 (Photoshop) 和 柔光 (SVG)

These are less harsh versions of Hard Light, not resulting in full black or full white.

The SVG version is slightly different to the Photoshop version in that it uses a slightly different bit of formula when the lightness of the lower pixel is lower than 25%, this prevents the strength of the brightness increase.

Left: Normal. Right: Soft Light (Photoshop).

Left: Normal. Right: Soft Light (SVG).

亮光

Similar to Overlay.

Mixes both Color Dodge and Burn blending modes. If the color of the upper layer is darker than 50%, the blending mode will be Burn, if not the blending mode will be Color Dodge.

警告

This algorithm doesn’t use color dodge and burn, we don’t know WHAT it does do but for Color Dodge and Burn you need to use 硬混合

Left: Normal. Right: Vivid Light.

其他

凹凸贴图

This filter seems to both multiply and respect the alpha of the input.

组合法线贴图

Mathematically robust blending mode for normal maps, using Reoriented Normal Map Blending [http://blog.selfshadow.com/publications/blending-in-detail/].

复制

Copies the previous layer exactly. Useful for when using filters and filter-masks.

Left: Normal. Right: Copy.

复制红色、绿色、蓝色

This is a blending mode that will just copy/blend a source channel to a destination channel. Specifically, it will take the specific channel from the upper layer and copy that over to the lower layers.

So, if you want the brush to only affect the red channel, set the blending mode to ‘copy red’.

The copy red, green and blue blending modes also work on filter-layers.

This can also be done with filter layers. So if you quickly want to flip a layer’s green channel, make an invert filter layer with ‘copy green’ above it.

Left: Normal. Right: Copy Red.

Left: Normal. Right: Copy Green.

Left: Normal. Right: Copy Blue.

溶解

Instead of using transparency, this blending mode will use a random dithering pattern to make the transparent areas look sort of transparent.

Left: Normal. Right: Dissolve.

混合

相加减半

Blends the upper layer as half-transparent with the lower. (It add the two layers together and then halves the value)

Left: Normal. Right: Allanon.

透明度变暗

As far as I can tell this seems to premultiply the alpha, as is common in some file-formats.

Left: Normal. Right: Alpha Darken.

背后

Does the opposite of normal, and tries to have the upper layer rendered below the lower layer.

Left: Normal. Right: Behind.

擦除

This subtracts the opaque pixels of the upper layer from the lower layer, effectively erasing.

Left: Normal. Right: Erase.

几何平均

This blending mode multiplies the top layer with the bottom, and then outputs the square root of that.

Left: Normal. Right: Geometric Mean.

颗粒抽取

Similar to subtract, the colors of the upper layer are subtracted from the colors of the lower layer, and then 50% gray is added.

Left: Normal. Right: Grain Extract.

晶粒合并

Similar to addition, the colors of the upper layer are added to the colors, and then 50% gray is subtracted.

Left: Normal. Right: Grain Merge.

更不透明

A blending mode which checks whether the painted color is painted with a higher opacity than the existing colors. If so, it paints over them, if not, it doesn’t paint at all.

硬混合

Similar to Overlay.

Mixes both Color Dodge and Burn blending modes. If the color of the upper layer is darker than 50%, the blending mode will be Burn, if not the blending mode will be Color Dodge.

Left: Normal. Right: Hard Mix.

硬混合 (Photoshop)

This is the hard mix blending mode as it is implemented in photoshop.

Left: Dots are mixed in with the normal blending mode, on the Right: Dots are mixed in with hardmix.

This add the two values, and then checks if the value is above the maximum. If so it will output the maximum, otherwise the minimum.

硬叠加

4.0 新版功能.

Similar to Hard light but hard light use Screen when the value is above 50%. Divide gives better results than Screen, especially on floating point images.

Left: Normal. Right: Hard Overlay.

正常

As you may have guessed this is the default Blending mode for all layers.

In this mode, the computer checks on the upper layer how transparent a pixel is, which color it is, and then mixes the color of the upper layer with the lower layer proportional to the transparency.

Left: Normal 100% Opacity. Right: Normal 50% Opacity.

叠加

A combination of the Multiply and Screen blending modes, switching between both at a middle-lightness.

Overlay checks if the color on the upperlayer has a lightness above 0.5. If so, the pixel is blended like in Screen mode, if not the pixel is blended like in Multiply mode.

This is useful for deepening shadows and highlights.

Left: Normal. Right: Overlay.

平行线

This one first takes the percentage in two decimal behind the comma for both layers. It then adds the two values. Divides 2 by the sum.

Left: Normal. Right: Parallel.

负片

These are all blending modes which seem to make the image go negative.

累减

Subtract the square root of the lower layer from the upper layer.

Left: Normal. Right: Additive Subtractive.

反正切值

Divides the lower layer by the top. Then divides this by Pi. Then uses that in an Arc tangent function, and multiplies it by two.

Left: Normal. Right: Arcus Tangent.

差值

Checks per pixel of which layer the pixel-value is highest/lowest, and then subtracts the lower value from the higher-value.

Left: Normal. Right: Difference.

等价

Subtracts the underlying layer from the upper-layer. Then inverts that. Seems to produce the same result as 差值.

Left: Normal. Right: Equivalence.

排除

This multiplies the two layers, adds the source, and then subtracts the multiple of two layers twice.

Left: Normal. Right: Exclusion.

笔刷

One of the most important parts of a painting program, Krita has a very extensive brush system.

笔刷引擎

鬃毛笔刷引擎

粉笔笔刷引擎

克隆笔刷引擎

颜色涂抹笔刷引擎

曲线笔刷引擎

扭曲笔刷引擎

力学笔刷引擎

滤镜笔刷引擎

网格笔刷引擎

排线笔刷引擎

粒子笔刷引擎

像素笔刷引擎

快速笔刷引擎

轮廓笔刷引擎

草图笔刷引擎

喷雾笔刷引擎

切线法线笔刷引擎

笔刷选项

笔尖

锁定笔刷选项

蒙版笔刷

不透明度和流量

选项

传感器

纹理

笔刷引擎

Information on the brush engines that can be accessed in the brush editor.

Available Engines:

鬃毛笔刷引擎

粉笔笔刷引擎

克隆笔刷引擎

颜色涂抹笔刷引擎

曲线笔刷引擎

扭曲笔刷引擎

力学笔刷引擎

滤镜笔刷引擎

网格笔刷引擎

排线笔刷引擎

粒子笔刷引擎

像素笔刷引擎

快速笔刷引擎

轮廓笔刷引擎

草图笔刷引擎

喷雾笔刷引擎

切线法线笔刷引擎

鬃毛笔刷引擎

A brush intended to mimic real-life brushes by drawing the trails of their lines or bristles.

笔尖

Simply put:

The brush tip defines the areas with bristles in them.

Lower opacity areas have lower-opacity bristles. With this brush, this may give the illusion that lower-opacity areas have fewer bristles.

The 大小 and 旋转 dynamics affect the brush tip, not the bristles.

You can:

Use different shapes for different effects. Be aware that complex brush shapes will draw more slowly though, while the effects aren’t always visible (since in the end, you’re passing over an area with a certain number of bristles).

To decrease bristle density, you can also just use an autobrush and decrease the brush tip’s density, or increase its randomness.

Bristle Options

The core of this particular brush-engine.

比例

Think of it as pressing down on a brush to make the bristles further apart.

Larger values basically give you larger brushes and larger bristle spacing. For example, a value of 4 will multiply your base brush size by 4, but the bristles will be 4 times more spaced apart.

Use smaller values if you want a “dense” brush, i.e. you don’t want to see so many bristles within the center.

Negative values have the same effect as corresponding positive values: -1.00 will look like 1.00, etc.

随机偏移

Adds a jaggy look to the trailing lines.

At 0.00, all the bristles basically remain completely parallel.

At other values, the bristles are offset randomly. Large values will increase the brush size a bit because of the bristles spreading around, but not by much.

Negative values have the same effect as corresponding positive values.

裁剪

Shear introduces an angle to your brush, as though you’re drawing with an oval brush (or the side of a round brush).

密度

This controls the density of bristles. Scale takes a number of bristles and expands or compresses them into a denser area, whereas density takes a fixed area and determines the number of bristles in it. See the difference?

Mouse Pressure

This one maps “Scale” to mouse speed, thus simulating pressure with a graphics tablet!

Rather, it uses the “distance between two events” to determine scale. Faster drawing, larger distances.

This doesn’t influence the “pressure” input for anything else (size, opacity, rotation etc.) so you still have to map those independently to something else.

阀值

This is a tablet feature. When you turn this on, only bristles that are able to “touch the canvas” will be painted.

Connect Hairs

The bristles get connected. See for yourself.

抗锯齿

This will decrease the jaggy-ness of the lines.

Composite Bristles

This “composes the bristle colors within one dab,” but explains that the effect is “probably subtle.”

Ink Depletion

This simulated ink depletion over drawing time. The value dictates how long it will take. The curve dictates the speed.

不透明度

The brush will go transparent to simulate ink-depletion.

饱和度

The brush will be desaturated to simulate ink-depletion.

Soak Ink

The brush will pick up colors from other brushes. You don’t need to have Ink depletion checked to activate this option, you just have to check Soak ink. What this does is cause the bristles of the brush to take on the colors of the first area they touch. Since the Bristle brush is made up of independent bristles, you can basically take on several colors at the same time.

注解

It will only take colors in the unscaled area of the brush, so if you’re using a brush with 4.00 scale for example, it will only take the colors in the 1/4 area closest to the center.

When the source is transparent, the bristles take black color.

警告

Be aware that this feature is a bit buggy though. It’s supposed to take the color from the current layer, but some buggy behavior causes it to often use the last layer you’ve painted on (with a non-Bristle brush?) as source. To avoid these weird behaviors, stick to just one layer, or paint something on the current active layer first with another brush (such as a Pixel brush).

Weighted saturation

Works by modifying the saturation with the following:

Pressure weight

Bristle length weight

Bristle ink amount weight

Ink depletion curve weight

粉笔笔刷引擎

4.0 版后已移除: This brush engine has been removed in 4.0. There are other brush engines such as pixel that can do everything this can…plus more.

Apparently, the Bristle brush engine is derived from this brush engine. Now, all of Krita's brushes have a great variety of uses, so you must have tried out the Chalk brush and wondered what it is for. Is it nothing but a pixel brush with opacity and saturation fade options? As per the developers this brush uses a different algorithm than the Pixel Brush, and they left it in here as a simple demonstration of the capabilities of Krita's brush engines.

So there you go, this brush is here for algorithmic demonstration purposes. Don’t lose sleep because you can’t figure out what it’s for, it Really doesn’t do much. For the sake of description, here’s what it does:

Yeah, that’s it, a round brush with some chalky texture, and the option to fade in opacity and saturation. That’s it.

克隆笔刷引擎

The clone brush is a brush engine that allows you to paint with a duplication of a section of a paint-layer. This is useful in manipulation of photos and textures. You have to select a source and then you can paint to copy or clone the source to a different area. Other applications normally have a separate tool for this, Krita has a brush engine for this.

Usage and Hotkeys

To see the source, you need to set the brush-cursor settings to brush outline.

The clone tool can now clone from the projection and it’s possible to change the clone source layer. Press Ctrl + Alt + mouseleft to select a new clone source on the current layer. Ctrl + mouseleft to select a new clone source point on the layer that was active when you selected the clone op.

警告

Ctrl + Alt + mouseleft is temporarily disabled on 2.9.7

设置

大小

混色模式

不透明度和流量

绘画模式

合拢

This turns the clone brush into a healing brush: often used for removing blemishes in photo retouching, and maybe blemishes in painting.

Perspective correction

Only works when there’s a perspective grid visible.

警告

This feature is currently disabled

Source Point move.

This will determine whether you will replicate the source point per dab or per stroke. Can be useful when used with the healing brush.

Clone from all visible layers.

Tick this to force cloning of all layers instead of just the active one.

颜色涂抹笔刷引擎

The Color Smudge Brush is a brush engine that allows you to mix colors by smearing or dulling. A very powerful brush engine to the painter.

选项

笔尖

混色模式

不透明度和流量

大小

间距

镜像

柔度

旋转

分散

渐变色

喷枪

纹理

Options Unique to the Color Smudge Brush

颜色比率

How much of the foreground color is added to the smudging mix. Works together with 烟熏长度 and 烟熏半径

烟熏长度

Affects smudging and allows you to set it to Sensors.

There’s two major types:

涂抹

Great for making brushes that have a very impasto oil feel to them.

钝化

Named so because it dulls strong colors.

Using an arithmetic blending type, Dulling is great for more smooth type of painting.

强度

Affects how much the smudge length takes from the previous dab its sampling. This means that smudge-length at 1.0 will never decrease, but smudge-lengths under that will decrease based on spacing and opacity/flow.

烟熏半径

The Smudge Radius allows you to sample a larger radius when using smudge-length in Dulling mode.

The slider is percentage of the brush-size. You can have it modified with Sensors.

叠加

Overlay is a toggle that determine whether or not the smudge brush will sample all layers (overlay on), or only the current one.

Tutorial: Color Smudge Brushes

I recommend at least skimming over the first part to get an idea of what does what.

Overview and settings

Overview: Smearing and Dulling

The Color Smudge Brush offers 2 modes, accessible from the Smudge Rate section:

Smearing: This mode mixes colors by smudging (“smearing”) the area underneath.

Dulling: In his mode, the brush “picks up” the color underneath it, mixes it with its own color, then paints with it.

烟熏长度

To better demonstrate the smudge function, I turned the color rate function off.

Common behaviors:

Unchecking the smudge rate function sets smudge rate to 1.00 (not 0.00)

Opacity: Below 0.50, there is practically no smudging left: keep opacity over 0.50.

Differences:

Spacing with Smearing: the lower the spacing, the smoother the effect, so for smearing with a round brush you may prefer a value of 0.05 or less. Spacing affects the length of the smudge trail, but to a much lesser extent. The “strength” of the effect remains more or less the same however.

Spacing with Dulling: the lower the spacing, the stronger the effect: lowering the spacing too much can make the dulling effect too strong (it picks up a color and never lets go of it). The length of the effect is also affected.

Both Smearing and Dulling have a “smudge trail”, but in the case of Dulling, the brush shape is preserved. Instead the trail determines how fast the color it picked up is dropped off.

The other settings should be pretty obvious from the pictures, so I’ll spare you some walls of text.

Color Rate, Gradient and Blending modes

Again, most of the settings behaviors should be obvious from the pictures. Just remember to keep Opacity over 0.50.

Brush tips

The Color Smudge Brush has all the same brush tip options as the Pixel Brush!

Just remember that the smudge effects are weaker when a brush tip’s opacity is lower, so for low-opacity brush tips, increase the opacity and smudge/color rates.

Scatter and other shape dynamics

The Color Smudge Brush shares the following dynamics with the Pixel Brush: Opacity, Size, Spacing, Rotation, and Scatter.

However, because of the Smudge effects, the outcome will be different from the Pixel Brush. In particular, the Scatter option becomes much more significant.

A few things to note:

Scattering is proportional to the brush size. It’s fine to use a scattering of 5.00 for a tiny round brush, but for bigger brushes, you may want to get it down to 0.50 or less.

You may notice the lines with the Smearing option. Those are caused by the fact that it picked up the hard lines of the rectangle.

For scattering, the brush picks up colors within a certain distance, not the color directly under the paintbrush:

Other color behaviors: Gradient, Blending modes, Overlay mode

渐变色

Gradient is equivalent to the Source ‣ Gradient and Color ‣ Mix for the Pixel brush: the color will vary between the colors of the gradient.

You can either:

Leave the default Foreground ‣ Background gradient setting, and just change the foreground and background colors

Select a more specific gradient

Or make custom gradients.

混合模式

Blending Modes work just like with the Pixel Brush. The color used though is the color from Color rate.

Color Blending modes with the smudge brush are even harder to predict than with the pixel brush, so I’ll leave you to experiment on your own.

覆盖模式

By default, the Color Smudge Brush only takes information from the layer it is on. However, if you want it to take color information from all the layers, you can turn on the Overlay mode.

Be aware though, that it does so by “picking up” bits of the layer underneath, which may mess up your drawing if you later make changes to the layer underneath.

Use cases: Smudging and blending

This part describes use cases with color rate off.

I won’t explain the settings for dynamics in detail, as you can find the explanations in the Pixel Brush tutorial.

Smudging effects

For simple smudging:

Pick the Color Smudge Brush. You can use either Smearing or Dulling.

Turn off Color Rate

Smudge away

When using lower opacity brush tips, remember to “compensate” for the less visible effects by increasing both Smudge Rate and Opacity, if necessary to maximum.

Some settings for Smearing

For smoother smearing, decrease spacing. Remember that spacing is proportional to brush tip size. For a small round brush, 0.10 spacing is fine, but for mid-sized and large brushes, decrease spacing to 0.05 or less.

Some settings for Dulling

Lowering the spacing will also make the smudging effect stronger, so find a right balance. 0.10 for most mid-sized round brushes should be fine.

Unlike Smearing, Dulling preserves the brush shape and size, so it won’t “fade off” in size like Smearing brushes do. You can mimic that effect through the simple size fade dynamic.

Textured blending

In this case, what I refer to as “Blending” here is simply using one of the following two dynamics:

Rotation set to Distance or Fuzzy

And/or Scatter:

For most mid-sized brushes you will probably want to lower the scatter rate to 0.50 or lower. Higher settings are okay for tiny brushes.

Note that Scatter picks colors within a certain distance, not the color directly under the brush (see 笔尖)

Optional: Pile on size and other dynamics and vary brush tips. In fact, the Color Smudge brush is not a blur brush, so smudging is not a very good method of “smooth” blending. To blend smoothly, you’ll have better luck with:

Building up the transition by painting with intermediate values, described later

Or using the “blur with feathered selection” method that I’ll briefly mention at the end of this tutorial.

I’ve tried to achieve smooth blending with Color Smudge brush by adding rotation and scatter dynamics, but honestly they looked like crap.

However, the Color Smudge brush is very good at “textured blending”:

Basically you can paint first and add textured transitions after.

Use cases: Coloring

For this last section, Color Rate is on.

Layer options

Before we get started, notice that you have several possibilities for your set up:

Shading on the same layer

Shading on a separate layer, possibly making use of alpha-inheritance. The brush blends with the transparency of the layer it’s on. This means:

If the area underneath is more of less uniform, the output is actually similar as if shading on the same layer

But if the area underneath is not uniform, then you’ll get fewer color variations.

Shading on a separate layer, using Overlay mode. Use this only if you’re fairly sure you don’t need to adjust the layer below, or the colors may become a mess.

Issue with transparency

The Color Smudge Brush blends with transparency. What this means is that when you start a new, transparent layer and “paint” on this layer, you will nearly always get less than full opacity.

Basically:

It may look great when you’re coloring on a blank canvas

But it won’t look so great when you add something underneath

The solution is pretty simple though:

Make sure you have the area underneath colored in first:

With tinting, you already have the color underneath colored, so that’s done

For painting, roughly color in the background layer first

Or color in the shape on a new layer and make use of alpha-inheritance

For the last solution, use colors that contrast highly with what you’re using for best effect. For example, shade in the darkest shadow area first, or the lightest highlights, and use the color smudge brush for the contrasting color.

Soft-shading

Suppose you want more or less smooth color transitions. You can either:

Color Rate as low as 0.10 for round brushes, higher with non fully opaque brush tips.

Or set the Smudge Rate as low as 0.10 instead.

Or a combination of the two. Please try yourself for the output you like best.

Optional: turn on Rotation for smoother blending

Optional: turn on Scatter for certain effects

Optional: fiddle with Size and Opacity dynamics as necessary.

This remains, in fact, a so-so way of making smooth transitions. It’s best to build up intermediate values instead. Here:

I first passed over the blue area three times with a red color. I select 3 shades.

I color picked each of these values with Ctrl + mouseleft, then used them in succession

Painting: thick oil style

Many of the included color smudge brush presets produce a thick oil paint-like effect. This is mainly achieved with the Smearing mode on. Basically:

Smearing mode with high smudge and color rates

Both at 0.50 are fine for normal round brushes or fully opaque predefined brushes

Up to 1.00 each for brushes with less density or non fully-opaque predefined brushes

Add Size/Rotation/Scatter dynamics as needed. When you do this, increase smudge and color rates to compensate for increased color mixing.

One thing I really like to do is to set different foreground and background colors, then turn on Gradient ‣ Fuzzy. Alternatively, just paint with different colors in succession (bottom-right example).

Here’s some final random stuff. With pixel brushes, you can get all sorts of frill designs by using elongated brushes and setting the dynamics to rotation. You won’t get that with Color Smudge Brushes. Instead you’ll get something that looks more like… yarn. Which is cool too. Here, I just used oval brushes and Rotation ‣ Distance.

Painting: Digital watercolor style

When I say “digital watercolor”, it refers to a style often seen online, i.e. a soft, smooth shading style rather than realistic watercolor. For this you mostly need the Dulling mode. A few things:

Contrary to the Smearing mode, you may want to lower opacity for normal round brushes to get a smoother effect, to 0.70 for example.

Vary the brush tip fade value as well.

When using Scatter or other dynamics, you can choose to set smudge and color values to high or low values, for different outcomes.

Blurring

You can:

Paint then smudge, for mostly texture transitions

Or build up transitions by using intermediate color values

If you want even smoother effects, well, just use blur. Gaussian blur to be exact.

And there you go. That last little trick concludes this tutorial.

曲线笔刷引擎

The curve brush is a brush engine which creates strokes made of evenly spaced lines. It has, among other things been used as a replacement for pressure sensitive strokes in lieu of a tablet.

设置

First off, the line produced by the Curve brush is made up of 2 sections:

The connection line, which is the main line drawn by your mouse

The curve lines I think, which are the extra fancy lines that form at curves. The curve lines are formed by connecting one point of the curve to a point earlier on the curve. This also means that if you are drawing a straight line, these lines won’t be visible, since they’ll overlap with the connection line. Drawing faster gives you wider curves areas.

You have access to 3 settings from the Lines tab, as well as 2 corresponding dynamics:

Line width: this applies to both the connection line and the curve lines.

Line width dynamics: use this to vary line width dynamically.

History size: this determines the distance for the formation of curve lines.

If you set this at low values, then the curve lines can only form over a small distances, so they won’t be too visible.

On the other hand, if you set this value too high, the curve lines will only start forming relatively “late”.

So in fact, you’ll get maximum curve lines area with a mid-value of say… 40~60, which is about the default value. Unless you’re drawing at really high resolutions.

Curves opacity: you can’t set different line widths for the connection line and the curve lines, but you can set a different opacity for the curve lines. With low opacity, this will produce the illusion of thinner curve lines.

Curves opacity dynamics: use this to vary Curves opacity dynamically.

In addition, you have access to two checkboxes:

Paint connection line, which toggles the visibility of the connection line

Smoothing, which… I have no idea actually. I don’t see any differences with or without it. Maybe it’s for tablets?

Drawing variable-width lines

And here’s the only section of this tutorial that anyone cares about: pretty lineart lines! For this:

Use the Draw Dynamically mode: I tend to increase drag to at least 50. Vary Mass and Drag until you get the feel that’s most comfortable for you.

Set line width to a higher value (ex.: 5), then turn line width dynamics on:

If you’re a tablet user, just set this to Pressure (this should be selected by default so just turn on the Line Width dynamics). I can’t check myself, but a tablet user confirmed to me that it works well enough with Draw Dynamically.

If you’re a mouse user hoping to get variable line width, set the Line Width dynamics to Speed.

Set Curves opacity to 0: This is the simplest way to turn off the Curve lines. That said, leaving them on will get you more “expressive” lines.

Additional tips:

Zig-zag a lot if you want a lot of extra curves lines.

Use smooth, sweeping motions when you’re using Draw Dynamically with Line Width set to Speed: abrupt speed transitions will cause abrupt size transitions. It takes a bit of practice, and the thicker the line, the more visible the deformities will be. Also, zoom in to increase control.

If you need to vary between thin and thick lines, I suggest creating presets of different widths, since you can’t vary the base line width from the canvas.

另类:

Use the Draw Dynamically mode

Set Curves opacity to 100

Optionally decrease History size to about 30

The curve lines will fill out the area they cover completely, resulting in a line with variable widths. Anyway, here are some comparisons:

And here are examples of what you can do with this brush:

扭曲笔刷引擎

The Deform Brush is a brush that allows you to pull and push pixels around. It’s quite similar to the 液化变形, but where liquify has higher quality, the deform brush has the speed.

选项

笔尖

变形选项

混色模式

不透明度和流量

大小

旋转

喷枪

变形选项

1: undeformed, 2: Move, 3: Grow, 4: Shrink, 5: Swirl Counter Clock Wise, 6: Swirl Clockwise, 7: Lens Zoom In, 8: Lens Zoom Out

These decide what strangeness may happen underneath your brush cursor.

增大

This bubbles up the area underneath the brush-cursor.

缩小

This pinches the Area underneath the brush-cursor.

Swirl Counter Clock Wise

Swirls the area counter clock wise.

Swirl Clock Wise

Swirls the area clockwise.

步

Nudges the area to the painting direction.

颜色变形

This seems to randomly rearrange the pixels underneath the brush.

镜头放大

Literally paints a enlarged version of the area.

镜头缩小

Paints a minimized version of the area.

Showing color deform.

Deform Amount

Defines the strength of the deformation.

Bilinear Interpolation

Bilinear Interpolation

Smoothens the result. This causes calculation errors in 16bit.

Use Counter

Slows down the deformation subtlety.

Without ‘use undeformed’ to the left and with to the right

Use Undeformed Image

Samples from the previous version of the image instead of the current. This works better with some deform options than others. Move for example seems to almost stop working, but it works really well with Grow.

力学笔刷引擎

Dyna brush uses dynamic setting like mass and drag to draw strokes. The results are fun and random spinning strokes. To experiment more with this brush you can play with values in ‘dynamic settings’ section of the brush editor under Dyna Brush.

4.0 版后已移除: This brush engine has been removed in 4.0. This engine mostly had smoothing results that the dyna brush tool has in the toolbox. The stabilizer settings can also give you further smoothing options from the tool options.

选项

Brush Size (Dyna)

混色模式

不透明度和流量

喷枪

Brush Size (Dyna)

Dynamics Settings

Initial Width

Initial size of the dab.

质量

How much energy there is in the satellite like movement.

拖曳

How close the dabs follow the position of the brush-cursor.

Width Range

How much the dab expands with speed.

形状

直径

Size of the shape.

角

Angle of the shape. Requires Fixed Angle active to work.

圆圈

Make a circular dab appear.

双

Draws an extra circle between other circles.

直线

Connecting lines are drawn next to each other. The number boxes on the right allows you to set the spacing between the lines and how many are drawn.

多边形

Draws a black polygon as dab.

线

Draws the wireframe of the polygon.

Paint Connection

Draws the connection line.

滤镜笔刷引擎

Where in other programs you have a ‘dodge tool’, ‘blur tool’ and ‘sharpen tool’, Krita has a special brush engine for this: The Filter Brush engine. On top of that, due to Krita’s great integration of the filters, a huge amount of filters you’d never thought you wanted to use for a drawing are possible in brush form too!

选项

The filter brush has of course some basic brush-system parameters:

笔尖

混色模式

不透明度和流量

大小

镜像

旋转

网格笔刷引擎

The grid brush engine draws shapes on a grid. It helps you produce retro and halftone effects.

If you’re looking to setup a grid for snapping, head to 网格与参考线.

选项

Brush Size

Particle Type

混色模式

不透明度和流量

颜色选项

Brush Size

Grid Width

Width of the cursor area

Grid Height

Height of the cursor area

除法

Subdivides the cursor area and uses the resulting area to draw the particles.

按笔压细分

The more you press, the more subdivisions. Uses Division as the finest subdivision possible.

比例

Scales up the area.

Vertical Border

Forces vertical borders in the particle space, between which the particle needs to squeeze itself.

Horizontal Border

Forces a horizontal borders in the particle space, between which the particle needs to squeeze itself.

Jitter Borders

Randomizes the border values with the Border values given as maximums.

Particle Type

Decides the shape of the particle.

椭圆形

Fills the area with an ellipse.

矩形

Fills the area.

直线

Draws lines from the lower left to the upper right corner of the particle

像素

Looks like an aliased line on high resolutions.

Anti-aliased Pixel

Fills the area with little polygons.

颜色选项

随机 HSV

Randomize the HSV with the strength of the sliders. The higher, the more the color will deviate from the foreground color, with the direction indicating clock or counter clockwise.

Random Opacity

Randomizes the opacity.

Color Per Particle

Has the color options be per particle instead of area.

Sample Input Layer

Will use the underlying layer as reference for the colors instead of the foreground color.

填充背景

Fills the area before drawing the particles with the background color.

Mix with background color

Gives the particle a random color between foreground/input/random HSV and the background color.

排线笔刷引擎

When I first tried this brush, my impression of it was “plain parallel lines” (and the award for most boring brush goes to…). Fortunately, existing presets gave me an idea of the possibilities of this brush.

设置

Brush tip

The brush tip simply defines the area where the hatching will be rendered.

Transparent brush tip areas give more transparent hatching, but as with a normal brush, passing over the area again will increase opacity.

The hatching itself is mostly fixed in location, so drawing with a hatching brush usually acts more like “revealing” the hatching underneath than drawing with brushes of parallel lines. The exception is for Moiré pattern with Crosshatching dynamics on.

Vary the brush shape or texture for a variety of effects. Decreasing the density of the autobrush will give a grainy texture to your hatching, for example.

The Size dynamic affects the brush tip, not the hatching thickness.

影线首选项

Before going on: at the time of this writing, there is a bug that causes line thickness to not vary on default settings. To get around this, go to Hatching preferences and check Antialiased Lines. Pentalis is aware of this issue so the bug may get fixed soon.

The three options are:

Antialiased lines: This controls aliasing. If changing line thickness isn’t working, check this option and it should work, because it switches to a different algorithm.

Subpixel precision: I’m guessing this affects the rendering quality, but you won’t see much of a difference. Check this if you want to.

Color background: Checking this will color in the background at the back of the hatching.

The output is slightly different depending on whether the first two options are checked, but the difference isn’t enough for you to worry about. I recommend just keeping the first two options checked.

影线选项

This is where the main hatching options go. They’re intuitive enough:

Angle: The angle of the hatching.

Separation: This is the distance between the centers of the lines.

Use a value of 2 pixels or higher, or the lines won’t be distinct anymore.

The Separations dynamic doesn’t actually assign random values to Separation, instead it will take the value in “Input-based intervals” to divide the grid further. “Input-based intervals” can take values between 2 and 7.

Thickness: The line thickness.

Actually, this is the thickness of the line + blank area, so the line itself has a thickness of half this value.

If you use the same separation value and the same line thickness value, then the lines and the area between them will be of the same thickness.

You can vary this value dynamically with the Thickness dynamics.

If the line thickness isn’t changing for you, go to Hatching Preferences and check “Antialiased Lines.”

Origin X and Origin Y: The hatching has a fixed location, painting acts as though you’re revealing the existing hatching underneath. To nudge the hatching, you can tweak these two values. You can get various grid effects this way.

Finally, we have the hatching styles:

No crosshatching: basic parallel lines

Perpendicular plane only: grid lines

-45 degrees plane then +45 degrees plane: see example.

+45 degrees plane then -45 degrees plane: see example, actually not much different from the above, it’s mostly the order that changes when using dynamics.

Moiré pattern: See example.

The Crosshatching dynamic only works if you have already chosen a crosshatching style. When that happens, the crosshatching only gets drawn according to the conditions of the dynamics (pressure, speed, angle…).

With most hatching styles, using crosshatching dynamics basically gets you the same hatching style, minus the occasional line.

The exception is with Moire, which will produce a different pattern.

Use cases

If you don’t want the edges to be fuzzy, go to Brush Tip and set the Fade values to 1.00. I recommended doing the hatching on a separate layer, then erasing the extra areas.

Now for the uses:

You can, of course, just use this for completely normal hatching. In versions I’m using, the default Separation is 1, which is too low, so increase Separation to a value between 2 to 10.

If you find normal hatching too boring, increase the Thickness and set the Thickness dynamic to either Pressure (if you have a tablet) or Speed (if you’re using a mouse). Doesn’t that look more natural? (When using a mouse, pass over the areas where you want thicker lines again while drawing faster)

Grittier texture: add some density and/or randomness to your autobrush for a grittier texture.

You can also set Painting Mode to Build up, and Mode to Multiply, to make some colors have more depth. (see my grid example)

Vary Origin X and Origin Y while using the same patterns.

Use the Separations dynamic for more complex patterns. Add in Line Thickness and other dynamics for more effect.

Now, the Moiré pattern is quite boring on its own, but it is much more interesting with Crosshatching dynamics set on Fuzzy.

For more texture, set Line Thickness to Fuzzy, decrease Density a bit and increase Randomness and you get a nice gritty texture.

粒子笔刷引擎

A brush that draws wires using parameters. These wires always get more random and crazy over drawing distance. Gives very intricate lines best used for special effects.

选项

Brush Size

混色模式

不透明度和流量

喷枪

Brush Size

颗粒数

How many particles there’s drawn.

不透明度权重

The Opacity of all particles. Is influenced by the painting mode.

Dx Scale (Distance X Scale)

How much the horizontal cursor distance affects the placing of the pixel. Is unstable on negative values. 1.0 is equal.

Dy Scale (Distance Y Scale)

How much the vertical cursor distance affects the placing of the pixel. Is unstable on negative values. 1.0 is equal.

重力

Multiplies with the previous particle’s position, to find the new particle’s position.

迭代

The higher, the higher the internal acceleration is, with the furthest away particle from the brush having the highest acceleration. This means that the higher iteration is, the faster and more randomly a particle moves over time, giving a messier result.

像素笔刷引擎

Brushes are ordered alphabetically. The brush that is selected by default when you start with Krita is the Pixel Brush. The pixel brush is the traditional mainstay of digital art. This brush paints impressions of the brush tip along your stroke with a greater or smaller density.

Let’s first review these mechanics:

select a brush tip. This can be a generated brush tip (round, square, star-shaped), a predefined bitmap brush tip, a custom brush tip or a text.

select the spacing: this determines how many impressions of the tip will be made along your stroke

select the effects: the pressure of your stylus, your speed of painting or other inputs can change the size, the color, the opacity or other aspects of the currently painted brush tip instance – some applications call that a “dab”.

depending on the brush mode, the previously painted brush tip instance is mixed with the current one, causing a darker, more painterly stroke, or the complete stroke is computed and put on your layer. You will see the stroke grow while painting in both cases, of course!

Since 4.0, the Pixel Brush Engine has Multithreaded brush-tips, with the default brush being the fastest mask.

Available Options:

笔尖

混色模式

不透明度和流量

大小

宽高比

间距

镜像

柔度

锐度

旋转

分散

来源

混合

喷枪

纹理

蒙版笔刷

Specific Parameters to the Pixel Brush Engine

模糊

Allows you to Darken the source color with Sensors.

The color will always become black in the end, and will work with Plain Color, Gradient and Uniform random as source.

色调、饱和度、亮度

These parameters allow you to do an HSV adjustment filter on the 来源 and control it with Sensors.

Works with Plain Color, Gradient and Uniform random as source.

使用

Having all three parameters on Fuzzy will help with rich color texture. In combination with 混合, you can have even finer control.

快速笔刷引擎

A Brush Engine inspired by the common artist’s workflow where a simple big brush, like a marker, is used to fill large areas quickly, the Quick Brush engine is an extremely simple, but quick brush, which can give the best performance of all Brush Engines.

It can only change size, blending mode and spacing, and this allows for making big optimisations that aren’t possible with other brush engines.

混色模式

间距

大小

刷子

The only parameter specific to this brush.

直径

The size. This brush engine can only make round dabs, but it can make them really fast despite size.

间距

The spacing between the dabs. This brush engine is particular in that it’s faster with a lower spacing, unlike all other brush engines.

参见

Phabricator Task [https://phabricator.kde.org/T3492]

轮廓笔刷引擎

An Al.chemy inspired brush-engine. Good for making chaos with!

参数

Experiment Option

混色模式

Experiment Option

速率

This makes the outputted contour jaggy. The higher the speed, the jaggier.

平滑

Smoothens the output contour. This slows down the brush, but the higher the smooth, the smoother the contour.

顶替

This displaces the shape. The slow the movement, the higher the displacement and expansion. Fast movements shrink the shape.

卷绕填充

This gives you the option to use a ‘non-zero’ fill rules instead of the ‘even-odd’ fill rule, which means that where normally crossing into the shape created transparent areas, it now will not.

硬边缘

Removes the anti-aliasing, to get a pixelized line.

草图笔刷引擎

A line based brush engine, based on the Harmony brushes. Very messy and fun.

参数

Has the following parameters:

笔尖

混色模式

不透明度和流量

大小

宽高比

线条宽度

Offset Scale

密度

旋转

喷枪

线条宽度

The width of the rendered lines.

Offset Scale

When curve lines are formed, this value roughly determines the distance from the curve lines to the connection lines:

This is a bit misleading, because a value of 0% and a value of 100% give similar outputs, as do a value of say 30% and 70%. You could think that the actual value range is between 50% and 200%.

0% and 100% correspond to the curve lines touching the connection lines exactly.

Above 100%, the curve lines will go further than the connection lines, forming a fuzzy effect.

密度

The density of the lines. This one is highly affected by the Brush-tip, as determined by the Distance Density toggle.

Use Distance Density

The further the line covered is from the center of the area of effect, the less the density of the resulting curve lines.

磁化

Magnetify is on by default. It’s what causes curve lines to form between two close line sections, as though the curve lines are attracted to them like magnets. With Magnetify off, the curve line just forms on either side of the current active portion of your connection line. In other words, your line becomes fuzzier when another portion of the line is nearby, but the lines don’t connect to said previous portion.

随机 RGB

Causes some slight RGB variations.

Random Opacity

The curve lines get random opacity. This one is barely visible, so for the example I used line width 12 and 100% opacity.

Distance Opacity

The distance based opacity. When you move your pen fast when painting, the opacity will be calculated based on the distance from the center of the effect area.

简单模式

This mode exists for performance reasons, and doesn’t affect the output in a visible way. Check this for large brushes or thick lines for faster rendering.

Paint Connection Line

What appears to be the connection line is usually made up of an actual connection line and many smaller curve lines. The many small curve lines make up the majority of the line. For this reason, the only time this option will make a visible difference is if you’re drawing with 0% or near 0% density, and with a thick line width. The rest of the time, this option won’t make a visible difference.

喷雾笔刷引擎

A brush that can spray particles around in its brush area.

选项

喷雾面积

Spray Shape

笔尖 (Used as particle if spray shape is not active)

不透明度和流量

大小

混色模式

Shape Dynamics

颜色选项

旋转

喷枪

喷雾面积

The area in which the particles are sprayed.

直径

The size of the area.

纵横比

It’s aspect ratio: 1.0 is fully circular.

角

The angle of the spray size: works nice with aspect ratios other than 1.0.

比例

Scales the diameter up.

间距

Increases the spacing of the diameter’s spray.

颗粒数

数量

Use a specified amount of particles.

密度

Use a % amount of particles.

抖动效果

Jitters the spray area around for extra randomness.

Gaussian Distribution

Focuses the particles to paint in the center instead of evenly random over the spray area.

Spray Shape

If activated, this will generate a special particle. If not, the brush-tip will be the particle.

形状

Can be…

椭圆形

矩形

Anti-aliased Pixel

像素

图片

Width & Height

Decides the width and height of the particle.

按比例

Locks Width & Height to be the same.

纹理

Allows you to pick an image for the Image shape.

Shape Dynamics

Random Size

Randomizes the particle size between 1x1 px and the given size of the particle in brush-tip or spray shape.

Fixed Rotation

Gives a fixed rotation to the particle to work from.

Randomized Rotation

Randomizes the rotation.

Follow Cursor Weight

How much the pressure affects the rotation of the particles. At 1.0 and high pressure it’ll seem as if the particles are exploding from the middle.

Angle Weight

How much the spray area angle affects the particle angle.

颜色选项

随机 HSV

Randomize the HSV with the strength of the sliders. The higher, the more the color will deviate from the foreground color, with the direction indicating clock or counter clockwise.

Random Opacity

Randomizes the opacity.

Color Per Particle

Has the color options be per particle instead of area.

Sample Input Layer.

Will use the underlying layer as reference for the colors instead of the foreground color.

填充背景

Fills the area before drawing the particles with the background color.

与背景色混合.

Gives the particle a random color between foreground/input/random HSV and the background color.

切线法线笔刷引擎

The Tangent Normal Brush Engine is an engine that is specifically designed for drawing normal maps, of the tangent variety. These are in turn used in 3d programs and game engines to do all sorts of lightning trickery. Common uses of normal maps include faking detail where there is none, and to drive transformations (Flow Maps).

A Normal map is an image that holds information for vectors. In particular, they hold information for Normal Vectors, which is the information for how the light bends on a surface. Because Normal Vectors are made up of 3 coordinates, just like colors, we can store and see this information as colors.

Normals can be seen similar to the stylus on your tablet. Therefore, we can use the tilt-sensors that are available to some tablets to generate the color of the normals, which can then be used by a 3d program to do lighting effects.

In short, you will be able to paint with surfaces instead of colors.

The following options are available to the tangent normal brush engine:

笔尖

混色模式

不透明度和流量

大小

宽高比

间距

镜像

柔度

锐度

旋转

分散

喷枪

纹理

Specific Parameters to the Tangent Normal Brush Engine

切线倾斜

These are the options that determine how the normals are calculated from tablet input.

切线编码

This allows you to set what each color channel means. Different programs set different coordinates to different channels, a common version is that the green channel might need to be inverted (-Y), or that the green channel is actually storing the x-value (+X).

笔身倾斜选项

Allows you to choose which sensor is used for the X and Y.

倾斜

Uses Tilt for the X and Y.

方向

Uses the drawing angle for the X and Y and Tilt-elevation for the Z, this allows you to draw flowmaps easily.

旋转

Uses rotation for the X and Y, and tilt-elevation for the Z. Only available for specialized Pens.

仰角敏感度

Allows you to change the range of the normal that are outputted. At 0 it will only paint the default normal, at 1 it will paint all the normals in a full hemisphere.

用途

The Tangent Normal Map Brush Engine is best used with the Tilt Cursor, which can be set in Settings ‣ Configure Krita ‣ General ‣ Outline Shape ‣ Tilt Outline.

Normal Map authoring workflow

Create an image with a background color of (128, 128, 255) blue/purple.

Setting up a background with the default color.

Set up group with a Phong Bumpmap filter mask. Use the Use Normal map checkbox on the filter to make it use normals.

Creating a phong bump map filter layer, make sure to check ‘Use Normal map’.

These settings give a nice daylight-esque lighting setup, with light 1 being the sun, light 3 being the light from the sky, and light 2 being the light from the ground.

Make a Normalize filter layer or mask to normalize the normal map before feeding it into the Phong bumpmap filter for the best results.

Then, paint on layers in the group to get direct feedback.

Paint on the layer beneath the filters with the tangent normal brush to have them be converted in real time.

Finally, when done, hide the Phong bumpmap filter layer (but keep the Normalize filter layer!), and export the normal map for use in 3d programs.

Drawing Direction Maps

Direction maps are made with the Direction option in the Tangent Tilt options. These normal maps are used to distort textures in a 3d program (to simulate for example, the flow of water) or to create maps that indicate how hair and brushed metal is brushed. Krita can’t currently give feedback on how a given direction map will influence a distortion or shader, but these maps are a little easier to read.

Just set the Tangent Tilt option to Direction, and draw. The direction your brush draws in will be the direction that is encoded in the colors.

Only editing a single channel

Sometimes you only want to edit a single channel. In that case set the blending mode of the brush to Copy <channel>, with <channel> replaced with red, green or blue. These are under the Misc section of the blending modes.

So, if you want the brush to only affect the red channel, set the blending mode to Copy Red.

The copy red, green and blue blending modes also work on filter-layers.

This can also be done with filter layers. So if you quickly want to flip a layer’s green channel, make an invert filter layer with Copy Green above it.

Mixing Normal Maps

For mixing two normal maps, Krita has the Combine Normal Map blending mode under Misc.

笔刷选项

简要介绍各种笔刷引擎的选项。

目录：

笔尖

锁定笔刷选项

蒙版笔刷

不透明度和流量

选项

传感器

纹理

笔尖

自动笔刷

The generic circle or square. These brush-tips are generated by Krita through certain parameters.

Types

First, there are three mask-types, with each the circle and square shape:

默认

This is the ultimate generic type. The fade parameter produces the below results. Of the three auto brushes, this is the fastest.

柔和

This one’s fade is controlled by a curve!

高斯

This one uses the gaussian algorithm to determine the fade. Out of the three auto brushes, this is the slowest.

参数

直径

The pixel size of the brush.

份额

Whether the brush is elongated or not.

淡入

this sets the softness of the brush. You can click the chain-symbol to lock and unlock these settings. Fade has a different effect per mask-type, so don’t be alarmed if it looks strange, perhaps you have the wrong mask-type.

(With fade locked)

(With fade separately horizontal and vertical)

角

This changes the angle a which the brush is at.

Spikes

This gives the amount of tips related to the ratio.

密度

This determines how much area the brush-covers over its size: It makes it noisy. In the example below, the brush is set with density 0%, 50% and 100% respectively.

Randomness

This changes the randomness of the density. In the example below, the brush is set with randomness 0%, 50% and 100% respectively.

间距

This affects how far brushes are spaced apart. In the below picture, the three examples on the left are with spacing 0, 1 and 5.

Auto (spacing)

Ticking this will set the brush-spacing to a different (quadratic) algorithm. The result is fine control over the spacing. In the below picture, the three examples on right are with auto spacing, 0, 1 and 5 respectively.

Smooth lines

This toggles the super-smooth anti-aliasing. In the below example, both strokes are drawn with a default brush with fade set to 0. On the left without smooth lines, and the right with. Very useful for inking brushes. This option is best used in combination with Auto Spacing.

精确

This changes how smooth the brush is rendered. The lower, the faster the brush, but the worse the rendering looks. You’d want an inking brush to have a precision of 5 at all times, but a big filling brush for painting doesn’t require such precision, and can be easily sped up by setting precision to 1.

Auto (precision)

This allows you to set the precision linked to the size. The first value is the brush size at which precision is last 5, and the second is the size-difference at which the precision will decrease.

For example: A brush with ‘’starting brush size’’ 10 and ‘’delta’’ 4, will have…

precision 5 at size 10

precision 4 at size 14

precision 3 at size 18

precision 2 at size 22

precision 1 at sizes above 26.

Predefined Brushes

If you have used other applications like GIMP or Photoshop, you will have used this kind of brush. Krita is (mostly) compatible with the brush tip definitions files of these applications:

abr

GIMP autobrush tip definitions

*.gbr

GIMP single bitmap brush tip. Can be black and white or colored.

*.gih

GIMP Image Hose brush tip: contains a series of brush tips that are painted randomly or in order after each other. Can be black and white or colored. Krita does not yet support all the parameters yet.

abr

Photoshop brush tip collections. We support many of the features of these brush files, though some advanced features are not supported yet.

Note that the definition of ABR brushes has been reverse engineered since Adobe does not make the specification public. We strongly recommend every Krita user to share brush tips in GBR and GIH format and more complex brushes as Krita presets.

All predefined brush tips are shown in one selector. There are four more options that influence the initial bitmap brush tip you start painting with:

比例

scales the brush tip. 1.0 is the native size of the brush tip. This can be fairly large! When painting with variable size (for instance governed by pressure), this is the base for the calculations.

旋转

initial rotation of the brush tip.

间距

distance between the brush tip impressions.

使用颜色作为蒙版

for colored brushes, don’t paint the actual colors, but make a grayscale brush tip that will be colored by your selected foreground/background color.

锁定笔刷选项

Normally, a changing to a different brush preset will change all brush settings. Locked presets are a way for you to prevent Krita from changing all settings. So, if you want to have the texture be that same over all brushes, you lock the texture parameter. That way, all brush-preset you select will now share the same texture!

锁定一个笔刷参数

To lock an option, mouseright the little lock icon next to the parameter name, and set it to Lock. It will now be highlighted to show it’s locked:

And on the canvas, it will show that the texture-option is locked.

解锁一个笔刷参数

To unlock, mouseright the icon again.

There will be two options:

Unlock (Drop Locked)

This will get rid of the settings of the locked parameter and take that of the active brush preset. So if your brush had no texture on, using this option will revert it to having no texture.

Unlock (Keep Locked)

This will keep the settings of the parameter even though it’s unlocked.

蒙版笔刷

4.0 新版功能.

Masked brush is new feature that is only available in the 像素笔刷引擎. They are additional settings you will see in the brush editor. Masked brushes allow you to combine two brush tips in one stroke. One brush tip will be a mask for your primary brush tip. A masked brush is a good alternative to texture for creating expressive and textured brushes.

注解

Due to technological constraints, the masked brush only works in the wash painting mode. However, do remember that flow works as opacity does in the build-up painting mode.

笔尖

Like with normal brush tip you can choose any brush tip and change it size, spacing, and rotation. Masking brush size is relative to main brush size. This means when you change your brush size masking tip will be changed to keep the ratio.

Blending mode (drop-down inside Brush tip):

Blending modes changes how tips are combined.

大小

The size sensor option of the second tip.

不透明度和流量

The opacity and flow of the second tip. This is mapped to a sensor by default. Flow can be quite aggressive on subtract mode, so it might be an idea to turn it off there.

宽高比

This affects the brush ratio on a given brush.

镜像

The Mirror option of the second tip.

旋转

The rotation option of the second tip. Best set to “fuzzy dab”.

分散

The scatter option. The default is quite high, so don’t forget to turn it lower.

Difference from 纹理

You don’t need seamless texture to make cool looking brush

Stroke generates on the fly, it always different

Brush strokes looks same on any brush size

Easier to fill some areas with solid color but harder to make it hard textured

不透明度和流量

Opacity and flow are parameters for the transparency of a brush.

They are interlinked with the painting mode setting.

不透明度

The transparency of a stroke.

Flow

The transparency of separate dabs. Finally separated from Opacity in 2.9

绘画模式

Build-up

Will treat opacity as if it were the same as flow.

冲刷

Will treat opacity as stroke transparency instead of dab-transparency.

where the other images of this page had all three strokes set to painting mode: wash, this one is set to build-up.

选项

喷枪

If you hold the brush still, but are still pressing down, this will keep adding color onto the canvas. The lower the rate, the quicker the color gets added.

镜像

This allows you to mirror the Brush-tip with Sensors.

垂直

Mirrors the mask horizontally.

水平

Mirrors the mask vertically.

Some examples of mirroring and using it in combination with 旋转.

旋转

This allows you to affect Angle of your brush-tip with Sensors.

In the above example, several applications of the parameter.

Drawing Angle – A common one, usually used in combination with rake-type brushes. Especially effect because it does not rely on tablet-specific sensors. Sometimes, Tilt-Direction or Rotation is used to achieve a similar-more tablet focused effect, where with Tilt the 0° is at 12 o’clock, Drawing angle uses 3 o’clock as 0°.

Fuzzy – Also very common, this gives a nice bit of randomness for texture.

Distance – With careful editing of the Sensor curve, you can create nice patterns.

Fade – This slowly fades the rotation from one into another.

Pressure – An interesting one that can create an alternative looking line.

分散

This parameter allows you to set the random placing of a brush-dab. You can affect them with Sensors.

X

The scattering on the angle you are drawing from.

Y

The scattering, perpendicular to the drawing angle (has the most effect)

锐度

Puts a threshold filter over the brush mask.

大小

This parameter is not the diameter itself, but rather the curve for how it’s affected.

So, if you want to lock the diameter of the brush, lock the Brush-tip. Locking the size parameter will only lock this curve. Allowing this curve to be affected by the Sensors can be very useful to get the right kind of brush. For example, if you have trouble drawing fine lines, try to use a concave curve set to pressure. That way you’ll have to press hard for thick lines.

Also popular is setting the size to the sensor fuzzy or perspective, with the later in combination with a 透视

柔度

This allows you to affect Fade with Sensors.

Has a slight brush-decreasing effect, especially noticeable with soft-brush, and is overall more noticeable on large brushes.

来源

Picks the source-color for the brush-dab.

纯色

Current foreground color.

渐变色

Picks active gradient

Uniform Random

Gives a random color to each brush dab.

Total Random

Random noise pattern is now painted.

花式

Uses active pattern, but alignment is different per stroke.

Locked Pattern

Locks the pattern to the brushdab

混合

Allows you to affect the mix of the 来源 color with Sensors. It will work with Plain Color and Gradient as source. If Plain Color is selected as source, it will mix between foreground and background colors selected in color picker. If Gradient is selected, it chooses a point on the gradient to use as painting color according to the sensors selected.

Uses

Flow map

The above example uses a Krita painted flowmap in the 3D program Blender. A brush was set to Source ‣ Gradient and Mix ‣ Drawing angle. The gradient in question contained the 360° for normal map colors. Flow maps are used in several Shaders, such as brushed metal, hair and certain river-shaders.

渐变色

Exactly the same as using Source ‣ Gradient with Mix, but only available for the Color Smudge Brush.

间距

This allows you to affect 笔尖 with 传感器.

Isotropic spacing

Instead of the spacing being related to the ratio of the brush, it will be on diameter only.

宽高比

Allows you to change the ratio of the brush and bind it to parameters. This also works for predefined brushes.

传感器

压力

Uses the pressure in and out values of your stylus.

笔压

Uses only pressure in values of your stylus. Previous pressure level in same stroke is overwritten only by applying more pressure. Lessening the pressure doesn’t affect PressureIn.

X 轴倾斜

How much the brush is affected by stylus angle, if supported.

Y-tilt

How much the brush is affected by stylus angle, if supported.

Tilt-direction

How much the brush is affected by stylus direction. The pen point pointing towards the user is 0°, and can vary from -180° to +180°.

Tilt-elevation

How much the brush is affected by stylus perpendicularity. 0° is the stylus horizontal, 90° is the stylus vertical.

速率

How much the brush is affected by the speed at which you draw.

Drawing Angle

How much the brush is affected by which direction you are drawing in. Lock will lock the angle to the one you started the stroke with. Fan corners will try to smoothly round the corners, with the angle being the angles threshold it’ll round. Angle offset will add an extra offset to the current angle.

旋转

How much a brush is affected by how the stylus is rotated, if supported by the tablet.

距离

How much the brush is affected over length in pixels.

时间

How much a brush is affected over drawing time in seconds..

Fuzzy (Dab)

Basically the random option.

模糊笔画

A randomness value that is per stroke. Useful for getting color and size variation in on speed-paint brushes.

淡入

How much the brush is affected over length, proportional to the brush tine.

透视

How much the brush is affected by the perspective assistant.

Tangential Pressure

How much the brush is affected by the wheel on airbrush-simulating stylii.

纹理

This allows you to have textured strokes. This parameter always shows up as two parameters:

纹理

花式

Which pattern you’ll be using.

比例

The size of the pattern. 1.0 is 100%. .. image:: /images/en/Krita_2_9_brushengine_texture_05.png

Horizontal Offset & Vertical Offset

How much a brush is offset, random offset sets a new per stroke. .. image:: /images/en/Krita_2_9_brushengine_texture_04.png

Texturing mode

正片叠底

Uses alpha multiplication to determine the effect of the texture. Has a soft feel.

减去

Uses subtraction to determine the effect of the texture. Has a harsher, more texture feel.

Cutoff policy

Cutoff policy will determine what range and where the strength will affect the textured outcome.

禁止

doesn’t cut off. Full range will be used.

花式

cuts the pattern off.

刷子

Cuts the brush-tip off.

切断

Cutoff is… the grayscale range that you can limit the texture to. This also affects the limit takes by the strength. In the below example, we move from the right arrow moved close to the left one, resulting in only the darkest values being drawn. After that, three images with larger range, and underneath that, three ranges with the left arrow moved, result in the darkest values being cut away, leaving only the lightest. The last example is the pattern without cutoff.

图案反相

Invert the pattern.

Brightness and Contrast

3.3.1 新版功能: Adjust the pattern with a simple brightness/contrast filter to make it easier to use. Because Subtract and Multiply work differently, it’s recommended to use different values with each:

强度

This allows you to set the texture to Sensors. It will use the cutoff to continuously draw lighter values of the texture (making the result darker)

参见

David Revoy describing the texture feature (old) [http://www.davidrevoy.com/article107/textured-brush-in-floss-digital-painting]

工具面板

Krita 中所有面板功能的介绍。

添加形状

高级拾色器

动画曲线

动画

美术拾色器

笔刷预设

通道

颜色滑动条

图层合成方案

数字混色器

网格与参考线

直方图

图层

LUT 色彩管理

洋葱皮

总览图

调色板

图案

参考图像

形状属性

小型拾色器

吸附选项

量化颜色选择器

操作集合

时间线

触控面板

历史记录

矢量图库

添加形状

一个用于将 KOffice 中形状添加到矢量图层的面板。

4.0 版后已移除: 从 Krita 4.0 开始，此面板由 矢量图库 替代。

高级拾色器

As compared to other color selectors in Krita, Advanced color selector provides more control and options to the user. To open Advanced color selector choose Settings ‣ Dockers ‣ Advanced Color Selector. You can configure this docker by clicking on the little wrench icon on the top left corner. Clicking on the wrench will open a popup window with following tabs and options:

拾色器

在这里, 您可以配置主拾色器。

Type and Shape

Here you can pick the hsx model you’ll be using. There’s a small blurb explaining the characteristic of each model, but let’s go into detail:

HSV

Stands for Hue, Saturation, Value. Saturation determines the difference between white, gray, black and the most colorful color. Value in turn measures either the difference between black and white, or the difference between black and the most colorful color.

HSL

Stands for Hue, Saturation, Lightness. All saturated colors are equal to 50% lightness. Saturation allows for shifting between gray and color.

HSI

This stands for Hue, Saturation and Intensity. Unlike HSL, this one determine the intensity as the sum of total rgb components. Yellow (1,1,0) has higher intensity than blue (0,0,1) but is the same intensity as cyan (0,1,1).

HSY’

Stands for Hue, Saturation, Luma, with Luma being an RGB approximation of true luminosity. (Luminosity being the measurement of relative lightness). HSY’ uses the Luma Coefficients, like Rec 709 [http://en.wikipedia.org/wiki/Rec._709], to calculate the Luma. Due to this, HSY’ can be the most intuitive selector to work with, or the most confusing.

Then, under shape, you can select one of the shapes available within that color model.

注解

Triangle is in all color models because to a certain extent, it is a wildcard shape: All color models look the same in an equilateral triangle selector.

光度系数

This allows you to edit the Luma coefficients for the HSY model selectors to your leisure. Want to use Rec 601 [http://en.wikipedia.org/wiki/Rec._601] instead of Rec 709? These boxes allow you to do that!

By default, the Luma coefficients should add up to 1 at maximum.

Gamma 分布

The HSY selector is linearised, this setting allows you to choose how much gamma is applied to the Luminosity for the gui element. 1.0 is fully linear, 2.2 is the default.

色彩空间

This allows you to set the overall color space for the Advanced Color Selector.

警告

You can pick only sRGB colors in advanced color selector regardless of the color space of advanced color selector. This is a bug.

行为

When docker resizes

This determines the behavior of the widget as it becomes smaller.

Change to Horizontal

This’ll arrange the shade selector horizontal to the main selector. Only works with the MyPaint shade selector

隐藏光影选择器

This hides the shade selector.

什么也不做

Does nothing, just resizes.

显示浮动放大界面

If your have set the docker size considerably smaller to save space, this option might be helpful to you. This allows you to set whether or not the selector will give a zoomed view of the selector in a size specified by you, you have these options for the zoom selector:

when pressing middle mouse button

on mouse over

从不

The size given here, is also the size of the Main Color Selector and the MyPaint Shade Selector when they are called with Shift + I and Shift + M, respectively.

Hide Pop-up on click

This allows you to let the pop-up selectors called with the above hotkeys to disappear upon clicking them instead of having to leave the pop-up boundary. This is useful for faster working.

光影拾色器

Shade selector options. The shade selectors are useful to decide upon new shades of color.

拾色器颜色更新条件

This allows you to determine when the shade selector updates.

显示 MyPaint 光影拾色器

Ported from MyPaint, and extended with all color models. Default hotkey is Shift+ M

简单光影拾色器

This allows you to configure the simple shade selector in detail.

色块

This sets the options of the color patches.

Both Color History and Colors From the Image have similar options which will be explained below.

显示

This is a radio button to show or hide the section. It also determines whether or not the colors are visible with the advanced color selector docker.

尺寸

The size of the color boxes can be set here.

Patch Count

The number of patches to display.

方向

The direction of the patches, Horizontal or Vertical.

Allow Scrolling

Whether to allow scrolling in the section or not when there are too many patches.

Number of Columns/Rows

The number of Columns or Rows to show in the section.

Update After Every Stroke

This is only available for Colors From the Image and tells the docker whether to update the section after every stroke or not, as after each stroke the colors will change in the image.

历史颜色色块

The history patches remember which colors you’ve drawn on canvas with. They can be quickly called with H

常见颜色色块

The common patches are generated from the image, and are the most common color in the image. The hotkey for them on canvas is U.

External Info

HSI and HSY for Krita’s advanced color selector. [http://wolthera.info/?p=726]

动画曲线

The Animation Curve docker allows you to edit tweened sections by means of interpolation curves. As of this time of writing, it can only edit opacity.

The idea is that sometimes what you want to animate can be expressed as a value. This allows the computer to do maths on the values, and automate tasks, like interpolation, also known as ‘Tweening’. Because these are values, like percentage opacity, and animation happens over time, that means we can visualize the way the values are interpolated as a curve graph, and also edit the graph that way.

But, when you first open this docker, there’s no curves visible! You will first need to add opacity keyframes to the active animation layer. You can do this by using the animation docker and selection Add new keyframe.

Opacity should create a bright red curve line in the docker. On the left, in the layer list, you will see that the active layer has an outline of its properties: A red Opacity has appeared. Pressing the red dot will hide the current curve, which’ll be more useful in the future when more properties can be animated.

If you select a dot of the curve, you can move it around to shift its place in the time-line or its value.

On the top, you can select the method of smoothing:

Hold Value

This keeps the value the same until there’s a new keyframe.

Linear Interpolation (Default)

This gives a straight interpolation between two values.

自定义插值

This allows you to set the section after the keyframe node as one that can be modified. mouseleft +dragging on the node allows you to drag out a handler node for adjusting the curving.

So, for example, making a 100% opacity keyframe on frame 0 and a 0% opacity one on frame 24 gives the following result:

If we select frame 12 and press Add New Keyframe a new opacity keyframe will be added on that spot. We can set this frame to 100% and set frame 0 to 0% for this effect.

Now, if we want easing in, we select the node on frame 0 and press the Custom Interpolation button at the top. This will enable custom interpolation on the curve between frames 0 and 12. Doing the same on frame 12 will enable custom interpolation between frames 12 and 24. Drag from the node to add a handle, which in turn you can use to get the following effects:

The above shows an ease-in curve.

And convex/concave examples:

As you may be able to tell, there’s quite a different ‘texture’, so to speak, to each of these animations, despite the difference being only in the curves. Indeed, a good animator can get quite some tricks out of interpolation curves, and as we develop Krita, we hope to add more properties for you to animate this way.

注解

Opacity has currently 255 as maximum in the curve editor, as that’s how opacity is stored internally

动画

To have a playback of the animation, you need to use the animation docker.

The first big box represents the current Frame. The frames are counted with programmer’s counting so they start at 0.

Then there are two boxes for you to change the playback range here. So, if you want to do a 10 frame animation, set the end to 10, and then Krita will cycle through the frames 0 to 10.

The bar in the middle is filled with playback options, and each of these can also be hot-keyed. The difference between a keyframe and a normal frame in this case is that a normal frame is empty, while a keyframe is filled.

Then, there’s buttons for adding, copying and removing frames. More interesting is the next row:

Onion Skin

Opens the 洋葱皮 if it wasn’t open before.

自动帧模式

Will make a frame out of any empty frame you are working on. Currently automatically copies the previous frame.

Drop frames

This’ll drop frames if your computer isn’t fast enough to show all frames at once. This process is automatic, but the icon will become red if it’s forced to do this.

You can also set the speedup of the playback, which is different from the framerate.

美术拾色器

A round selector that tries to give you the tools to select colors ramps efficiently.

首选项

Set the color model used by the selector, as well as the amount of segments.

重置

Reset the selector to a default stage.

绝对值

This changes the algorithm around so it gives proper values for the gray. Without absolute, it’ll use HSV values for gray to the corresponding hue and lightness.

用法

mouseleft the swatches to change the foreground color. Use mouseright + Drag to shift the alignment of the selector swatches within a specific saturation ring. Use mouseleft + Drag to shift the alignment of all swatches.

This selector does not update on change of foreground color.

笔刷预设

This docker allows you to switch the current brush you’re using, as well as tagging the brushes.

Just mouseleft on an icon to switch to that brush!

标签管理

mouseright a brush to add a tag or remove a tag.

通道

The channel docker allows you to turn on and off the channels associated with the color space that you are using. Each channel has an enabled and disabled checkbox. You cannot edit individual layer channels from this docker.

编辑通道

If you want to edit individual channels by their grayscale component, you will need to manually separate a layer. This can be done with a series of commands with the layer docker.

Select the layer you want to break apart.

Go to Image ‣ Separate Image

Select the following options and click OK:

Source: Current Layer

Alpha Options: Create separate separation from alpha channel

Output to Grayscale, not color: unchecked

Hide your original layer

Select All of the new channel layers and put them in a group layer (Layer ‣ Quick Group)

Select the Red layer and change the blending mode to “Copy Red” (these are in the Misc. category)

Select the Green layer and change the blending mode to “Copy Green”

Select the Blue layer and change the blending mode to “Copy Blue”

Make sure the Alpha layer is at the bottom of the group.

Enable Inherit Alpha for the Red, Green, and Blue layers.

Here is a video to see this process [https://www.youtube.com/watch?v=lWuwegJ-mIQ&feature=youtu.be] in Krita 3.0

When working with editing channels, it can be easier to use the Isolate Layer feature to only see the channel. Right-click on the layer to find Isolate Layer.

颜色滑动条

4.1 版后已移除: This docker has been removed in 4.1. It will return in some form in the future.

A small docker with Hue, Saturation and Lightness bars.

You can configure this docker via Settings ‣ Configure Krita ‣ Color Selector Settings ‣ Color Sliders.

There, you can select which sliders you would like to see added, allowing you to even choose multiple lightness sliders together.

图层合成方案

The compositions docker allows you to save the configurations of your layers being visible and invisible, allowing you to save several configurations of your layers.

Adding new compositions

You do this by setting your layers as you wish, then pressing the plus sign. If you had a word in the text-box to the left, this will be the name of your new composition.

Activating composition

Double-click the composition name to switch to that composition.

Removing compositions

The minus sign. Select a composition, and hit this button to remove it.

Exporting compositions

The file sign. Will export all checked compositions.

Updating compositions

mouseright a composition to overwrite it with the current configuration.

Rename composition

mouseright a composition to rename it.

数字混色器

这个面板允许您简单地进行数字混色。

它按下文所述工作：

在左侧是您当前的颜色。

而旁边有六列。 这些列中的每一列都包含三行：最低一行是将被混合的颜色，点击它，可以使用弹出的调色板设置不同的颜色。 上方的滑块表示混合颜色和当前颜色的比例。滑块越高，原来的颜色所占比例越高。最上方显示混色结果，点击以后可以设置为当前颜色。

网格与参考线

The grids and guides docker replaces the 网格工具 in Krita 3.0.

This docker controls the look and the visibility of both the Grid and the Guides decorations. It also features a checkbox to quickly toggle snapping on or off.

网格

Grids in Krita can currently only be orthogonal and diagonal. There is a single grid per canvas, and it is saved within the document. Thus it can be saved in a 模板.

显示网格

Shows or hides the grid.

吸附到网格

Toggles grid snapping on or off. This can also be achieved with Shift + S.

文件系统

The type of Grid

矩形

An orthogonal grid.

X and Y spacing

Sets the width and height of the grid in pixels.

Subdivision

Groups cells together as larger squares and changes the look of the lines it contains. A subdivision of 2 will make cells appear twice as big, and the inner lines will become subdivisions.

等角网格

A diagonal grid. Isometric doesn’t support snapping.

Left and Right Angle

The angle of the lines. Set both angles to 30° for true isometric.

Cell spacing

Determines how much both sets of lines are spaced.

网格偏移

Offsets the grid’s starting position from the top-left corner of the document, in pixels.

Main Style

Controls the look of the grid’s main lines.

Div Style

Controls the look of the grid’s “subdivision” lines.

The grid’s base size is 64 pixels. With a subdivision of 2, the main grid lines are 128 px away from one another, and the intermediate lines have a different look.

参考线

Guides are horizontal and vertical reference lines. You can use them to place and align layers accurately on the canvas.

创建参考线

To create a guide, you need both the rulers and the guides to be visible.

Rulers. (View ‣ Show Rulers)

Guides. (View ‣ Show Guides)

To create a guide, move your cursor over a ruler and drag in the direction of the canvas. A line will appear. Dragging from the left ruler creates a vertical guide, and dragging from the top ruler creates a horizontal guide.

编辑参考线

Place your cursor above a guide on the canvas. If the guides are not locked, your cursor will change to a double arrow. In that case, click and drag to move the guide. To lock and unlock the guides, open the Grid and Guides Docker. Ensure that the Guides tab is selected. From here you can lock the guides, enable snapping, and change the line style.

注解

Currently, it is not possible to create or to move guides to precise positions. The only way to achieve that for now is to zoom in on the canvas, or to use the grid and snapping to place the guide.

移除参考线

Click on the guide you want to remove and drag it outside of the canvas area. When you release your mouse or stylus, the guide will be removed.

直方图

A Histogram is a chart that shows how much of a specific channel value is used in an image. Its purpose is to give a really technical representation of the colors in an image, which can be helpful in decision making about filters.

The histogram docker was already available via Layers ‣ Histogram, but it’s now a proper docker.

External Links:

Wikipedia’s entry on image histograms [https://en.wikipedia.org/wiki/Image_histogram]

图层

图层面板是 Krita 图层管理 的核心概念之一。您可以在这里对图层进行诸如添加、删除、重命名、复制等操作。

图层组

You can select the active layer here. Using Shift and Ctrl you can select multiple layers and drag-and-drop them. You can also change the visibility, edit state, alpha inheritance and rename layers. You can open and close groups, and you can drag and drop layers, either to reorder them, or to put them in groups.

文件名

The Layer name, just do double- mouseleft to make it editable, and press Enter to finish editing.

标签

This is a color that you can set on the layer. mouseright the layer to get a context menu to assign a color to it. You can then later filter on these colors.

混合模式

This will set the 混色模式 of the layer.

不透明度

This will set the opacity of the whole layer.

可见性

一个眼睛图标的按钮。单击可以隐藏整个图层。

编辑状态（或图层锁定）

一个以锁为图标的按钮。点击该按钮将组织图层被编辑，这在处理大量图层时很有用。

Alpha（透明度）锁定

This will prevent the alpha of the layer being edited. In more plain terms: This will prevent the transparency of a layer being changed. Useful in coloring images.

直通模式

Only available on Group Layers, this allows you to have the blending modes of the layers within affect the layers outside the group. Doesn’t work with masks currently, therefore these have a strike-through on group layers set to pass-through.

Alpha（透明度）继承

This will use the alpha of all the peers of this layer as a transparency mask. For a full explanation see 图层和蒙版使用入门.

Open or Close Layers

(An Arrow Icon) This will allow you to access sub-layers of a layer. Seen with masks and groups.

洋葱皮视图

这只适用于 动画图层，用于打开洋葱皮视图。

图层样式

仅在包含 :ref:`layer_style`的图层中显示。该按钮允许您快速切换。

To edit these properties on multiple layers at once, press the properties option when you have multiple layers selected or press F3. There, to change the names of all layers, the checkbox before Name should be ticked after which you can type in a name. Krita will automatically add a number behind the layer names. You can change other layer properties like visibility, opacity, lock states, etc. too.

Lower buttons

These are buttons for doing layer operations.

添加

默认情况下, 将添加新的“颜料图层”， 但点击旁边的小箭头，可弹出子菜单以供选择其他图层类型。

复制

将会复制图层。可以在按下 Ctrl 的同时按住 mouseleft 拖动触发这个功能。

向上移动图层

将向上移动活动图层。遇到图层组时，将会被移入或移出。

向下移动图层

将向下移动活动图层。遇到图层组时，将会被移入或移出。

图层属性

图层属性窗口将被打开。

删除

活动图层将被删除。出于安全考虑，您只能删除可见图层。

快捷键和粘滞键

按下 Shift + Ctrl 以选择多个图层。

按下 :kbd:`Ctrl 同时按住 mouseleft 拖动以创建选中图层的副本，供您拖放。

Ctrl + E for merging a layer down. This also merges selected layers, layer styles and will keep selection masks in tact. Using Ctrl + E on a single layer with a mask will merge down the mask into the layer.

按下 Ctrl + Shft + E 以合并所有图层。

R + mouseleft allows you to select layers on canvas, similar to picking colors directly on canvas. Use Shift + R + mouseleft for multiple layers.

按下 Ins 以添加新图层。

按下 Ctrl + G 将创建一个图层组。如果选择了多个图层, 则会将其放入图层组。

Ctrl + Shift + G will quickly set-up a clipping group, with the selected layers added into the group, and a new layer added on top with alpha-inheritance turned on, ready for painting!

按下 Ctrl + Alt + G 以取消图层编组。

Alt + mouseleft on the thumbnail for isolated view of a layer. This will maintain between layers till the same action is repeated again.

Shift + mouseleft on the eye-icon for hiding all but the current layer.

按下 Page Up 以及 Page Down 以在图层间切换。

按下 Ctrl + Page Up 以及 Ctrl + Page Down 以上下移动选中的图层。

LUT 色彩管理

The Look Up Table (LUT) Management docker controls the high dynamic range (HDR) painting functionality.

Use OpenColorIO

Use Open Color IO instead of Krita’s internal color management. Open Color IO is a color management library. It is sometimes referred to as OCIO. This is required as Krita uses OCIO for its HDR functionality.

Color Engine

Choose the engine.

配置

Use an OCIO configuration file from your computer.

注解

Some system locals don’t allow you to read the configuration files. This is due to a bug in OCIO. If you are using Linux you can fix this. If you start Krita from the terminal with the LC_ALL=C krita flag set, you should be able to read the configuration files.

Input Color Space

What the color space of the image is. Usually sRGB or Linear.

Display Device

The type of device you are using to view the colors. Typically sRGB for computer screens.

查看

–

组件

Allows you to study a single channel of your image with LUT.

曝光量

Set the general exposure. On 0.0 at default. There’s Y to change this on the fly on canvas.

Gamma 分布

Allows you to set the gamma. This is 1.0 by default. You can set this to change on the fly in canvas shortcuts.

Lock color

Locks the color to make sure it doesn’t shift when changing exposure. May not be desired.

Set white and black points

This allows you to set the maximum and minimum brightness of the image, which’ll adjust the exposure and gamma automatically to this.

洋葱皮

To make animation easier, it helps to see both the next frame as well as the previous frame sort of layered on top of the current. This is called onion-skinning.

Basically, they are images that represent the frames before and after the current frame, usually colored or tinted.

You can toggle them by clicking the lightbulb icon on a layer that is animated (so, has frames), and isn’t fully opaque. (Krita will consider white to be white, not transparent, so don’t animated on an opaque layer if you want onion skins.)

The term onionskin comes from the fact that onions are semi-transparent. In traditional animation animators would make their initial animations on semitransparent paper on top of an light-table (of the special animators variety), and they’d start with so called keyframes, and then draw frames in between. For that, they would place said keyframes below the frame they were working on, and the light table would make the lines of the keyframes shine through, so they could reference them.

Onion-skinning is a digital implementation of such a workflow, and it’s very useful when trying to animate.

The slider and the button with zero offset control the master opacity and visibility of all the onion skins. The boxes at the top allow you to toggle them on and off quickly, the main slider in the middle is a sort of ‘master transparency’ while the sliders to the side allow you to control the transparency per keyframe offset.

Tint controls how strongly the frames are tinted, the first screen has 100%, which creates a silhouette, while below you can still see a bit of the original colors at 50%.

Previous and next frame allows you set the colors.

总览图

此面板可供你查看图像的总览。您还可以使用它快速导航、放大和缩小。拖动视图矩形可以快速移动视图，而拖动缩放滑块可以快速缩放。

调色板

The palette docker displays various color swatches for quick use. Since 4.0, it also supports editing palettes and organizing colors into groups.

You can choose from various default palettes or you can add your own colors to the palette.

To choose from the default palettes click on the icon in the bottom left corner of the docker, it will show a list of pre-loaded color palettes. You can click on one and to load it into the docker, or click on import resources (folder icon) to load your own color palette. Creating a new palette can be done by filling out the name input, pressing Save and selecting your new palette from the list.

Selecting colors is done by mouseleft on a swatch.

Pressing the delete icon will remove the selected swatch or group. When removing a group, Krita will always ask whether you’d like to keep the swatches. If so, they will be added to the default group above.

4.0 新版功能.

Double mouseleft a swatch will call up the edit window where you can change the color, the name, the id and whether it’s a spot color. On a group this will allow you to set the group name.

mouseleft drag will allow you to drag and drop swatches and groups to order them.

Pressing the + icon will allow you to add a new swatch.

Pressing the Folder icon will allow you to add a new group.

The edit and new color dialogs ask for the following:

彩色

The color of the swatch.

文件名

The Name of the color in a human readable format.

ID

The ID is a number that can be used to index colors. Where Name can be something like “Pastel Peach”, ID will probably be something like “RY75”.

Spot color

Currently not used for anything within Krita itself, but spot colors are a toggle to keep track of colors that represent a real world paint that a printer can match. Keeping track of such colors is useful in a printing workflow, and it can also be used with python to recognize spot colors.

If you find the size of color swatches too small, you can increase the size by hovering your mouse over the palette and scrolling while holding Ctrl.

Krita’s native palette format is since 4.0 *.kpl. It also supports importing…

Gimp Palettes (.gpl)

Microsoft RIFF palette (.riff)

Photoshop Binary Palettes (.act)

PaintShop Pro palettes (.psp)

Photoshop Swatches (.aco)

Scribus XML (.xml)

Swatchbooker (.sbz).

图案

This docker allows you to select the global pattern. Using the open-file button you can import patterns. Some common shortcuts are the following:

mouseright a swatch will allow you to set tags.

mouseleft a swatch will allow you to set it as global pattern.

Ctrl + Scroll you can resize the swatch sizes.

参考图像

4.0 版后已移除: This docker was removed in Krita 4.0 due to crashes on Windows. The reference images tool in 4.1 replaces it.

This docker allows you to pick an image from outside of Krita and use it as a reference. Even better, you can pick colors from it directly.

The docker consists of two tabs: Browsing and Image.

浏览

Browsing gives you a small file browser, so you can navigate to the map where the image you want to use as reference is located.

There’s an image strip beneath the browser, allowing you to select the image which you want to use. Double click to load it in the Image tab.

图像

This tab allows you to see the images you selected, and change the zoom level. Clicking anywhere on the image will allow you to pick the merged color from it. Using the cross symbol, you can remove the icon.

形状属性

4.0 版后已移除: 此面板已被废弃，功能被移入 形状编辑工具 中。

只有在矢量图层上选择矩形或圆时，此面板才起作用。它允许您更改小细节，例如矩形的圆角以及圆的公式（即形状）。

小型拾色器

这是 Krita 中最简单的颜色选择器。左侧区域选择色调，右侧区域调整亮度和饱和度。

吸附选项

3.0 版后已移除: This docker has been removed in Krita 3.0. For more information on how to do this instead, consult the snapping page.

This is docker only applies for Vector Layers. Snapping determines where a vector shape will snap. The little number box is for snapping to a grid.

结点

For snapping to other vector nodes.

Extensions of Line

For snapping to a point that could have been part of a line, had it been extended.

边框

For snapping to the bounding box of a vector shape.

正交

For snapping to only horizontal or vertical lines.

交界

for snapping to other vector lines.

参考线

Guides don’t exist in Krita, therefore this one is useless.

量化颜色选择器

The specific color selector allows you to choose specific colors within a color space.

色彩空间选择器

Fairly straightforward. This color space chooser allows you to pick the color space, the bit depth and the icc profile in which you are going to pick your color. Use the checkbox ‘show color space selector’ to hide this feature.

滑动条

These change per color space. If you chose 16bit float or 32 bit float, these will go from 0 to 1.0, with the decimals deciding the difference between colors.

十六进制颜色选择器

This is only available for the color spaces with a depth of 8 bit. This allows you to input hex color codes, and receive the RGB, CMYK, LAB, XYZ or YCrCb equivalent, and the other way around!

操作集合

Task sets are for sharing a set of steps, like a tutorial. You make them with the task-set docker.

Task sets can record any kind of command also available via the shortcut manager. It can not record strokes, like the macro recorder can. However, you can play macros with the tasksets!

The tasksets docker has a record button, and you can use this to record a certain workflow. Then use this to let items appear in the taskset list. Afterwards, turn off the record. You can then click any action in the list to make them happen. Press the ‘Save’ icon to name and save the taskset.

时间线

The Timeline Docker works in tandem with the 动画 at the heart of Krita’s animation tools. While the Animation Docker provides access to the fundamental controls for playing back and editing animations, the Timeline Docker contains the layered frames and specific timings that define your animation. In other words, the Timeline Docker is the digital equivalent to a traditional animator’s “dope sheet”.

图例

A. Layer List – This area contains some subset of the layers of your current document. The currently active layer is always shown and can be “pinned” to the timeline using the Show in Timeline menu action. Also, Layers that are created via the Timeline or added using the Add Existing Layer submenu are automatically pinned to the timeline. Each layer has properties that can also be toggled here (visible, locked, show onion skins, etc.).

Active Layer

A highlighted row in the table shows the current active layer. One can change which layer is active by clicking on the layer’s name within the left header. It is not possible to change the active layer by clicking inside the table in order to not disturb the user when scrubbing and editing frame positions on the timeline.

B. Frame Table – The Frame Table is a large grid of cells which can either hold a single frame or be empty. Each row of the Frame Table represents an animation layer and each column represents a frame timing. Just like the Layer List, the active layer is highlighted across the entire Frame Table. It’s important to understand that frame timings are not based on units of time like seconds, but are based on frames which can then be played back at any speed, depending on the 动画’s frame rate and play speed settings.

Frames can be moved around the timeline by simply left-clicking and dragging from one frame to another slot, even across layers. Furthermore, holding Ctrl while moving creates a copy. Right-clicking anywhere in the Frame Table will bring up a helpful context menu for adding, removing, copying, and pasting frames or adjusting timing with holds.

Current Selection:

Frames highlighted in orange represent a selection or multiple selections, which can be created by mouse or keyboard. While multiple frames are selected, right-clicking anywhere in the Frame Table will bring up a context menu that will allow for adding or removing frames or holds within the current selection. Finally, it is also possible to have multiple non-contiguous/separate selections if needed.

警告

Painting always happens only in the active frame (represented by a small dot), which is not necessarily part of your current selection.

Keys, Blanks, and Holds:

The Timeline Docker now shows us even more useful information about both what is there as well as what is not. Key frames which contain drawings are still displayed as filled blocks within a cell, while blank or empty key frames are shown as a hollow outline. In Krita, every drawn frame is automatically held until the next frame; these holds are now clearly shown with a colored line across all held frames. The color of frames can be set per-frame by the animator using the right-click menu, and is a matter of personal workflow.

C. Frame Timing Header – The Frame Timing Header is a ruler at the top of the Frame Table. This header is divided into small notched sections which are based on the current frame rate (set in the 动画). Integer multiples of the frame rate have a subtle double-line mark, while smaller subdivisions have small single-line marks. Each major notch is marked with a helpful frame number.

Cached Frames:

The Frame Timing Header also shows important information about which frames are currently cached. When something is said to be “cached”, that means that it is stored in your device’s working memory (RAM) for extra fast access. Cached frames are shown by the header with a small light-gray rectangle in each column. While this information isn’t always critical for us artists, it’s helpful to know that Krita is working behind the curtains to cache our animation frames for the smoothest possible experience when scrubbing through or playing back your animation.

D. Current Time Scrubber – A highlighted column in the Frame Table which controls the current frame time and, as such, what is currently displayed in the viewport.

Active Frame:

A frame of the active layer at the current time position. The active frame is always marked with a small circle inside. All drawing, painting, and image editing operations happen on this frame only!

警告

Don’t mix the active frame up with the current selection!

E. Layer Menu – A small menu for manipulating animation layers. You can create new layers, add or remove existing ones, and you can set ‘Show in Timeline’ here to pin the active layer to the Timeline. (This menu also shows up when right-clicking on layers inside of the Layer List.)

F. Audio Menu: Another small menu for animating along with audio sources. This is where you can open or close audio sources and control output volume/muting.

G. Zoom Handle: This allows you to zoom in and out on the Frame Table, centered around the current frame time. Click-dragging starting on the zoom handle controls the zoom level.

用法

How to use the Timeline Docker is not immediately obvious because Krita doesn’t automatically create a key frame out of your initial drawing. In fact, until you make a key frame on a layer, Krita assumes that there’s no animation going on at all on that layer and it will keep the image static over the whole animation.

So, to make our first animated layer, we need to make a key frame!

mouseright any square on the timeline docker and select Create Blank Frame. A blank frame (one that you haven’t yet drawn anything in) appears as a hollow outline instead of a solid box, making that frame active and drawing on the canvas will make it appear as a solid, colored rectangle.

To keep a layer visible in the Timeline Docker regardless of which layer is selected, select the layer in the Layers Docker so it shows up in the docker, then mouseright it within the Timeline Docker’s Layer List and select Show in Timeline. This way you can choose which layers are important and which are only minor.

You can drag and drop the frame around to a different empty frame slot.

To add a single new frame, either right-click on an empty frame slot and select Create Blank Frame to create a fresh blank frame, or select Create Duplicate Frame to create a new copy of the previous frame.

You can also change the color of frames so that you can easily identify important frames or distinguish between different sections of your animation. The current color selection is remembered for new frames so that you can easily make a set of colored frames and then switch to another color.

It’s also possible to add multiple key frames by right-clicking inside the Frame Table and selecting Keyframes ‣ Insert Multiple Keyframes. With this option you can specify a number of frames to add with the option of built in timing for quickly creating a series of 1s, 2s, 3s, etc. These settings are saved between uses.

Instead of the Frame Table, right-clicking within the Frame Timing Header gives you access to a few more options which allow you to add or remove entire columns of frames or holds at a time. For example, selecting Keyframe Columns ‣ Insert Keyframe Column Left will add new frames to each layer that’s currently visible in the Timeline Docker.

Krita only tracks key frame changes. This is unlike Flash where you have to manually indicate how long a key frame will hold. Instead, Krita just assumes that the space between key frame 1 and key frame 2 is supposed to be filled with key frame 1. Frames that are held in this way (a.k.a. “holds”) are displayed as a continuous line in the Frame Table.

To delete frames, mouseright the frame and press Remove Keyframe. This will delete all selected frames. Similarly, selecting Remove Frame and Pull will delete the selected frames and pull or shift all subsequent frames back/left as much as possible.

To manually play your animation back and forward using your mouse, a concept called scrubbing, you click-drag within the Frame Timing Header.

界面操作

Layer List

mouseleft : Select active layer.

mouseright : Layers Menu (add/remove/show layers, etc.).

Frame Timing Header

mouseleft : Move to time and select frame of the active layer.

mouseleft drag : Scrub through time and select frame of the active layer.

mouseright : Frame Columns Menu (insert/remove/copy/paste columns and hold columns).

Frames Table: all

mouseleft : Selects a single frame or slot and switches time, but does not switch active layer.

Space + mouseleft : Pan.

Space + mouseright : Zoom.

Frames Table (On Empty Slot).

mouseright : Frames menu (insert/copy/paste frames and insert/remove holds).

mouseleft + drag : Select multiple frames and switch time to the last selected, but does not switch active layer.

Shift + mouseleft : Select all frames between the active and the clicked frame.

Ctrl + mouseleft : Select individual frames together. click+drag them into place.

Frames Table (On Existing Frame)

mouseright : Frames menu (remove/copy/paste frames and insert/remove holds).

mouseleft + drag : Move a frame or multiple frames.

Ctrl + mouseleft drag : Copy a frame or multiple frames.

Alt + drag : Move selected frame(s) and all the frames to the right of it. (This is useful for when you need to clear up some space in your animation, but don’t want to select all the frames to the right of a particular frame!)

触控面板

The Touch Docker is a QML docker with several convenient actions on it. Its purpose is to aid those who use Krita on a touch-enabled screen by providing bigger gui elements.

Its actions are…

打开文件 | 保存文件 | 另存为
悔棋 | 重下
降低不透明度
提高不透明度
增加光度
减少光度
| 放大 |
Rotate Counter Clockwise 15° | 复位画布旋转 | Rotate Clockwise 15°
| 缩小 |
降低笔刷尺寸
增加笔刷尺寸
Delete Layer Contents

历史记录

This docker allows you to quickly shift between undo states, and even go back in time far more quickly that rapidly reusing Ctrl + Z

..index:: Cumulate Undo

合并撤销

mouseright an item in the undo-history docker to enable cumulative undo. mouseright again to change the parameters:

合并起始时间

The amount of seconds required to consider a group of strokes to be worth one undo step.

分组间隔时间

According to this parameter – groups are made. Every stroke is put into the same group till two consecutive strokes have a time gap of more than T seconds. Then a new group is started.

Split strokes.

A user may want to keep the ability of Undoing/Redoing his last N strokes. Once N is crossed – the earlier strokes are merged into the group’s first stroke.

矢量图库

The Vector Library Docker loads the symbol libraries in SVG files, when those SVG files are put into the “symbols” folder in the resource folder Settings ‣ Manage Resources ‣ Open Resource Folder.

The vector symbols can then be dragged and dropped onto the canvas, allowing you to quickly use complicated images.

Currently, you cannot make symbol libraries with Krita yet, but you can make them by hand, as well as use Inkscape to make them. Thankfully, there’s quite a few svg symbol libraries out there already!

Dr. Mingw 调试程序

注解

The information on this page applies only to the Windows release of Krita 3.1 Beta 3 (3.0.92) and later.

获取回溯数据

There are some additions to Krita which makes getting a backtrace much easier on Windows.

When there is a crash, Krita might appear to be unresponsive for a short time, ranging from a few seconds to a few minutes, before the crash dialog appears.

An example of the crash dialog

If Krita keeps on being unresponsive for more than a few minutes, it might actually be locked up, which may not give a backtrace. In that situation, you have to close Krita manually. Continue to follow the following instructions to check whether it was a crash or not.

Open Windows Explorer and type %LocalAppData% (without quotes) on the address bar and press Enter.

Find the file kritacrash.log (it might appear as simply kritacrash depending on your settings.)

Open the file with Notepad and scroll to the bottom, then scroll up to the first occurrence of “Error occurred on <time>” or the dashes.

Start of backtrace

Check the time and make sure it matches the time of the crash.

End of backtrace

The text starting from this line to the end of the file is the most recent backtrace.

If kritacrash.log does not exist, or a backtrace with a matching time does not exist, then you don’t have a backtrace. This means Krita was very likely locked up, and a crash didn’t actually happen. In this case, make a bug report too.

If the backtrace looks truncated, or there is nothing after the time, it means there was a crash and the crash handler was creating the stack trace before being closed manually. In this case, try to re-trigger the crash and wait longer until the crash dialog appears.

注解

Starting from Krita 3.1 Beta 3 (3.0.92), the external DrMingw JIT debugger is not needed for getting the backtrace.

使用调试符号包

Starting from 3.1 Beta 3, the debug package contains only the debug symbols separated from the executables, so you have to download the portable package separately too (though usually you already have it in the first place.)

Links to the debug packages should be available on the release announcement news item on https://krita.org/, along with the release packages. You can find debug packages for any release either in https://download.kde.org/stable/krita for stable releases or in https://download.kde.org/unstable/krita for unstable releases. Portable zip and debug zip are found next to each other.

Make sure you’ve downloaded the same version of debug package for the portable package you intend to debug / get a better (sort of) backtrace.

Extract the files inside the Krita install directory, where the sub-directories bin, lib and share is located, like in the figures below:

After extracting the files, check the bin dir and make sure you see the .debug dir inside. If you don’t see it, you probably extracted to the wrong place.

滤镜

Filters are little scripts or operations you can run on your drawing. You can visualize them as real-world camera filters that can make a photo darker or blurrier. Or perhaps like a coffee filter, where only water and coffee gets through, and the ground coffee stays behind.

Filters are unique to digital painting in terms of complexity, and their part of the painting pipeline. Some artists only use filters to adjust their colors a little. Others, using Filter Layers and Filter Masks use them to dynamically update a part of an image to be filtered. This way, they can keep the original underneath without changing the original image. This is a part of a technique called ‘non-destructive’ editing.

Filters can be accessed via the Filters menu. Krita has two types of filters: Internal and G’MIC filters.

Internal filters are often multithreaded, and can thus be used with the filter brush or the adjustment filters.

调整

艺术效果

模糊

色彩

边缘检测

浮雕

图像增强

贴图

其他

子波分解

调整

The Adjustment filters are image-wide and are for manipulating colors and contrast.

减淡

An image-wide dodge-filter. Dodge is named after a trick in traditional dark-room photography that gave the same results.

阴影

The effect will mostly apply to dark tones.

中间色调

The effect will apply to mostly midtones.

高亮

This will apply the effect on the highlights only.

曝光量

The strength at which this filter is applied.

加深

An image-wide burn-filter. Burn is named after a trick in traditional dark-room photography that gave similar results.

阴影

The effect will mostly apply to dark tones.

中间色调

The effect will apply to mostly midtones.

高亮

This will apply the effect on the highlights only.

曝光量

The strength at which this filter is applied.

色阶

This filter allows you to directly modify the levels of the tone-values of an image, by manipulating sliders for highlights, midtones and shadows. You can even set an output and input range of tones for the image. A histogram is displayed to show you the tonal distribution. The default shortcut for levels filter is Ctrl + L .

This is very useful to do an initial cleanup of scanned lineart or grayscale images. If the scanned lineart is light you can slide the black triangle to right to make it darker or if you want to remove the gray areas you can slide the white slider to left.

Auto levels is a quick way to adjust tone of an image. If you want to change the settings later you can click on the Create Filter Mask button to add the levels as a filter mask.

颜色调整曲线

This filter allows you to adjust each channel by manipulating the curves. You can even adjust the alpha channel and the lightness channel through this filter. This is used very often by artists as a post processing filter to slightly heighten the mood of the painting by adjust the overall color. For example a scene with fire breathing dragon may be made more red and yellow by adjusting the curves to give it more warmer look, similarly a snowy mountain scene can be made to look cooler by adjusting the blues and greens. The default shortcut for this filter is Ctrl + M.

在 4.1 版更改: Since 4.1 this filter can also handle Hue and Saturation curves.

跨通道颜色调整

4.1 新版功能.

Sometimes, when you are adjusting the colors for an image, you want bright colors to be more saturated, or have a little bit of brightness in the purples.

The Cross-channel color adjustment filter allows you to do this.

At the top, there are two drop-downs. The first one is to choose which Channel you wish to modify. The Driver Channel drop down is what channel you use to control which parts are modified.

The curve, on the horizontal axis, represents the driver channel, while the vertical axis represent the channel you wish to modify.

So if you wish to increase the saturation in the lighter parts, you pick Saturation in the first drop-down, and Lightness as the driver channel. Then, pull up the right end to the top.

If you wish to desaturate everything but the teal/blues, you select Saturation for the channel and Hue for the driver. Then put a dot in the middle and pull down the dots on either sides.

亮度/对比度曲线

This filter allows you to adjust the brightness and contrast of the image by adjusting the curves.

4.0 版后已移除: These have been removed in Krita 4.0, because the Color Adjustment filter can do the same. Old files with brightness/contrast curves will be loaded as Color Adjustment curves

色彩平衡

This filter allows you to control the color balance of the image by adjusting the sliders for Shadows, Midtones and Highlights. The default shortcut for this filter is Ctrl + B .

去色

Image-wide desaturation filter. Will make any image Grayscale. Has several choices by which logic the colors are turned to gray. The default shortcut for this filter is Ctrl + Shift + U .

亮度

This will turn colors to gray using the HSL model.

Luminosity (ITU-R BT.709)

Will turn the color to gray by using the appropriate amount of weighting per channel according to ITU-R BT.709.

Luminosity (ITU-R BT.601)

Will turn the color to gray by using the appropriate amount of weighting per channel according to ITU-R BT.601.

平均测光

Will make an average of all channels.

Min

Subtracts all from one another to find the gray value.

Max

Adds all channels together to get a gray value

反相

This filter like the name suggests inverts the color values in the image. So white (1,1,1) becomes black (0,0,0), yellow (1,1,0) becomes blue (0,1,1), etc. The default shortcut for this filter is Ctrl + I.

自动对比度

Tries to adjust the contrast the universally acceptable levels.

HSV/HSL 调整

With this filter, you can adjust the Hue, Saturation, Value or Lightness, through sliders. The default shortcut for this filter is Ctrl + U .

阈值

A simple black and white threshold filter that uses sRGB luminosity. It’ll convert any image to a image with only black and white, with the input number indicating the threshold value at which black becomes white.

斜率、偏移、强度

A different kind of color balance filter, with three color selectors, which will have the same shape as the one used in settings.

This filter is particular useful because it has been defined by the American Society for Cinema as “ASC_CDL”, meaning that it is a standard way of describing a color balance method.

斜率

This represents a multiplication and determine the adjustment of the brighter colors in an image.

偏移量

This determines how much the bottom is offset from the top, and so determines the color of the darkest colors.

功率

This represents a power function, and determines the adjustment of the mid-tone to dark colors of an image.

艺术效果

The artistic filter are characterised by taking an input, and doing a deformation on them.

半调

The halftone filter is a filter that converts the colors to a halftone dot pattern.

色彩

The colors used to paint the pattern. The first is the color of the dots, the second the color of the background.

尺寸

The size of the cell in pixels. The maximum dot size will be using the diagonal as the cell size to make sure you can have pure black.

角

The angle of the dot pattern.

负片

This inverts the intensity calculated per dot. Thus, dark colors will give tiny dots, and light colors big dots. This is useful in combination with inverting the colors, and give a better pattern on glowy-effects.

抗锯齿

This makes the dots smooth, which is good for webgraphics. Sometimes, for print graphics, we want there to be no grays, so we turn off the anti-aliasing.

索引颜色

The index color filter maps specific user selected colors to the grayscale value of the artwork. You can see the example below, the strip below the black and white gradient has index color applied to it so that the black and white gradient gets the color selected to different values.

You can choose the required colors and ramps in the index color filter dialog as shown below

You can create index painting such as one shown below with the help of this filter

像素化

Makes the input-image pixely by creating small cells and inputting an average color.

雨滴

Adds random raindrop-deformations to the input-image.

油画

Does semi-posterisation to the input-image, with the ‘brush-size’ determining the size of the fields.

Brush-size

Determines how large the individual patches are. The lower, the more detailed.

Smoothness

Determines how much each patch’s outline is smoothed out.

色调分离

This filter decreases the amount of colors in an image. It does this per component (channel).

The Steps parameter determines how many colors are allowed per component.

模糊

The blur filters are used to smoothen out the hard edges and details in the images. The resulting image is blurry. below is an example of a blurred image. The image of Kiki on right is the result of blur filter applied to the image on left

There are many different filters for blurring:

高斯模糊

You can input the horizontal and vertical radius for the amount of blurring here.

运动模糊

Doesn’t only blur, but also subtly smudge an image into a direction of the specified angle thus giving a feel of motion to the image. This filter is often used to create effects of fast moving objects.

模糊

This filter creates a regular blur

镜头模糊

Lens Blur Algorithm.

色彩

Similar to the Adjust filters, the color filters are image wide color operations.

颜色转为透明度

This filter allows you to make one single color transparent (alpha). By default when you run this filter white is selected, you can choose a color that you want to make transparent from the color selector

The Threshold indicates how much other colors will be considered mixture of the removed color and non-removed colors. For example, with threshold set to 255, and the removed color set to white, a 50% gray will be considered a mixture of black+white, and thus transformed in a 50% transparent black.

This filter is really useful in separating line art from the white background.

颜色转移

This filter converts the colors of the image to colors from the reference image. This is a quick way to change a color combination of an artwork to an already saved image or a reference image.

最大化通道

This filter checks for all the channels of a each single color and set all but the highest value to 0.

最小化通道

This is reverse to Maximize channel, it checks all the channels of a each single color and sets all but the lowest to 0.

边缘检测

Edge detection filters focus on finding sharp contrast or border between colors in an image to create edges or lines.

Since 4.0 there are only two edge detection filters.

边缘检测

4.0 新版功能.

A general edge detection filter that encapsulates all other filters. Edge detection filters that were separate before 4.0 have been folded into this one. It is also available for filter layers and filter brushes.

From left to right: Original, with prewitt edge detection applied, with prewitt edge detection applied and result applied to alpha channel, and finally the original with an edge detection filter layer with the same settings as 3, and the filter layer blending mode set to multiply

公式

The convolution kernel formula for the edge detection. The difference between these is subtle, but still worth experimenting with.

简洁

A Kernel that is not square unlike the other two, and while this makes it fast, it doesn’t take diagonal pixels into account.

Prewitt

A square kernel that includes the diagonal pixels just as strongly as the orthogonal pixels. Gives a very strong effect.

Sobol

A square kernel that includes the diagonal pixels slightly less strong than the orthogonal pixels. Gives a more subtle effect than Prewitt.

输出

The output.

所有边缘

Convolves the edge detection into all directions and combines the result with the Pythagorean theorem. This will be good for most uses.

顶部边缘

This only detects changes going from top to bottom and thus only has top lines.

底部边缘

This only detects changes going from bottom to top and thus only has bottom lines.

右边缘

This only detects changes going from right to left and thus only has right lines.

左边缘

This only detects changes going from left to right and thus only has left lines.

以弧度表示的方向

This convolves into all directions and then tries to output the direction of the line in radians.

Horizontal/Vertical radius

The radius of the edge detection. Default is 1 and going higher will increase the thickness of the lines.

Apply result to Alpha Channel.

The edge detection will be used on a grayscale copy of the image, and the output will be onto the alpha channel of the image, meaning it will output lines only.

高度贴图转法线贴图

4.0 新版功能.

A filter that converts Height maps to Normal maps through the power of edge detection. It is also available for the filter layer or filter brush.

公式

The convolution kernel formula for the edge detection. The difference between these is subtle, but still worth experimenting with.

简洁

A Kernel that is not square unlike the other two, and while this makes it fast, it doesn’t take diagonal pixels into account.

Prewitt

A square kernel that includes the diagonal pixels just as strongly as the orthogonal pixels. Gives a very strong effect.

Sobol

A square kernel that includes the diagonal pixels slightly less strong than the orthogonal pixels. Gives a more subtle effect than Prewitt.

声道

Which channel of the layer should be interpreted as the grayscale heightmap.

Horizontal/Vertical radius

The radius of the edge detection. Default is 1 and going higher will increase the strength of the normal map. Adjust this if the effect of the resulting normal map is too weak.

XYZ

An XYZ swizzle, that allows you to map Red, Green and Blue to different 3d normal vector coordinates. This is necessary mostly for the difference between Mikkt-space normal maps (+X, +Y, +Z) and the OpenGL standard normal map (+X, -Y, +Z).

浮雕

Filters that are named by the traditional embossing technique. This filter generates highlight and shadows to create an effect which makes the image look like embossed. Emboss filters are usually used in the creation of interesting GUI elements, and mostly used in combination with filter-layers and masks.

仅水平浮雕

Only embosses horizontal lines.

全方向浮雕

Embosses in all possible directions.

浮雕 (拉普拉斯)

Uses the laplacian algorithm to perform embossing.

仅垂直浮雕

Only embosses horizontal lines.

可变深度浮雕

Embosses with a depth that can be set through the dialog box shown below.

水平和垂直浮雕

Only embosses horizontal and vertical lines.

图像增强

These filters all focus on reducing the blur in the image by sharpening and enhancing details and the edges. Following are various sharpen and enhance filters in provided in Krita.

锐化

均值移除

USM 锐化

Gaussian Noise reduction

小波降噪器

贴图

Filters that are signified by them mapping the input image.

拼贴

Tiles the input image, using its own layer as output.

凹凸贴图和法线贴图

Uses the input image as a height-map to output a 3d something, using the phong-lambert shading model. Useful for checking one’s height maps during game texturing. Checking the Normal Map box will make it use all channels and interpret them as a normal map.

圆角

Adds little corners to the input image.

归一化

This filter takes the input pixels, puts them into a 3d vector, and then normalizes (makes the vector size exactly 1) the values. This is helpful for normal maps and some minor image-editing functions.

渐变贴图

Maps the lightness of the input to the selected gradient. Useful for fancy artistic effects.

In 3.x you could only select predefined gradients. In 4.0, you can select gradients and change them on the fly, as well as use the gradient map filter as a filter layer or filter brush.

其他

Filters signified by them not fitting anywhere else.

波浪

Adds a cute little wave-distortion effect to the input image.

随机噪点

Gives Random Noise to input image.

随机拾取

Adds a little pixely-fringe to the input image.

子波分解

Wavelet decompose uses wavelet scales to turn the current layer into a set of layers with each holding a different type of pattern that is visible within the image. This is used in texture and pattern making to remove unwanted noise quickly from a texture.

You can find it under Layers.

When you select it, it will ask for the amount of wavelet scales. More scales, more different layers. Press OK, and it will generate a group layer containing the layers with their proper blending modes:

Adjust a given layer with middle gray to neutralize it, and merge everything with the Grain Merge blending mode to merge it into the end image properly.

即时预览功能

Instant Preview (previously known under the code name Level Of Detail/LOD strokes) is Krita’s special speed-up mechanism that was funded by the 2015 Kickstarter. Krita slows down with really large images due to the large amount of data it’s crunching in painting these images. Instant Preview works by taking a smaller version of the canvas, and drawing the feedback on there while Krita calculates the real stroke in the background. This means that if you have a 4k screen and are working on a 4k image at 100% zoom, you won’t feel any speed up.

启用即时预览功能

警告

Instant Preview requires OpenGL 3.0 support at minimum. So if you don’t have high-quality scaling available in Settings ‣ Configure Krita ‣ Display ‣ Display scaling filter, then you won’t be able to use Instant Preview either.

The Global Instant Preview toggle is under the view menu

Instant Preview is activated in two places: The view menu (Shift + L), and the settings of the given paintop by default. This is because Instant Preview has different limitations with different paint operations.

For example, the overlay mode in the color smudge brush will disable the ability to have Instant Preview on the brush, so does using ‘fade’ sensor for size.

Similarly, the auto-spacing, fuzzy sensor in size, use of density in brush-tip and the use of texture paintops will make it more difficult to determine a stroke, and thus will give a feeling of ‘popping’ when the stroke is finished.

When you check the brush settings, the Instant Preview checkbox will have a * behind it. Hovering over it will give you a list of options that are affecting the Instant Preview mode.

4.0 新版功能: mouseleft this pop-up will give a slider, which can be used to determine the threshold size at which instant preview activates. By default this 100px. This is useful for brushes that are optimised to work on small sizes.

The Instant Preview checkbox at the bottom of the brush settings editor will give you feedback when there’s settings active that can’t be previewed right. Hover over it to get more detail. In this case, the issue is that auto-spacing is on.

即时预览受益工具

The following tools benefit from Instant Preview:

The Freehand brush tool.

The geometric tools.

The Move Tool.

The Filters.

动画.

Krita 随附笔刷预设介绍

Krita comes with a large collection of brush presets. This collection was designed with many considerations:

Help the beginner and the advanced user with brushes that are ready-to-use.

Propose tools for the various ways Krita is used: Comic inking and coloring, Digital Painting, Mate Painting, Pixel Art, 3D texturing.

Show a sample of what the brush engines can do.

This page illustrates and describes the included default brush presets in Krita 4.

橡皮擦

The large one is for removing large portions of a layer (eg. a full character)

The small one is designed to use when drawing thin lines or inking. It has a very specific shape so you will notice with the square shape of your cursor you are in eraser-mode.

The soft one is used to erase or fade out the part of a drawing with various levels of opacity.

基础笔刷

The basic brush family all use a basic circle for the brush tip with a variation on opacity, flow or size. They are named Basic because brushes of this type are the fundamental stones of every digital painting program. These brushes will work fast since they use simple properties.

铅笔

These presets tends to emulate the effect of pencil on paper. They all have a thin brush that uses a paper-texture. Some focus on being realistic to help with correcting a pencil scan. Some focus more on showing the effects on your computer monitor. The two last (Tilted/Quick Shade) assist the artist to obtain specific effects; like quickly shading a large area of the drawing without having to manually crosshatch a lot of lines.

描线

For the black & white illustrator or the comic artist. The Inking brushes help you produce line art and high contrast illustrations.

Ink Precision: A thin line designed to take notes or draw tiny lines or details.

Ink Fineliner: A preset with a regular width to trace panels, technical details, or buildings.

Ink GPen: A preset with a dynamic on size to ink smoothly.

Ink Pen Rough: A preset for inking with a focus on having a realistic ink line with irregularities (texture of the paper, fiber of paper absorption).

Ink Brush Rough: A brush for inking with also a focus on getting the delicate paper texture appearing at low pressure, as if the brush slightly touch paper.

Ink Sumi-e: A brush with abilities at revealing the thin texture of each bristle, making the line highly expressive.

马克笔

A small category with presets simulating a marker with a slight digital feeling to them.

干画笔

The Dry Painting category is full set of brushes that appear like bristles. They do not interact with the color already on the canvas; that’s why they are called “dry”. They work as if you were painting on a dry artwork: the color replace, or overlay/glaze over the previous painting stroke. This brush emulates techniques that dry quickly as tempera or acrylics.

带纹理干画笔

Almost the same family as the previous one, except these brush presets lay down a textured effect. They simulate the painting effect you can obtain with very thick painting on a brush caressing a canvas with fabric texture. This helps to build painterly background or add life in the last bright touch of colors.

粉笔、蜡笔和炭笔

Still part of the dry family. These brushes focus on adding texture to the result. The type of texture you would obtain by using a dry tool such as chalk, charcoal or pastel and rubbing a textured paper.

湿画笔

This family of brushes is wet in a sense they all interact with the color on the canvas. It triggers the feeling of having a wet artwork and mixing color at the same time. The category has variations with bristle effects or simple rounded brushes.

水彩

Simulating real watercolors is highly complex. These brushes only partially simulate the watercolor texture. Don’t expect crazy pigment diffusion because these brushes are not able to do that. These brushes are good at simulating a fringe caused by the pigments and various effects.

混色笔刷

These brushes don’t paint any colors. They interact with the color you already have on the canvas. Don’t expect them to have any effect on a white page. All these presets give a different result with how they smudge or smear. It helps to blend colors, blur details, or add style on a painting. Smearing pixels can help with creating smoke and many other effects.

调整笔刷

This family of airbrushes has variations on the blending modes. Different blending modes will give different results depending on the effect you are trying to achieve.

Color - Can help to re-color or desaturate a part of your artwork. It changes only the hue and saturation, not the value, of the pixels.

Dodge - Will assist you in creating effects such as neon or fire.

Lighten - Brightens only the area with the selected color: a good brush to paint depth of field (sfumato) and fog.

Multiply - Darkens all the time. A good brush to create a quick vignette effect around an artwork, or to manage big part in shadow.

Overlay - Burn helps to boost the contrast and overlay color on some areas.

形状

Painting with ready-made shapes can help concept artists create happy-accidents and stimulate the imagination. The Shape Fill tool is a bit specific: you can draw a silhouette of shape and Krita fills it in real time. Painting shapes over an area helps fill it with random details. This is useful before painting over with more specific objects.

像素画

You might believe this section is specific to pixel-artist, but in many situations dealing with specific pixels are needed to make corrections and adjustments even on normal paintings. A thin 1px brush can be used to trace guidelines. A brush with aliasing is also perfect to fix the color island created by the Coloring-mask feature.

实验笔刷

When categorizing brushes, there is always a special or miscellaneous category. In this family of brushes you’ll find the clone brush along with brushes to move, grow, or shrink specific areas.

法线贴图笔刷

Useful for 3D programs and texture artists. If your tablet supports tilting and rotation this brush will allow you to paint on your normal map using your brush rotation and orientation. You can “sculpt” your details in the texture with the different colors. Each color will map to an angle that is used for 3D lighting. It works well on pen-tablet display (tablet with a screen) as you can better sync the rotation and tilting of your stylus with the part of the normal map you want to paint.

滤镜笔刷

Krita can apply many of its filters on a brush thanks to the filter brush engine. The result is usually not efficient and slow, but a good demo of the ability of Krita.

纹理笔刷

Adding textures is not only useful for the 3D artist or video-game artist: in many artworks you’ll save a lot of time by using brushes with random patterns.

印章笔刷

The stamps are a bit similar to the texture category. Stamps often paint a pattern that is easier to recognize than if you tried to paint it manually. The results appear more as decorations than for normal painting methods.

图层和蒙版

Layers are a central concept in digital painting.

With layers you can get better control over your artwork, for example you can color an entire artwork just by working on the separate color layer and thereby not destroying the line art which will reside above this color layer.

Furthermore, layers allow you to change the composition easier, and mass transform certain elements at once.

Masks on the other hand allow you to selectively apply certain effects on a layer, like transparency, transformation and filters.

Check the 图层和蒙版使用入门 for more information.

克隆图层

文件图层

填充图层

滤镜图层

滤镜蒙版

分组图层

图层样式

颜料图层

选区蒙版

变形蒙版

透明度蒙版

矢量图层

克隆图层

A clone layer is a layer that keeps an up-to-date copy of another layer. You cannot draw or paint on it directly, but it can be used to create effects by applying different types of layers and masks (e.g. filter layers or masks).

克隆图层用例

For example, if you were painting a picture of some magic person and wanted to create a glow around them that was updated as you updated your character, you could:

Have a Paint Layer where you draw your character

Use the Clone Layer feature to create a clone of the layer that you drew your character on

Apply an HSV filter mask to the clone layer to make the shapes on it white (or blue, or green etc.)

Apply a blur filter mask to the clone layer so it looks like a “glow”

As you keep painting and adding details, erasing on the first layer, Krita will automatically update the clone layer, making your “glow” apply to every change you make.

文件图层

File Layers are references to files outside of the document: If the referenced document updates, the file layer will update. Do not remove the original file on your computer once you add it to Krita. Deleting your original image will break the file layer. If Krita cannot find the original file, it’ll ask you where to find it. File layers cannot display animations.

File Layers have the following scaling options:

无缩放

This’ll import the file layer with the full pixel-size.

缩放至图像大小

Scales the file layer to fit exactly within the canvas boundaries of the image.

Adapt to image resolution

If the imported layer and the image have a different resolution, it’ll scale the filelayer by scaling its resolution. In other words, import a 600dpi A4 image onto a 300dpi A4 image, and the filelayer will be scaled to fit precisely on the 300dpi image. Useful for comics, where the ink-layer is preferred to be at a higher resolution than the colors.

File Layers can currently not be painted on. If you want to transform a file layer, you need to apply a transformation mask to it and use that.

3.3 新版功能: In the layerdocker, next to the file layer only, there’s a little folder icon. Pressing that will open the file pointed at in Krita if it hadn’t yet. Using the properties you can make the file layer point to a different file.

4.0 新版功能: You can turn any set of layers into a file layer by right-clicking them and doing Convert ‣ to File Layer. It will then open a save prompt for the file location and when done will save the file and replace the layer with a file layer pointing at that file.

填充图层

A Fill Layer is a special layer that Krita generates on-the-fly that can contain either a pattern or a solid color.

花式

This fills the layer with a predefined pattern or texture that has been loaded into Krita through the Resource Management interface. Patterns can be a simple and interesting way to add texture to your drawing or painting, helping to recreate the look of watercolor paper, linen, canvas, hardboard, stone or an infinite other number of options. For example if you want to take a digital painting and finish it off with the appearance of it being on canvas you can add a Fill Layer with the Canvas texture from the texture pack below and set the opacity very low so the “threads” of the pattern are just barley visible. The effect is quite convincing.

You can create your own and use those as well. For a great set of well designed and useful patterns check out one of our favorite artists and a great friend of Krita, David Revoy’s free texture pack (http://www.davidrevoy.com/article156/texture-pack-1).

彩色

The second option is not quite as exciting, but does the job. Fill the layer with a selected color.

在填充图层上作画

A fill-layer is a single-channel layer, meaning it only has transparency. Therefore, you can erase and paint on fill-layers to make them semi-opaque, or for when you want to have a particular color only. Being single channel, fill-layers are also a little bit less memory-consuming than regular 4-channel paint layers.

滤镜图层

Filter layers show whatever layers are underneath them, but with a filter such as Layer Styles, Blur, Levels, Brightness / Contrast. For example, if you add a Filter Layer, and choose the Blur filter, you will see every layer under your filter layer blurred.

Unlike applying a filter directly on to a section of a Paint Layer, Filter Layers do not actually alter the original image in the Paint Layers below them. Once again, non-destructive editing! You can tweak the filter at any time, and the changes can always be altered or removed.

Unlike Filter Masks though, Filter Layers apply to the entire canvas for the layers beneath. If you wish to apply a filter layer to only some layers, then you can utilize the Group Layer feature and add those layers into a group with the filter layer on top of the stack.

You can edit the settings for a filter layer, by double clicking on it in the Layers docker.

注解

Only Krita native filters (the ones in the Filters menu) can be used with Filter Layers. Filter Layers are not supported using the externally integrated G’Mic filters.

滤镜蒙版

Filter masks show an area of their layer with a filter (such as blur, levels, brightness / contrast etc.). For example, if you select an area of a paint layer and add a Filter Layer, you will be asked to choose a filter. If you choose the blur filter, you will see the area you selected blurred.

With filter masks, we can for example make this ghost-lady more ethereal by putting a clone layer underneath, and setting a lens-blur filter on it.

Set the blending mode of the clone layer to Color Dodge and she becomes really spooky!

Unlike applying a filter to a section of a paint layer directly, filter masks do not permanently alter the original image. This means you can tweak the filter (or the area it applies to) at any time. Changes can always be altered or removed.

Unlike filter layers, filter masks apply only to the area you have selected (the mask).

You can edit the settings for a filter mask at any time by double clicking on it in the Layers docker. You can also change the selection that the filter mask affects by selecting the filter mask in the Layers docker and then using the paint tools in the main window. Painting white includes the area, painting black excludes it, and all other colors are turned into a shade of gray which applies proportionally.

分组图层

While working in complex artwork you’ll often find the need to group the layers or some portions and elements of the artwork in one unit. Group layers come in handy for this, they allow you to make a segregate the layers, so you can hide these quickly, or so you can apply a mask to all the layers inside this group as if they are one, you can also recursively transform the content of the group… Just drag the mask so it moves to the layer. They are quickly made with Ctrl + G.

A thing to note is that the layers inside a group layer are considered separately when the layer gets composited, the layers inside a group are separately composited and then this image is taken in to account when compositing the whole image, while on the contrary, the groups in Photoshop have something called pass-through mode which makes the layer behave as if they are not in a group and get composited along with other layers of the stack. The recent versions of Krita have pass-through mode you can enable it to get similar behavior

图层样式

Layer styles are effects that are added on top of your layer. They are editable and can easily be toggled on and off. To add a layer style to a layer go to Layer ‣ Layer Style. You can also right-click a layer to access the layer styles.

When you have the layer styles window up, make sure that the Enable Effects item is checked.

There are a variety of effects and styles you can apply to a layer. When you add a style, your layer docker will show an extra “Fx” icon. This allows you to toggle the layer style effects on and off.

注解

This feature was added to increase support for Adobe Photoshop. The features that are included mirror what that application supports.

颜料图层

Paint layers are the most commonly used type of layers used in digital paint or image manipulation software like Krita. If you’ve ever used layers in Photoshop or the Gimp, you’ll be used to how they work. In short, a paint layer, also called a pixel, bitmap or raster layer, is a bitmap image (an image made up of many points of color).

Paint layers let you apply many advanced effects such as smearing, smudging and distorting. This makes them the most flexible type of layer. However, paint layers don’t scale well when enlarged (they pixelate), and any effects that have been applied can’t be edited.

To deal with these two drawbacks, digital artists will typically work at higher Pixel Per Inch (PPI) counts. It is not unusual to see PPI settings of 400 to 600 PPI for a canvas with a good amount of detail. To combat the issue of applied effects that cannot be edited it is best to take advantage of the non-destructive layer capabilities of filter, transparency and transform masks.

As long as you have enough resolution / size on your canvas though, and as long as you aren’t going to need to go back and tweak an effect you created previously, then a paint layer is usually the type of layer you will want. If you click on the New layer icon in the layers docker you’ll get a paint layer. Of course you can always choose the New layer drop-down to get another type.

The hotkey for adding a new paint layer is Ins.

选区蒙版

Local Selection masks let you remember and recall edit a selection on a layer. They work in a similar way to extra channels in other image editing programs. One difference is Krita's ability to assign them to specific layers and activate a selection with a single click on the layer. Just click the round icon with the dotted outline on the local selection layer in the Layers docker.

You can make them by making a selection, and mouseright the layer you want to add it to select Local Selection

When isolating a selection mask with Alt + mouseleft, you can perform transformation, deformation and paint operations on the selection layer, modifying the selection.

A single layer can contain multiple Local Selection Masks. Repeating. A single layer can contain multiple Local Selection Masks (LSM). This is important because it means that you can, for instance, have several different outline parts of an image and save each as its own LSM and then recall it with a single click. Without using LSM you would have to create layer upon layer for each mask. Not only would this be inefficient for you but also for Krita and the program would slow down trying to keep up with it all. LSM’s are one of the most important features in Krita!

The example below shows three LSM items all attached (under) Layer1. Any of these can be activated and used at any time.

全局选区

You can modify the global selection the same way you can with a local-selection. To do so, you first need to activate the global selection as a layer node. To do so, go into Select ‣ Show Global Selection Mask. The global selection, if you have anything selected, will now appear on the top of the layer stack as a selection mask.

变形蒙版

Rather than working with a brush to affect the mask, transformation masks allow you to transform (move, rotate, shear, scale and perspective) a layer without applying the transform directly to the paint layer and making it permanent.

In the same way that Filter and Transparency Masks can be attached to a Paint layer and are non-destructive, so too can the Transformation Mask.

添加变形模板

First add a transform mask to an existing layer.

Select the transformation tool.

Select any of the transform modes in the Tools Options dock and, with the transform mask selected, apply them on the layer.

Hit apply.

Toggle the transform visibility to see the difference between the original and the transform applied.

注解

Affine transforms, like Move, Rotate, Shear, Scale and Perspective get updated instantly once the original is updated. Other transforms like Warp, Cage and Liquify take up much more processing power, and to not to waste that, Krita only updates those every three seconds.

To edit a transform, select the transform mask, and try to use the transform tool on the layer. The transform mode will be the same as the stored transform, regardless of what transform you had selected. If you switch transform modes, the transformation will be undone.

透明度蒙版

The Transparency mask allows you to selectively show or hide parts of a layer. By using a mask, you are able to avoid deleting parts of an image that you just might want in the future. This allows you to work non-destructively.

In addition, it allows you to do things like remove a portion of a layer in the layer stack so you can see what’s behind it. One example would be if you wanted to replace a sky, but were unsure of how much you wanted to replace.

如何添加透明度蒙版

Click on a paint layer in the layers docker.

Click on “+” drop-down in the bottom left corner of the layers docker and choose Transparency Mask.

Use your preferred paint tool to paint on the canvas. Black paints transparency (see-through), white paints opacity (visible). Gray values paint semi-transparency.

You can always fine-tune and edit what you want visible and any layer. If you discover you’ve hidden part of your paint layer accidentally, you can always show it again just by painting white on your transparency mask.

This makes for a workflow that is extremely flexible and tolerant of mistakes.

矢量图层

警告

This page is outdated. Check 矢量图形 for a better overview.

矢量图层是什么

A Vector Layers, also known as a shape layer, is a type of layers that contains only vector elements.

This is how vector layers will appear in the Krita Layers docker.

It shows the vector contents of the layer on the left side. The icon showing the page with the red bookmark denotes that it is a vector layer. To the right of that is the layer name. Next are the layer visibility and accessibility icons. Clicking the “eye” will toggle visibility. Clicking the lock into a closed position will lock the content and editing will no longer be allowed until it is clicked again and the lock on the layer is released.

创建矢量图层

You can create a vector layer in two ways. Using the extra options from the “Add Layer” button you can click the “Vector Layer” item and it will create a new vector layer. You can also drag a rectangle or ellipse from the Add shape dock onto an active Paint Layer. If the active layer is a Vector Layer then the shape will be added directly to it.

在矢量图层上编辑形状

警告

There’s currently a bug with the vector layers that they will always consider themselves to be at 72dpi, regardless of the actual pixel-size. This can make manipulating shapes a little difficult, as the precise input will not allow cm or inch, even though the vector layer coordinate system uses those as a basis.

Basic Shape Manipulation

To edit the shape and colors of your vector element, you will need to use the basic shape manipulation tool.

Once you have selected this tool, click on the element you want to manipulate and you will see guides appear around your shape.

There are four ways to manipulate your image using this tool and the guides on your shape.

Transform/Move

This feature of the tool allows you to move your object by clicking and dragging your shape around the canvas. Holding Ctrl will lock your moves to one axis.

Size/Stretch

This feature of the tool allows you to stretch your shape. Selecting a midpoint will allow stretching along one axis. Selecting a corner point will allow stretching across both axis. Holding Shift will allow you to scale your object. Holding Ctrl will cause your manipulation to be mirrored across your object.

旋转

This feature of the tool will allow you to rotate your object around its center. Holding Ctrl will cause your rotation to lock to 45 degree angles.

歪斜

This feature of the tool will allow you to skew your object.

注解

At the moment there is no way to scale only one side of your vector object. The developers are aware that this could be useful and will work on it as manpower allows.

控制点和曲线形状控制

Double-click on a vector object to edit the specific points or curves which make up the shape. Click and drag a point to move it around the canvas. Click and drag along a line to curve it between two points. Holding Ctrl will lock your moves to one axis.

描边和填充

In addition to being defined by points and curves, a shape also has two defining properties: Fill and Stroke. Fill defines the color, gradient, or pattern that fills the space inside of the shape object. ‘Stroke’ defines the color, gradient, pattern, and thickness of the border along the edge of the shape. These two can be edited using the Stroke and Fill dock. The dock has two modes. One for stroke and one for fill. You can change modes by clicking in the dock on the filled square or the black line. The active mode will be shown by which is on top of the other.

Here is the dock with the fill element active. Notice the red line across the solid white square. This tells us that there is no fill assigned therefore the inside of the shape will be transparent.

Here is the dock with the stroke element active.

Editing Stroke Properties

The stroke properties dock will allow you to edit a different aspect of how the outline of your vector shape looks.

The style selector allows you to choose different patterns and line styles. The width option changes the thickness of the outline on your vector shape. The cap option changes how line endings appear. The join option changes how corners appear.

The Miter limit controls how harsh the corners of your object will display. The higher the number the more the corners will be allowed to stretch out past the points. Lower numbers will restrict the stroke to shorter and less sharp corners.

Editing Fill Properties

All of the fill properties are contained in the Stroke and Fill dock.

The large red X button will set the fill to none causing the area inside of the vector shape to be transparent.

To the right of that is the solid square. This sets the fill to be a solid color which is displayed in the long button and can be selected by pressing the arrow just to the right of the long button. To the right of the solid square is the gradient button. This will set the fill to display as a gradient. A gradient can be selected by pressing the down arrow next to the long button.

Under the X is a button that shows a pattern. This inside area will be filled with a pattern. A pattern can be chosen by pressing the arrows next to the long button. The two other buttons are for fill rules: the way a self-overlapping path is filled.

The button with the inner square blank toggles even-odd mode, where every filled region of the path is next to an unfilled one, like this:

The button with the inner square filled toggles non zero mode, where most of the time a self overlapping path is entirely filled except when it overlaps with a sub-path of a different direction that ‘decrease the level of overlapping’ so that the region between the two is considered outside the path and remain unfilled, like this:

For more (and better) information about fill rules check the Inkscape manual [http://tavmjong.free.fr/INKSCAPE/MANUAL/html/Attributes-Fill-Stroke.html#Attributes-Fill-Rule].

Linux 命令行指令

As a native Linux program, Krita allows you to do operations on images without opening the program when using the Terminal. This option was disabled on Windows and OSX, but with 3.3 it is enabled for them!

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

导出

This allows you to quickly convert files via the terminal:

krita importfilename --export --export-filename exportfilename

importfilename

Replace this with the filename of the file you want to manipulate.

--export

Export a file selects the export option.

--exportfilename

Exportfilename says that the following word is the filename it should be exported to.

Replace this with the name of the output file. Use a different extension to change the file format.

示例：

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

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

PDF 导出

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

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

export-pdf exports the file file.png as a pdf file.

警告

This has been removed from 3.1 because the results were incorrect.

在自定义屏幕 DPI 下面打开

Open Krita with specified Screen DPI.

--dpi <dpiX,dpiY>

Open Krita with specified Screen DPI.

For example:

krita --dpi <72,72>

打开模板

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 immediately!

krita --template templatename.desktop

--template templatename.desktop

Selects the template option

All templates are saved with the .desktop extension. You can find templates in the .local/share/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 separate documents.

启动参数

--nosplash

starts krita without showing the splash screen.

--canvasonly

starts krita in canvasonly mode.

--fullscreen

starts krita in fullscreen mode.

--workspace Workspace

starts krita with the given workspace. So for example…

`` krita –workspace Animation``

Starts Krita in the Animation workspace.

数位板支持列表

本表专门针对 Windows 环境的支持情况，不适用于 Linux 或者 OSX。

品牌 | 型号 | 支持情况
Adesso | CyberTablet T12 | ❓ 未知情况
Adesso | CyberTablet Z12 | ❓ 未知情况
Adesso | CyberTablet T10 | ❓ 未知情况
Adesso | CyberTablet T22HD | ❓ 未知情况
Adesso | CyberTablet M14 | ❓ 未知情况
Adesso | CyberTablet W10 | ❓ 未知情况
Adesso | CyberTablet Z8 | ✔️ 推测正常工作
Aiptek | HyperPen Mini | ❓ 未知情况
Aiptek | MediaTablet 10000u | ❓ 未知情况
Aiptek | MediaTablet 14000u | ❓ 未知情况
Aiptek | MediaTablet Ultimate II | ❓ 未知情况
Aiptek | MyNote Bluetooth | ❓ 未知情况
Aiptek | MyNote Pen | ❓ 未知情况
Aiptek | SlimTablet 600u Premium II | ❓ 未知情况
Artisul | (由 UC-Logic 生产) D13 | ❌ 有报告称不工作
Artisul | (由 UC-Logic 生产) D10 | ❌ 有报告称不工作
Artisul | (由UC-Logic 生产) Pencil (S/M) | ❌ 有报告称不工作
Bosto | 22HDX | ❌ 有报告称不正常
Bosto | 22UX | ❌ 有报告称不正常
Bosto | 22HD Mini | ❌ 有报告称不正常
Bosto | 22U Mini | ❓ 未知情况
Bosto | 14WX | ❓ 未知情况
Bosto | 13HD | ❓ 未知情况
CalComp | DrawingBoard VI | ❓ 未知情况
CalComp | Creation Station | ❓ 未知情况
CalComp | SummaSketch | ❓ 未知情况
Dynalink | FreeDraw 4x5 | ❓ 未知情况
Elmo | CRA-1 wireless tablet | ❓ 未知情况
高漫 | S56K | ❓ 未知情况
高漫 | GM185 | ❓ 未知情况
高漫 | M10K | ❓ 未知情况
高漫 | P1560 | ✔️ 推测正常工作
Genius | EasyPen | ❓ 未知情况
Genius | EasyPen 340 | ❓ 未知情况
Genius | EasyPen F610E | ❓ 未知情况
Genius | EasyPen i405 | ❓ 未知情况
Genius | EasyPen i405X | ❓ 有报告称在 Linux 下仅支持 2.9.x 版本
Genius | EasyPen i405XE | ❓ 未知情况
Genius | EasyPen M406 | ❓ 未知情况
Genius | EasyPen M406W | ❓ 未知情况
Genius | EasyPen M406WE | ❓ 未知情况
Genius | EasyPen M406XE | ❓ 未知情况
Genius | EasyPen M506 | ❓ 未知情况
Genius | EasyPen M506A | ❓ 未知情况
Genius | EasyPen M508W | ❓ 未知情况
Genius | EasyPen M610 | ❌ 有报告称不正常
Genius | EasyPen M610X | ❓ 未知情况
Genius | EasyPen M610XA | ❓ 未知情况
Genius | G-Pen 340 | ❓ 未知情况
Genius | G-Pen 450 | ❓ 未知情况
Genius | G-Pen 560 | ❓ 未知情况
Genius | G-Pen F350 | ❓ 未知情况
Genius | G-Pen F509 | ❓ 未知情况
Genius | G-Pen F610 | ❓ 未知情况
Genius | G-Pen M609 | ❓ 未知情况
Genius | G-Pen M609X | ❓ 未知情况
Genius | G-Pen M712 | ❓ 未知情况
Genius | G-Pen M712X | ❓ 未知情况
Genius | MousePen 8x6 | ❓ 未知情况
Genius | MousePen i608 | ❓ 未知情况
Genius | MousePen i608X | ❓ 未知情况
Genius | MousePen i608XE | ❓ 未知情况
Genius | MousePen M508 | ❓ 未知情况
Genius | MousePen M508W | ❓ 未知情况
Genius | MousePen M508X | ❓ 未知情况
Genius | MousePen M508XA | ❓ 未知情况
Genius | PenSketch 9x12 | ❓ 未知情况
Genius | PenSketch M912 | ❌ 有报告称不正常
Genius | PenSketch T609A | ❓ 未知情况
Genius | WizardPen 5x4 | ❓ 未知情况
汉王 | ESP2210 | ❓ 未知情况
汉王 | HW-S05 | ❓ 未知情况
汉王 | Sell T&Mouse | ❓ 未知情况
汉王 | Sell Writing Tablet (SuperPen 0403) | ❓ 未知情况
汉王 | Sell Writing Tablet (SuperPen 0503) | ❓ 未知情况
汉王 | Sell Painting Master (0504) | ❓ 未知情况
汉王 | Sell Painting Master (0605) | ❓ 未知情况
汉王 | Sell Painting Master (0806) | ❌ 有报告称不正常
绘王 (Huion) / Turcom | H420 | ✔️ 推测正常工作
绘王 (Huion) / Turcom | W58 | ✔️ 推测正常工作
绘王 (Huion) / Turcom | 680TF | ✔️ 推测正常工作
绘王 (Huion) / Turcom | G10T | ✔️ 推测正常工作
绘王 (Huion) / Turcom | H610 | ✔️ 支持
绘王 (Huion) / Turcom | H610PRO | ✔️ 支持
绘王 (Huion) / Turcom | H690 | ✔️ 推测正常工作
绘王 (Huion) / Turcom | WH1409 | ✔️ 支持
绘王 (Huion) / Turcom | 1060Plus | ✔️ 推测正常工作
绘王 (Huion) / Turcom | New 1060Plus | ✔️ 推测正常工作
绘王 (Huion) / Turcom | K26 | ✔️ 推测正常工作
绘王 (Huion) / Turcom | K58 | ✔️ 推测正常工作
绘王 (Huion) / Turcom | W58 | ✔️ 推测正常工作
绘王 (Huion) / Turcom | 680S | ✔️ 推测正常工作
绘王 (Huion) / Turcom | P608N | ✔️ 推测正常工作
绘王 (Huion) / Turcom | H58L | ✔️ 推测正常工作
绘王 (Huion) / Turcom | DWH96 | ✔️ 推测正常工作
绘王 (Huion) / Turcom | G-T156HD (KAMVAS) | ✔️ 推测正常工作
绘王 (Huion) / Turcom | GT-185 | ✔️ 推测正常工作
绘王 (Huion) / Turcom | GT-190 | ✔️ 推测正常工作
绘王 (Huion) / Turcom | GT-191 (KAMVAS) | ❓ 有报告称在 Linux 下需要安装“实验性用户空间驱动程序” <https://github.com/benthor/HuionKamvasGT191LinuxDriver>`_
绘王 (Huion) / Turcom | GT-220 | ✔️ 推测正常工作
绘王 (Huion) / Turcom | PC185HD | ✔️ 支持
绘王 (Huion) / Turcom | PC2150 | ✔️ 推测正常工作
绘王 (Huion) / Turcom | Inspiroy Q11K | ✔️ 支持
KB Gear | JamStudio | ❓ 未知情况
KB Gear | Pablo Internet Edition | ❓ 未知情况
KB Gear | Sketchboard Studio | ❓ 未知情况
微软 (Microsoft) | Surface Pro Surface Pro 2 | ✔️ 支持
微软 (Microsoft) | Surface Pro 3 Surface Pro 4 Surface Studio Surface Pro (2017) Surface Laptop | ✔️ 支持
Monoprice | 8x6” | ❓ 未知情况
Monoprice | MP1060-HA60 (10x6.25”) | ❓ 未知情况
Monoprice | 10x6.25” (110594) | ❓ 未知情况
Monoprice | 8x6” MP Select Professional | ❓ 未知情况
Monoprice | “8x6”” MP Select Professional with Quick Select Wheel” | ❓ 未知情况
Monoprice | 12x9” (106815) | ❓ 有报告称能工作但存在问题
Monoprice | MP 22-inch (114481) | ❓ 未知情况
Parblo | A610 | ❌ 有报告称不正常
Parblo | Bay B960 | ❓ 未知情况
Parblo | GT19 | ❓ 未知情况
Parblo | GT22HD | ❓ 未知情况
Parblo | Coast22 | ❓ 未知情况
Parblo | Coast10 | ❓ 未知情况
Parblo | Island A609 | ❓ 有报告称能工作，但数位板硬件低劣，不推荐使用
蒙恬 (PenPower) | TOOYA Master | ❓ 未知情况
蒙恬 (PenPower) | TOOYA X | ❓ 未知情况
蒙恬 (PenPower) | Monet | ❓ 未知情况
蒙恬 (PenPower) | Picasso | ❓ 未知情况
Perixx | Peritab-502EVO | ❓ 未知情况
Perixx | Peritab 502 | ❓ 未知情况
Perixx | Peritab 302 | ❓ 未知情况
三星 (Samsung) | Galaxy Book | ✔️ 支持
Trust | Flex Design | ❓ 未知情况
Trust | Slimline Widescreen | ❌ 有报告称不正常
Trust | Slimline Sketch | ❓ 未知情况
Trust | Slimline Mini | ❓ 未知情况
Trust | TB2100 | ❓ 未知情况
Trust | TB3100 | ❓ 未知情况
Turcom / 绘王 (Huion) | 数位屏 | ✔️ 推测正常工作
Turcom / 绘王 (Huion) | TS-6608 | ✔️ 推测正常工作
Turcom / 绘王 (Huion) | TS-6580B Pro | ✔️ 推测正常工作
Turcom / 绘王 (Huion) | TS-6580W Pro | ✔️ 推测正常工作
Turcom / 绘王 (Huion) | TS-6610H Professional Wide | ✔️ 推测正常工作
Turcom / 绘王 (Huion) | TS-690 | ✔️ 推测正常工作
Turcom / 绘王 (Huion) | TS-680 | ✔️ 推测正常工作
Turcom / 绘王 (Huion) | TS-6540 | ✔️ 推测正常工作
UC-Logic / Digipro | DigiPro WP4030 | ❓ 未知情况
UC-Logic / Digipro | WP806U | ❓ 未知情况
友基 (Ugee) | HK1060pro | ❓ 未知情况
友基 (Ugee) | HK1560 | ❓ 未知情况
友基 (Ugee) | UG-1910B | ❓ 未知情况
友基 (Ugee) | UG-2150 | ❓ 有报告称安装 2018 年 1 月的新版驱动程序后可以工作
友基 (Ugee) | EX05 | ❓ 未知情况
友基 (Ugee) | EX07 | ❓ 未知情况
友基 (Ugee) | G3 | ❓ 有报告称在 Windows 7 下面可以工作
友基 (Ugee) | G5 | ❓ 有报告称在 Windows 下面安装官方驱动程序后可用。目前 Linux 下面无驱动程序可用。
友基 (Ugee) | M504 | ❓ 未知情况
友基 (Ugee) | M708 | ❌ 有报告称工作不正常，笔画粘连
友基 (Ugee) | M6370 | ❓ 未知情况
友基 (Ugee) | M1000L | ❌ 有报告称不正常
友基 (Ugee) | Chocolate | ❓ 未知情况
友基 (Ugee) | CV720 | ❓ 未知情况
友基 (Ugee) | Rainbow 3 | ❓ 未知情况
VisTablet | Mini | ❓ 未知情况
VisTablet | Mini Plus | ❓ 未知情况
VisTablet | VT Original | ❓ 未知情况
VisTablet | Realm Pro | ❓ 未知情况
VisTablet | Realm Graphic | ❓ 未知情况
VisTablet | VT 12” Touch | ❓ 未知情况
和冠 (Wacom) | Intuos Draw | ✔️ 推测正常工作
和冠 (Wacom) | Intuos Art | ✔️ 推测正常工作
和冠 (Wacom) | Intuos Photo | ✔️ 推测正常工作
和冠 (Wacom) | Intuos Comic | ✔️ 推测正常工作
和冠 (Wacom) | Intuos 3D | ✔️ 推测正常工作
和冠 (Wacom) | Intuos Pro (S/M/L) | ✔️ 推测正常工作
和冠 (Wacom) | Intuos Pro Paper | ✔️ 推测正常工作
和冠 (Wacom) | Cintiq Pro 13 | ✔️ 推测正常工作
和冠 (Wacom) | Cintiq Pro 16 | ✔️ 推测正常工作
和冠 (Wacom) | Cintiq 13HD | ✔️ 推测正常工作
和冠 (Wacom) | Cintiq 22HD | ✔️ 推测正常工作
和冠 (Wacom) | Cintiq 22HD Touch | ✔️ 推测正常工作
和冠 (Wacom) | Cintiq 27 QHD | ✔️ 推测正常工作
和冠 (Wacom) | Cintiq 27 QHD Touch | ✔️ 推测正常工作
和冠 (Wacom) | Cintiq Companion | ✔️ 推测正常工作
和冠 (Wacom) | Cintiq Companion 2 | ✔️ 推测正常工作
和冠 (Wacom) | Cintiq Companion Hybrid | ✔️ 支持
和冠 (Wacom) | MobileStudio Pro 13 | ✔️ 支持
和冠 (Wacom) | MobileStudio Pro 16 | ✔️ 支持
和冠 (Wacom) | Intuos 5 | ✔️ 支持
和冠 (Wacom) | Intuos 4 | ✔️ 支持
和冠 (Wacom) | Intuos 3 | ✔️ 支持
和冠 (Wacom) | Intuos 2 (XD) | ✔️ 推测正常工作
和冠 (Wacom) | Cintiq 12WX | ✔️ 推测正常工作
和冠 (Wacom) | Cintiq 24HD | ✔️ 推测正常工作
和冠 (Wacom) | Bamboo Create | ✔️ 推测正常工作
和冠 (Wacom) | Bamboo Capture | ✔️ 推测正常工作
和冠 (Wacom) | Bamboo Connect | ✔️ 推测正常工作
和冠 (Wacom) | Bamboo Splash | ✔️ 推测正常工作
和冠 (Wacom) | Bamboo CTL | ✔️ 推测正常工作
和冠 (Wacom) | Bamboo CTH | ✔️ 推测正常工作
和冠 (Wacom) | Bamboo CTE | ✔️ 推测正常工作
和冠 (Wacom) | Bamboo One | ✔️ 推测正常工作
和冠 (Wacom) | Cintiq20 (DTZ) | ✔️ 推测正常工作
和冠 (Wacom) | Cintiq21 | ✔️ 有报告称正常工作
和冠 (Wacom) | Intuos (GD) | ✔️ 推测正常工作
和冠 (Wacom) | Graphire2 | ✔️ 推测正常工作
和冠 (Wacom) | Graphire (ET) | ✔️ 推测正常工作
Waltop | Venus M | ❓ 未知情况
Waltop | Media | ❓ 未知情况
Waltop | Q-Pad | ❓ 未知情况
XP Pen | Artist 16 | ✔️ 推测正常工作
XP Pen | Artist 22 | ✔️ 推测正常工作
XP Pen | Artist 22E | ✔️ 推测正常工作
XP Pen | Artist Display 10S | ✔️ 推测正常工作
XP Pen | Star 05 Wireless | ✔️ 安装 Star 04 的驱动程序后可以工作
XP Pen | Star G540 Game Play | ❓ 未知情况
XP Pen | Star G430 Game Play | ✔️ 推测正常工作
XP Pen | Star 04 Flash Memory | ❓ 未知情况
XP Pen | Star 03 Express Keys | ✔️ 正常工作
XP Pen | Star 02 Touch Hot Keys | ❓ 未知情况
XP Pen | Star 01 Pen Tablet | ❓ 未知情况
Yiynova | SP 1001 (由 UC-Logic 生产) | ❓ 未知情况
Yiynova | MVP10U | ✔️ 支持
Yiynova | MVP10U HD | ✔️ 推测正常工作
Yiynova | MVP10U HD+IPS | ✔️ 推测正常工作
Yiynova | DP10U+ | ✔️ 推测正常工作
Yiynova | DP10U | ✔️ 推测正常工作
Yiynova | DP10 | ✔️ 推测正常工作
Yiynova | DP10S | ✔️ 推测正常工作
Yiynova | DP10HD | ✔️ 推测正常工作
Yiynova | MSP15 | ✔️ 推测正常工作
Yiynova | MSP19 | ✔️ 推测正常工作
Yiynova | MSP19U | ✔️ 推测正常工作
Yiynova | MSP19U+ | ✔️ 推测正常工作
Yiynova | MSP19U+ (V5) | ✔️ 推测正常工作
Yiynova | MVP22U+IPS (V3) | ✔️ 推测正常工作
Yiynova | MVP20U+RH | ✔️ 推测正常工作
Yiynova | MVP22U+DT | ✔️ 推测正常工作
Yiynova | MVP22U+RH | ✔️ 推测正常工作
Yiynova | MJP19 | ✔️ 推测正常工作
Yiynova | MKP19 | ✔️ 推测正常工作
Yiynova | YA20HD | ✔️ 推测正常工作

参见

可能对你有帮助的网页：

绘王在 DeviantArt 上面的 Krita 支持话题 [http://huion.deviantart.com/journal/Problem-with-Krita-Come-On-In-439442607]

数位板生产商和型号列表 [https://digimend.github.io/tablets/]

主菜单

A list of all of main menu actions and a short description on what they do.

编辑菜单

文件菜单

帮助菜单

图像菜单

图层菜单

选择菜单

设置菜单

工具菜单

视图菜单

窗口菜单

编辑菜单

撤销

Undoes the last action. Ctrl + Z

重做

Redoes the last undone action. Ctrl + Shift+ Z

剪切

Cuts the selection or layer. Ctrl + X

复制

Copies the selection or layer. Ctrl + C

Cut (Sharp)

This prevents semi-transparent areas from appearing on your cut pixels, making them either fully opaque or fully transparent.

Copy (Sharp)

Same as Cut (Sharp) but then copying instead.

复制已合并

Copies the selection over all layers. Ctrl + Shift + C

粘贴

Pastes the copied buffer into the image as a new layer. Ctrl + V

在光标处粘贴

Same as paste, but aligns the image to the cursor.

Paste into new image

Pastes the copied buffer into a new image.

清除

Clear the current layer. Del

Fill with Foreground Color

Fills the layer or selection with the foreground color. Shift + Backspace

Fill with Background Color

Fills the layer or selection with the background color. Backspace

Fill with pattern

Fills the layer or selection with the active pattern.

Stroke Selected Shapes

Strokes the selected vector shape with the selected brush, will create a new layer.

Stroke Selection

Strokes the active selection using the menu.

文件菜单

新建

Make a new file.

打开

Open a previously created file.

打开最近一项

Open the recently opened document.

保存

File formats that Krita can save to. These formats can later be opened back up in Krita.

另存为

Save as a new file.

Open Existing Document As New document

Similar to import in other programs.

导出

Additional formats that can be saved. Some of these formats may not be later imported or opened by Krita

Import Animation Frames

Import frames for animation.

渲染动画

Render an animation with FFMPEG. This is explained on the 渲染动画 page.

Save incremental version

Save as a new version of the same file with a number attached.

Save incremental Backup

Copies and renames the last saved version of your file to a back-up file and saves your document under the original name.

Create Template from image

The *.kra file will be saved into the template folder for future use. All your layers and guides will be saved along!

从当前图像创建副本

Makes a new document from the current image, so you can easily reiterate on a single image. Useful for areas where the template system is too powerful.

文档信息

Look at the document information. Contains all sorts of interesting information about image, such as technical information or metadata.

关闭

Close the view or document.

关闭全部

Close all views and documents.

退出

Close Krita

帮助菜单

Krita 手册

Opens a browser and sends you to the index of this manual.

报告错误

Sends you to the bugtracker.

Show system information for bugreports.

This is a selection of all the difficult to figure out technical information of your computer. This includes things like, which version of Krita you have, which version your operating system is, and most prudently, what kind of OpenGL functionality your computer is able to provide. The latter varies a lot between computers and due that it is one of the most difficult things to debug. Providing such information can help us figure out what is causing a bug.

关于 Krita

Shows you the credits.

关于 KDE

Tells you about the KDE community that Krita is part of.

图像菜单

属性

Gives you the image properties.

Image Background Color and Transparency

Change the background canvas color.

Convert Current Image Color Space.

Converts the current image to a new colorspace.

Trim to image size

Trims all layers to the image size. Useful for reducing filesize at the loss of information.

裁剪到当前图层

A lazy cropping function. Krita will use the size of the current layer to determine where to crop.

剪裁到选区

A lazy cropping function. Krita will crop the canvas to the selected area.

旋转图像

Rotate the image

裁剪图像

Shear the image

水平镜像图像

Mirror the image on the horizontal axis.

垂直镜像图像

Mirror the image on the vertical axis.

Scale to New Size

The resize function in any other program Ctrl + Alt + I

偏移图像

Offset all layers.

调整画布大小

Change the canvas size. Don’t confuse this with Scale to new size.

图像分割

Splits the image.

小波分解

Does 子波分解 on the current layer.

分离图像

Separates the image into channels

图层菜单

These are the topmenu options are related to Layer Management, check out that page first, if you haven’t.

Cut Layer (3.0+)

Cuts the whole layer rather than just the pixels.

Copy Layer (3.0+)

Copy the whole layer rather than just the pixels.

Paste Layer (3.0+)

Pastes the whole layer if any of the top two actions have been taken.

新

Organizes the following actions:

绘制图层

Add a new paint layer

New layer from visible (3.0.2+)

Add a new layer with the visible pixels.

复制图层或蒙版

Duplicates the layer.

剪切选区至新图层

Single action for cut+paste

复制选区至新图层

Single action for copy+paste

Import/Export

Organizes the following actions:

Save Layer or Mask

Saves the Layer or Mask as a separate image.

将矢量图层另存为 SVG

Save the currently selected vector layer as an SVG.

保存分组图层

Saves the top-level group layers as single-layer images.

导入图层

Import an image as a layer into the current file.

Import as…

Import an image as a specific layer type. The following layer types are supported:

Paint layer

透明蒙版

滤镜蒙版

选区蒙版

转换

Organizes the following actions:

Convert a layer to…

Convert to Paint Layer

Convert a mask or vector layer to a paint layer.

透明蒙版

Convert a layer to a transparency mask. The image will be converted to grayscale first, and these grayscale values are used to drive the transparency.

滤镜蒙版

Convert a layer to a filter mask. The image will be converted to grayscale first, and these grayscale values are used to drive the filter effect area.

选区蒙版

Convert a layer to a selection mask. The image will be converted to grayscale first, and these grayscale values are used to drive the selected area.

Convert Group to Animated Layer

This takes the images in the group layer and makes them into frames of an animated layer.

转换图层色彩空间

This only converts the color space of the layer, not the image.

Select (3.0+):

Organizes the following actions:

All layers

选择全部图层.

可见图层

选择全部可见图层.

不可见图层

Select all invisible layers, useful for cleaning up a sketch.

锁定的图层

选择全部锁定的图层.

无锁图层

选择全部无锁图层.

群组

Organizes the following actions:

Quick Group (3.0+)

Adds all selected layers to a group.

Quick Clipping Group (3.0+)

Adds all selected layers to a group and adds a alpha-inherited layer above it.

快速解散

Ungroups the activated layer.

变形

Organizes the following actions:

水平镜像图层

Mirror the layer horizontally using the image center.

垂直镜像图层

Mirror the layer vertically using the image center.

旋转

Rotate the layer around the image center.

缩放图层

Scale the layer by the given amounts using the given interpolation filter.

剪裁图层

Shear the layer pixels by the given X and Y angles.

偏移图层

Offset the layer pixels by a given amount.

分割…

Organizes the following actions:

Split Alpha

Split the image transparency into a mask. This is useful when you wish to edit the transparency separately.

拆分图层

Split the layer into given color fields.

克隆序列

A complex bit of functionality to generate clone-layers for quick sprite making.

编辑元数据

Each layer can have its own metadata.

柱状图

Shows a histogram.

Merge With Layer Below

Merge a layer down.

平整图层

Flatten a Group Layer or flatten the masks into any other layer.

栅格化图层

For making vectors into raster layers.

平整图像

Flatten all layers into one.

Layerstyle (2.9.5+)

Set the PS-style layerstyle

选择菜单

全部选择

Selects the whole layer.

反选

Deselects everything (except for active Selection Mask)

重新选择

Reselects the previously deselected selection.

反选

Inverts the selection.

Convert raster selection to vector selection.

–

转换形状为矢量选区

Convert vector shape to vector selection

Convert to shape

Converts vector selection to vector shape.

显示选区

Display the selection. If turned off selections will be invisible.

Show Global Selection Mask

Shows the global selection as a selection mask in the layers docker. This is necessary to be able to select it for painting on.

比例

Scale the selection

Select from Color Range

Select from a certain color range.

选择不透明度

Select all opaque (non-transparent) pixels in the current active layer. If there’s already a selection, this will add the new selection to the old one, allowing you to select the opaque pixels of multiple layers into one selection. Semi-transparent (or semi-opaque) pixels will be semi-selected.

羽化选区

Feathering in design means to soften sharp borders. So this adds a soft border to the existing selection.

扩张选区

Make the selection a few pixels bigger.

收缩选区

Make the selection a few pixels smaller.

边界选区

Take the current selection and remove the insides so you only have a border selected.

平滑

Make the selection a little smoother. This removes jiggle.

设置菜单

The Settings Menu houses the configurable options in Krita and where you determine most of the “look and feel” of the application.

显示工具面板

显示工具面板

Determines whether or not the dockers are visible. This is a nice aid to cleaning up the interface and removing unnecessary “eye-ball clutter” when you are painting. If you’ve got your brush and you know you’re just going to be painting for awhile why not flip the dockers off? You’d be amazed what a difference it makes while you’re working. However, if you know you’re swapping out tools or working with layer or any of the other myriad things Krita lets you do then there’s no point getting caught up in flipping the docks on and off. Use you time wisely!

小技巧

This is a great candidate to add to the toolbar so you can just click the dockers on and off and don’t even have to open the menu to do it. See 配置工具栏 below for more.

工具面板

Krita subdivides the access of many of its features into functional panels called Dockers. Dockers are small windows that can contain, for example, things like the Layer Stack, Color Palette or Brush Presets. Think of them as the painter’s palette, or his water, or his brushkit.

Learning to use dockers effectively is a key concept to optimizing your time using Krita.

主题

Krita provides a number of color-themed interfaces or “looks”. The current set of themes are the following:

Dark (Default)

Blender

高亮

自然光

There is no easy way to create and share themes. The color themes are defined in the Share ‣ Color Schemes folder where Krita is downloaded.

配置快捷键

Configuring shortcuts is another way to customize the application to fit you. Whether you are transitioning from another app, like Photoshop or MyPaint, or you think your own shortcut keys make more sense for you then Krita has got you covered. You get to the shortcuts interface through Settings ‣ Configure Krita and by choosing the Keyboard Shortcuts tab.

To use, just type the Action into the Search box you want to assign/reassign the shortcut for. Suppose we wanted to assign the shortcut Ctrl + G to the Action of Group Layers so that every time we pressed Ctrl + G a new Layer Group would be created. Use the following steps to do this:

Type “Group Layer”

Click on Group Layer and a small inset box will open.

Click the Custom radio button

Click on the first button and type the Ctrl + G key combination.

Click OK

From this point on, whenever you press Ctrl + G you’ll get a new Group Layer.

小技巧

Smart use of shortcuts can save you significant time and further streamline your workflow.

管理资源

Manage the resources. You can read more about it here.

切换应用程序语言

If you wish to use Krita in a different translation.

配置工具栏

Krita allows you to highly customize the Toolbar interface. You can add, remove and change the order of nearly everything to fit your style of work. To get started, choose Settings ‣ Configure Toolbars

The dialog is broken down into three main sections:

The Toolbar

Choose to either modify the “File” or “Brushes and Stuff” toolbars

Available Actions:

All the options that can be added to a toolbar

Current Actions:

All the actions currently assigned and the order they are in.

Use the arrows between the Available and Current actions sections to move items back and forth and up and down in the hierarchy. This type of inclusion/exclusion interface has been around on PCs for decades so we don’t need to go into great detail regarding its use. What is important though is selecting the correct Toolbar to work on. The File Toolbar allows you to add items between the New , Open and Save buttons as well as to the right of the Save button. The Brushes and Stuff Toolbar, lets you modify anything from the Gradients button over to the right. This is probably where you’ll do most of your editing.

Here we’ve added Select Opaque , Local Selection , Transparency Mask , Isolate Layer , Show Assistant Previews . This is just an example of a couple of options that are used frequently and might trim your workflow. This is what it looks like in the configuration tool:

You’ll notice that some of the items are text only and some only icons. This is determined by whether the particular item has an associated icon in Krita. You can select anything from the Available section and move it to the Current one and rearrange to fit your own workflow.

If you add so many that they won’t all fit on your screen at once, you will see a small chevron icon appear. Click it and the toolbar expands to show the remaining items.

Toolbars shown.

Gives a list of toolbars that can be shown.

At this time Krita does not support the ability to create additional toolbars. The ones available are:

Although not really advisable, you can turn them off (but why would you..really?)

工具菜单

This contains three things.

脚本

When you have python scripting enabled and have scripts toggled, this is where most scripts are stored by default.

操作录制

警告

The recording and macro features are unmaintained and buggy.

Record a macro. You do this by pressing start, drawing something and then pressing stop. This feature can only record brush strokes. The resulting file is stored as a *.kritarec file.

宏

Play back or edit a krita rec file. The edit can only change the brush preset on strokes or add and remove filters.

视图菜单

Show Canvas Only

Only shows the canvas and what you have configured to show in Canvas Only settings.

Fullscreen mode

This will hide the system bar.

环绕模式

This will show the image as if tiled orthographically. Very useful for tiling 3d textures. Hit W to quickly activate it.

即时预览模式

Toggle 即时预览功能 globally.

软打样

Activate 软打样.

超出色域警告

See the 软打样 page for details.

帆布

Contains view manipulation actions.

Mirror View

This will mirror the view. Hit M to quickly activate it. Very useful during painting.

显示标尺

This will display a set of rulers. mouseright the rulers after showing them, to change the units.

Rulers track pointer

This adds a little marker to the ruler to show where the mouse is in relation to them.

显示参考线

Show or hide the guides.

锁定参考线

Prevent the guides from being able to be moved by the cursor.

显示状态栏

This will show the status bar. The status bar contains a lot of important information, a zoom widget, and the button to switch Selection Display Mode.

显示网格

Shows and hides the grid. Ctrl + Shift + '

显示像素网格

Show the pixel grid as configured in the 显示设置.

Snapping

Toggle the 吸附 types.

显示绘图助手

Shows or hides the Assistants

Show Painting Previews

Shows or hides the Assistants

窗口菜单

A menu completely dedicated to window management in Krita.

新窗口

Creates a new window for Krita. Useful with multiple screens.

New View

Make a new view of the given document. You can have different zoom or rotation on these.

工作空间

A convenient access panel to the 工作空间.

关闭

Close the current view.

关闭全部

关闭所有文档

平铺

Tiles all open documents into a little sub-window.

级联

Cascades the sub-windows.

下次执行

Selects the next view.

上一首

Selects the previous view.

List of open documents.

Use this to switch between documents.

数学输入

Also known as Numerical Input boxes. You can make Krita do simple maths for you in the places where we have number input. Just select the number in a spinbox, or right-click a slider to activate number input. It doesn’t do unit conversion yet, but this is planned.

可用函数

Addition (Operator: + )

Just adds the numbers. Usage: 50+100 Output: 150

Subtraction (Operator: - )

Just subtracts the last number from the first. Usage: 50-100 Output: 50

Multiplication (Operator: * )

Just multiplies the numbers. Usage: 50*100 Output: 5000

Division (Operator: / )

Just divides the numbers. Usage: 50/100 Output: 0.5

Exponent (Operator: ^ )

Makes the last number the exponent of the first and calculates the result. Usage: 2^8 Output: 256

Sine (Operator: sin() )

Gives you the sine of the given angle. Usage: sin(50) Output: 0.76

Cosine (Operator: cos() )

Gives you the cosine of the given angle. Usage: cos(50) Output: 0.64

Tangent (Operator: tan() )

Gives you the tangent of the given angle. Usage: tan(50) Output: 1.19

Arc Sine (Operator: asin() )

Inverse function of the sine, gives you the angle which the sine equals the argument. Usage: asin(0.76) Output: 50

Arc Cosine (Operator: acos() )

Inverse function of the cosine, gives you the angle which the cosine equals the argument. Usage: acos(0.64) Output: 50

Arc Tangent (Operator: atan() )

Inverse function of the tangent, gives you the angle which the tangent equals the argument. Usage: atan(1.19) Output: 50

Absolute (Operator: abs() )

Gives you the value without negatives. Usage: abs(75-100) Output: 25

Exponent (Operator: exp() )

Gives you given values using e as the exponent. Usage: exp(1) Output: 2.7183

Natural Logarithm (Operator: ln() )

Gives you the natural logarithm, which means it has the inverse functionality to exp(). Usage: ln(2) Output: 0.6931

The following are technically supported but bugged:

Common Logarithm (Operator: log10() )

Gives you logarithms of the given value. Usage: log10(50) Output: 0.64

运算顺序

The order of operations is a globally agreed upon reading order for interpreting mathematical expressions. It solves how to read an expression like:

2+3*4

You could read it as 2+3 = 5, and then 5*4 =20. Or you could say 3*4 = 12 and then 2+12 = 14.

The order of operations itself is Exponents, Multiplication, Addition, Subtraction. So we first multiply, and then add, making the answer to the above 14, and this is how Krita will interpret the above.

We can use brackets to specify certain operations go first, so to get 20 from the above expression, we do the following:

( 2+3 )*4

Krita can interpret the brackets accordingly and will give 20 from this.

错误

Sometimes, you see the result becoming red. This means you made a mistake and Krita cannot parse your maths expression. Simply click the input box and try again.

首选项

Krita 是高度可定制的，并提供了许多设置和选项，可通过首选项进行自定义。选择 设置‣ 配置 Krita 来访问这些设置。在 MacOS 上, 设置位于顶部菜单条，就像您对 MacOS 下的任何程序所期望的那样。

Krita 的偏好设置保存在文件 kritarc 中。此文件，对于 Windows 而言，位于 %LOCALAPPDATA%\ ，而对于 Linux 是`` ~/.config`` ，OSX 则在 ~/Library/Pregerences 。如果你想备份您的自定义设置，或是将其从一台计算机同步到另一个上，复制此文件即可。它甚至可以跨平台工作~

如果你从 Windows Store 安装 Krita，kritarc 文件会在不同的位置:

%LOCALAPPDATA%\Packages\49800Krita_一组随机字符串\LocalCache\Local\kritarc

自定义快捷方式保存在单独的文件 “kritashortcutsrc” 中, 也可以以相同的方式进行备份。这将在“快捷方式“一章中进一步讨论。

作者档案设置

画布输入设置

画布独占模式设置

色彩管理设置

拾色器设置

显示设置

G’Mic 设置

常规设置

网格设置

性能设置

Python 插件管理器

键盘快捷键

数位板设置

作者档案设置

Krita allows creating an author profile that you can use to store contact info into your images.

The main element is the author page. This page was overhauled massively in 4.0.

By default, it will use the “Anonymous” profile, which contains nothing. To create a new profile, press the “+” button, and write up a name for the author profile.

You can then fill out the fields.

The position field is special in that it has a list of hard coded common artists positions it can suggest.

In older versions of Krita there could only be one of each contact info. In 4.0, you can make as many contact entries as you’d like.

Press Add Contact Info to add an entry in the box. By default it will set the type to homepage, because that is the one that causes the least spam. Double mouseleft homepage to change the contact type. Double mouseleft the “New Contact Info” text to turn it into a line edit to change the value.

使用新配置文件

To use a profile for your current drawing, go to Settings ‣ Active Author Profile and select the name you gave your profile. Then, when pressing Save on your current document, you will be able to see your last author profile as the last person who saved it in File ‣ Document Information ‣ Author

导出作者元数据到 JPEG 和 PNG

4.0 新版功能: The jpeg and png export both have Sign with author data options. Toggling these will store the Nickname and the first entry in the contact info into the metadata of png or jpeg.

For the above example in the screenshot, that would result in: ExampleMan (http://example.com) being stored in the metadata.

画布输入设置

Krita has ways to set mouse and keyboard combinations for different actions. The user can set which combinations to use for a certain Krita command over here. This section is under development and will include more options in future.

项目

The user can make different profiles of combinations and save them.

画布独占模式设置

Canvas Only mode is Krita’s version of full screen mode. It is activated by hitting Tab on the keyboard. Select which parts of Krita will be hidden in canvas-only mode – The user can set which UI items will be hidden in canvas-only mode. Selected items will be hidden.

色彩管理设置

Krita offers extensive functionality for color management, utilising Little CMS [http://www.littlecms.com/] We describe Color Management in a more overall level here: 色彩管理流程.

常规

Default Color Model For New Images

Choose the default model you prefer for all your images.

当从其它应用程序粘贴至 Krita 时

The user can define what kind of conversion, if any, Krita will do to an image that is copied from other applications i.e. Browser, GIMP, etc.

Assume sRGB

This option will show the pasted image in the default Krita ICC profile of sRGB.

Assume monitor profile

This option will show the pasted image in the monitor profile selected in system preferences.

每次询问

Krita will ask the user each time an image is pasted, what to do with it. This is the default.

注解

When copying and pasting in Krita color information is always preserved.

使用黑点补偿

This option will turn on Blackpoint Compensation for the conversion. BPC is explained by the maintainer of LCMS as following:

BPC is a sort of “poor man’s” gamut mapping. It basically adjust contrast of images in a way that darkest tone of source device gets mapped to darkest tone of destination device. If you have an image that is adjusted to be displayed on a monitor, and want to print it on a large format printer, you should realize printer can render black significantly darker that the screen. So BPC can do the adjustment for you. It only makes sense on Relative colorimetric intent. Perceptual and Saturation does have an implicit BPC.

Allow LittleCMS optimizations

Uncheck this option when using Linear Light RGB or XYZ.

显示

Use System Monitor Profile

This option when selected will tell Krita to use the ICC profile selected in your system preferences.

Screen Profiles

There are as many of these as you have screens connected. The user can select an ICC profile which Krita will use independent of the monitor profile set in system preferences. The default is sRGB built-in. On Unix systems, profile stored in $/usr/share/color/icc (system location) or $~/.local/share/color/icc (local location) will be proposed. Profile stored in Krita preference folder, $~/.local/share/krita/profiles will be visible only in Krita.

再现意图

Your choice of rendering intents is a way of telling Littlecms how you want colors mapped from one color space to another. There are four options available, all are explained on the ICC 特性文件 manual page.

软打样选项

These allow you to configure the default softproofing options. To configure the actual softproofing for the current image, go to Image ‣ Image Properties ‣ Softproofing .

For indepth details about how to use softproofing, check out the page on softproofing.

拾色器设置

These settings directly affect Advanced Color Selector Dockers and the same dialog box appears when the user clicks the settings button in that docker as well. They also affect certain hotkey actions.

This settings menu has a drop-down for Advanced Color Selector, and Color Hotkeys.

高级颜色选择面板

These settings are described on the page for the 高级拾色器.

颜色快捷键

These allow you to set the steps for the following actions:

Make Brush Color Darker

This is defaultly set to K and uses the lightness steps. This uses luminance when possible.

Make Brush Color Lighter

This is defaultly set to L and uses the lightness steps. This uses luminance when possible.

Make Brush Color More Saturated

This is defaultly unset and uses the saturation steps.

Make Brush Color More Desaturated

This is defaultly unset and uses the saturation steps.

Shift Brushcolor Hue clockwise

This is defaultly unset and uses the Hue steps.

Shift Brushcolor Hue counter-clockwise

This is defaultly unset and uses the Hue steps.

Make Brush Color Redder

This is defaultly unset and uses the Redder/Greener steps.

Make Brush Color Greener

This is defaultly unset and uses the Redder/Greener steps.

Make Brush Color Yellower

This is defaultly unset and uses the Bluer/Yellower steps.

Make Brush Color Bluer

This is defaultly unset and uses the Bluer/Yellower steps.

显示设置

Here various settings for the rendering of Krita can be edited.

OpenGL

For Krita 3.3 or later: Reworded as “*Canvas Graphics Acceleration*”

OpenGL is a bit of code especially for graphics cards. Graphics cards a dedicate piece of hardware for helping your computer out with graphics calculations, which Krita uses a lot. All modern computer have graphics cards.

For Krita 3.3 or later: On Windows, Krita also supports using Direct3D instead with the help of the ANGLE library. ANGLE works by converting the OpenGL functions that Krita makes use of to the equivalent in Direct3D. It may (or may not) be slower than native OpenGL, but it has better compatibility with typical Windows graphics drivers.

Enable OpenGL (For Krita 3.3 or later: Reworded as *Canvas Graphics Acceleration*)

Selecting this checkbox will enable the OpenGL / ANGLE canvas drawing mode. With a decent graphics card this should give faster feedback on brushes and tools. Also the canvas operations like Rotate, Zoom and Pan should be considerably faster.

For Krita 3.3 or later:

渲染器

On Windows: You can switch between native OpenGL or ANGLE Direct3D 11 rendering. The usual recommendation is to leave it as “Auto”, which Krita will decide the best to use based on some internal compatibility checking. Changes to this option require a restart of Krita to take effect.

Use Texture Buffer

This setting utilizes the graphics card’s buffering capabilities to speed things up a bit. Although for now, this feature may be broken on some AMD/Radeon cards and may work fine on some Intel graphics cards.

Scaling Mode

The user can choose which scaling mode to use while zooming the canvas. The choice here only affects the way the image is displayed during canvas operations and has no effect on how Krita scales an image when a transformation is applied.

最近邻居

This is the fastest and crudest filtering method. While fast, this results in a large number of artifacts - ‘blockiness’ during magnification, and aliasing and shimmering during minification.

二维过滤

This is the next step up. This removes the ‘blockiness’ seen during magnification and gives a smooth looking result. For most purposes this should be a good trade-off between speed and quality.

三维过滤

This should give a little better result than Bilinear Filtering.

高质量过滤

Only available when your graphics card supports OpenGL 3.0. As the name suggests, this setting provides the best looking image during canvas operations.

透明度棋盘颜色

Krita supports layer transparency. Of course, the nasty thing is that transparency can’t be seen. So to indicate transparency at the lowest layer, we use a checker pattern. This part allows you to configure it.

尺寸

This sets the size of the checkers which show up in transparent parts of an image.

彩色

The user can set the colors for the checkers over here.

Move Checkers When Scrolling

When selected the checkers will move along with opaque elements of an image during canvas Panning, Zooming, etc. Otherwise the checkers remain stationary and only the opaque parts of an image will move.

画布外周颜色

彩色

The user can select the color for the canvas i.e. the space beyond a document’s boundaries.

隐藏滚动条

Selecting this will hide the scrollbars in all view modes.

像素网格

4.0 新版功能.

This allows configuring an automatic pixel-by-pixel grid, which is very useful for doing pixel art.

彩色

The color of the grid.

Start Showing at

This determines the zoom level at which the pixel grid starts showing, as showing it when the image is zoomed out a lot will make the grid overwhelm the image, and is thus counter productive.

其他

Color Channels in Color

This is supposed to determine what to do when only a single channel is selected in the channels docker, but it doesn’t seem to work.

Enable Curve Anti-Aliasing

This allows anti-aliasing on previewing curves, like the ones for the circle tool, or the path tool.

Enable Selection Outline Anti-Aliasing

This allows automatic anti-aliasing on selection. It makes the selection feel less jaggy and more precise.

Hide window scrollbars.

Hides the scrollbars on the canvas.

Hide Layer thumbnail popup

This disables the thumbnail that you get when hovering over a layer.

G’Mic 设置

G’Mic or GREYC’s Magic for Image Computing is an opensource filter framework, or, it is an extra program you can download to have access to a whole lot of image filters.

Krita has had G’Mic integration for a long time, but this is its most stable incarnation.

You set it up as following:

First download the proper krita plugin from the G’Mic website. [http://gmic.eu/download.shtml]

Then, unzip and place it somewhere you can find it.

Go to Settings ‣ Configure Krita ‣ G’Mic plugin and set G’MIC to the filepath there.

Then restart Krita.

常规设置

You can access the General Category of the preferences by first going to Settings ‣ Configure Krita.

光标设置

Customize the drawing cursor here:

光标形状

Select a cursor shape to use while the brush tools are used. This cursor will always be visible on the canvas. It is usually set to a type exactly where your pen nib is at. The available cursor types are shown below.

工具图标

Shows the currently selected tool icon, even for the freehand brush.

箭头

显示常规鼠标指针。

准星

Shows a precision reticule.

小圆圈

Shows a small white dot with a black outline.

无光标

Show no cursor, useful for tablet-monitors.

Triangle Right-Handed.

Gives a small white triangle with a black border.

Triangle Left-Handed.

Same as above but mirrored.

黑像素

Gives a single black pixel.

白像素

Gives a single white pixel.

轮廓形状

Select an outline shape to use while the brush tools are used. This cursor shape will optionally show in the middle of a painting stroke as well. The available outline shape types are shown below.(pictures will come soon)

无轮廓

No outline.

圆形轮廓

Gives a circular outline approximating the brush size.

预览轮廓

Gives an outline based on the actual shape of the brush.

倾斜轮廓

Gives a circular outline with a tilt-indicator.

While Painting…

Show Outline

This option when selected will show the brush outline while a stroke is being made. If unchecked the brush outline will not appear during stroke making, it will show up only after the brush stroke is finished. This option works only when Brush Outline is selected as the Cursor Shape.

在 4.1 版更改: Used to be called “Show Outline When Painting”

使用有效轮廓大小

4.1 新版功能.

This makes sure that the outline size will always be the maximum possible brush diameter, and not the current one as affected by sensors such as pressure. This makes the cursor a little less noisy to use.

Window Settings

Multiple Document Mode

This can be either tabbed like GIMP or Painttool Sai, or subwindows, like Photoshop.

Background image

Allows you to set a picture background for subwindow mode.

窗口背景

Set the color of the subwindow canvas area.

Don’t show contents when moving sub-windows

This gives an outline when moving windows to work around ugly glitches with certain graphics-cards.

在画布上显示浮动消息

Whether or not you want to see the on-canvas pop-up messages that tell you whether you are in tabbed mode, rotating the canvas, or mirroring it.

启用高分辨率屏幕 (Hi-DPI) 支持

Attempt to use the Hi-DPI support. It is an option because we are still experiencing bugs on windows.

Allow only one instance of Krita

An instance is a single entry in your system’s task manager. Turning this option makes sure that Krita will check if there’s an instance of Krita open already when you instruct it to open new documents, and then have your documents opened in that single instance. There’s some obscure uses to allowing multiple instances, but if you can’t think of any, just keep this option on.

工具选项

In docker (default)

Gives you the tool options in a docker.

In toolbar

Gives you the tool options in the toolbar, next to the brush settings. You can open it with \.

Switch Control/Alt Selection Modifiers

This switches the function of the Ctrl and Alt buttons when modifying selections. Useful for those used to Gimp instead of Photoshop, or Lefties without a right-Alt key on their keyboard.

Enable Touchpainting

This allows finger painting with capacitive screens. Some devices have both capacitive touch and a stylus, and then this can interfere. In that case, just toggle this.

Kinetic Scrolling (Needs Restart)

This enables kinetic scrolling for scrollable areas.

Kinetic scrolling on the brush chooser drop-down with activation mode set to On Click Drag, with this disabled all of these clicks would lead to a brush being selected regardless of drag motion.

作用

How it is activated.

禁止

Will never activated.

触摸并拖拽时

Will activate if it can recognize a touch event. May not always work.

点击并拖拽时

Will activate when it can recognize a click event, will always work.

敏感性

How quickly the feature activates, this effective determines the length of the drag.

显示滚动条

Whether to show scrollbars when doing this.

其他

When Krita starts

This is the option for handling user sessions. It has the following options:

Open Default Window

This opens the regular empty window with the last used workspace.

Load Previous Session

Load the last opened session. If you have Save session when Krita closes toggled, this becomes the last files you had open and the like.

Show Session Manager

Show the session manager directly so you can pick a session.

4.1 新版功能.

Krita 退出时保存会话

Save the current open windows, documents and the like into the current session when closing Krita so you can resume where you left off.

4.1 新版功能.

Autosave Every

Here the user can specify how often Krita should autosave the file. You can tick the checkbox to turn it off. For Windows, these files are saved in the %TEMP% directory. If you are on Linux they are stored in /home/’username’.

Compress *.kra files more.

This increases the zip compression on the saved Krita files, which makes them lighter on disk, but this takes longer to load.

Upon importing Images as Layers, convert to the image color space.

This makes sure that layers are the same color space as the image, necessary for saving to PSD.

Undo Stack Size

This is the number of undo commands Krita remembers. You can set the value to 0 for unlimited undos.

收藏的预设

This determines the amount of presets that can be used in the pop-up palette.

Create Backup File

When selected Krita will try to save a backup file in case of a crash.

启动时隐藏欢迎屏幕.

This’ll hide the splash screen automatically once Krita is fully loaded.

Enable Native File Dialog

This allows you to use the system file dialog. By default turned off because we cannot seem to get native file dialogues 100% bugfree.

Maximum brush size

This allows you to set the maximum brush size to a size of up to 10.000 pixels. Do be careful with using this, as a 10.000 pixel size can very quickly be a full gigabyte of data being manipulated, per dab. In other words, this might be slow.

在后台重新生成动画缓存.

Krita will recalculate the cache when you’re not doing anything.

在 4.1 版更改: This is now in the 性能设置 under Animation Cache.

网格设置

3.0 版后已移除: Deprecated in 3.0, use the 网格与参考线 instead.

Settings->configure Krita->Grid

Fine tune the settings of the grid-tool grid here.

位置

The user can set various settings of the grid over here.

Horizontal Spacing

The number in Krita units, the grid will be spaced in the horizontal direction.

Vertical Spacing

The number in Krita units, the grid will be spaced in the vertical direction. The images below will show the usage of these settings

X Offset

The number to offset the grid in the X direction.

Y Offset

The number to offset the grid in the Y direction.

Some examples are shown below, look at the edge of the image to see the offset.

Subdivisions

Here the user can set the number of times the grid is subdivided. Some examples are shown below

样式

主体

The user can set how the main lines of the grid are shown. Options available are Lines, Dashed Lines, Dots. The color also can be set here.

Subdivision

The user can set how the subdivision lines of the grid are shown. Options available are Lines, Dashed Lines, Dots. The color also can be set here.

性能设置

Krita, as a painting program, juggles a lot of data around, like the brushes you use, the colors you picked, but primarily, each pixel in your image. Due to this, how Krita organizes where it stores all the data can really speed up Krita while painting, just like having an organized artist’s workplace can really speed up the painting process in real life.

These preferences allow you to configure Krita's organisation, but all do require you to restart Krita, so it can do this organisation properly.

内存

RAM, or Random Access Memory, is the memory your computer is immediately using. The difference between RAM and the hard drive memory can be compared to the difference between having files on your desk and having files safely stored away in an archiving room: The files on your desk as much easier to access than the ones in your archive, and it takes time to pull new files from the archive. This is the same for your computer and RAM. Files need to be loaded into RAM before the computer can really use them, and storing and removing them from RAM takes time.

These settings allow you to choose how much of your virtual desk you dedicate to Krita. Krita will then reserve them on start-up. This does mean that if you change any of the given options, you need to restart Krita so it can make this reservation.

Memory Limit

This is the maximum space Krita will reserve on your RAM on startup. It’s both available in percentages and Bytes, so you can specify precisely. Krita will not take up more space than this, making it safe for you to run an internet browser or music on the background.

Internal Pool

A feature for advanced computer users. This allows Krita to organize the area it takes up on the virtual working desk before putting its data on there. Like how a painter has a standard spot for their canvas, Krita also benefits from giving certain data it uses its place (a memory pool), so that it can find them easily, and it doesn’t get lost among the other data (memory fragmentation). It will then also not have to spend time finding a spot for this data.

Increasing this, of course, means there’s more space for this type of data, but like how filling up your working desk with only one big canvas will make it difficult to find room for your paints and brushes, having a large internal pool will result in Krita not knowing where to put the other non-specific data.

On the opposite end, not giving your canvas a spot at all, will result in you spending more time looking for a place where you will put the new layer or that reference you just took out of the storage. This happens for Krita as well, making it slower.

This is recommended to be a size of one layer of your image, e.g. if you usually paint on the image of 3000x3000x8bit-ARGB, the pool should be something like 36 MiB.

As Krita does this on start-up, you will need to restart Krita to have this change affect anything.

Swap Undo After

Krita also needs to keep all the Undo states on the virtual desk (RAM). Swapping means that parts of the files on the virtual desk get sent to the virtual archive room. This allows Krita to dedicate more RAM space to new actions, by sending old Undo states to the archive room once it hits this limit. This will make undoing a little slower, but this can be desirable for the performance of Krita overall. This too needs Krita to be restarted.

交换文件

File Size Limit

This determines the limit of the total space Krita can take up in the virtual archive room. If Krita hits the limit of both the memory limit above, and this Swap File limit, it can’t do anything anymore (and will freeze).

Swap File Location

This determines where the Swap File will be stored on your hard-drive. Location can make a difference, for example, Solid State Drives (SSD) are faster than Hard Disk Drives (HDD). Some people even like to use USB-sticks for the swap file location.

高级选项

多线程

Since 4.0, Krita supports multithreading for the animation cache and handling the drawing of brush tips when using the pixel brush.

CPU Limit

The number of cores you want to allow Krita to use when multithreading.

动画渲染线程限制

When rendering animations to frames, Krita multithreads by keeping a few copies of the image, with a maximum determined by the number of cores your processor has. If you have a heavy animation file and lots of cores, the copies can be quite heavy on your machine, so in that case try lowering this value.

其他

Limit frames per second while painting.

This makes the canvas update less often, which means Krita can spend more time calculating other things. Some people find fewer updates unnerving to watch however, hence this is configurable.

Debug logging of OpenGL framerate

Will show the canvas framerate on the canvas when active.

对笔刷渲染速度进行调试记录.

Will show numbers indicating how fast the last brush stroke was on canvas.

Disable vector optimizations (for AMD CPUs)

Vector optimizations are a special way of asking the CPU to do maths, these have names such as SIMD and AVX. These optimizations can make Krita a lot faster when painting, except when you have an AMD CPU under Windows. There seems to be something strange going on there, so just deactivate them then.

Enable progress reporting

This allows you to toggle the progress reporter, which is a little feedback progress bar that shows up in the status bar when you let Krita do heavy operations, such as heavy filters or big strokes. The red icon next to the bar will allow you to cancel your operation. This is on by default, but as progress reporting itself can take up some time, you can switch it off here.

程序性能记录

This enables performance logging, which is then saved to the Log folder in your working directory. Your working directory is where the autosave is saved at as well.

So for unnamed files, this is the $HOME folder in Linux, and the %TEMP% folder in Windows.

动画缓存

4.1 新版功能.

The animation cache is the space taken up by animation frames in the memory of the computer. A cache in this sense is a cache of precalculated images.

Playing back a video at 25 FPS means that the computer has to precalculate 25 images per second of video. Now, video playing software is able to do this because it really focuses on this one single task. However, Krita as a painting program also allows you to edit the pictures. Because Krita needs to be able to do this, and a dedicated video player doesn’t, Krita cannot do the same kind of optimizations as a dedicated video player can.

Still, an animator does need to be able to see what kind of animation they are making. To do this properly, we need to decide how Krita will regenerate the cache after the animator makes a change. There’s fortunately a lot of different options how we can do this. However, the best solution really depends on what kind of computer you have and what kind of animation you are making. Therefore in this tab you can customize the way how and when the cache is generated.

缓存存储后端

使用内存

Animation frame cache will be stored in RAM, completely without any limitations. This is also the way it was handled before 4.1. This is only recommended for computers with a huge amount of RAM and animations that must show full-canvas full resolution 6k at 25 fps. If you do not have a huge amount (say, 64GiB) of RAM, do not use this option (and scale down your projects).

警告

Please make sure your computer has enough RAM above the amount you requested in the General tab. Otherwise you might face system freezes.

For 1 second of FullHD @ 25 FPS you will need 200 extra MiB of Memory

For 1 second of 4K UltraHD@ 25 FPS, you will need 800 extra MiB of Memory.

使用硬盘

Animation frames are stored in the hard disk in the same folder as the swap file. The cache is stored in a compressed way. A little amount of extra RAM is needed.

Since data transfer speed of the hard drive is slow, you might want to limit the Cached Frame Size to be able to play your video at 25 fps. A limit of 2500 px is usually a good choice.

缓存生成选项

Limit Cached Frame Size

Render scaled down version of the frame if the image is bigger than the provided limit. Make sure you enable this option when using On-Disk storage backend, because On-Disk storage is a little slow. Without the limit, there’s a good chance that it will not be able to render at full speed. Lower the size to play back faster at the cost of lower resolution.

Use Region Of Interest

We technically only need to use the section of the image that is in view. Region of interest represents that section. When the image is above the configurable limit, render only the currently visible part of it.

Enable Background Cache Generation

This allows you to set whether the animation is cached for playback in the background (that is, when you’re not using the computer). Then, when animation is cached when pressing play, this caching will take less long. However, turning off this automatic caching can save power by having your computer work less.

Python 插件管理器

This is part of Krita’s python support.

The python plugin manager can be accessed from Settings ‣ Configure Krita ‣ Python Plugin Manager. It allows you decide which of the Python Plugins are active.

It will show you a list of python plugins Krita has found, as well as their description. By default, Python Plugins are disabled, because many python scripts are autostarted, so this ensures only the ones you want to run are being run.

You can use the checkboxes to toggle them. A restart is required to complete switching off or on the python plugin.

If you mouseleft a plugin, and the plugin has a manual, Krita will display it in the box at the bottom.

For more information on python, check the python scripting category.

键盘快捷键

Most of Krita’s shortcuts are configured in the menu section Settings ‣ Configure Krita ‣ Configure Shortcuts. The shortcuts configured here are simple key combinations, for example Ctrl + X to cut. Shortcuts can also be sequences of key combinations (e.g. Shift + S then B). Krita also has a special interface for configuring the mouse and stylus events sent to the canvas, found under 画布输入设置.

菜单项

Search bar

Entering text here will search for matching shortcuts in the shortcut list.

Shortcut List

Shortcuts are organized into sections. Each shortcut can be given a primary and alternate key combination

Load/Save Shortcuts Profiles

The bottom row of buttons contains commands for exporting and import keyboard shortcuts.

配置

Primary and alternate shortcuts

Each shortcut is assigned a default, which may be empty. The user can assign up to two custom shortcuts, known as primary and alternate shortcuts. Simply click on a “Custom” button and type the key combination you wish to assign to the shortcut. If the key combination is already in use for another shortcut, the dialog will prompt the user to resolve the conflict.

Shortcut schemes

Many users migrate to Krita from other tools with different default shortcuts. Krita users may change the default shortcuts to mimic these other programs. Currently, Krita ships with defaults for Photoshop and Paint Tool Sai. Additional shortcut schemes can be placed in the ~/.config/krita/input/ folder.

Saving, loading and sharing custom shortcuts

Users may wish to export their shortcuts to use across machines, or even share with other users. This can be done with the save/load drop-down. Note: the shortcuts can be saved and overridden manually by backingup the text file kritashortcutsrc located in ~/.config/krita/. Additionally, the user can export a custom shortcut scheme file generated by merging the existing scheme defaults with the current customizations.

数位板设置

数位板

Input Pressure Global Curve : This is the global curve setting that your tablet will use in Krita. The settings here will make your tablet feel soft or hard globally.

For Krita 3.3 or later:Tablet Input API

on Windows 8 or above only

WinTab

Use the WinTab API to receive tablet pen input. This is the API being used before Krita 3.3. This option is recommended for most Wacom tablets.

Windows 8+ Pointer Input

Use the Pointer Input messages to receive tablet pen input. This option depends on Windows Ink support from the tablet driver. This is a relatively new addition so it’s still considered to be experimental, but it should work well enough for painting. You should try this if you are using an N-Trig device (e.g. recent Microsoft Surface devices) or if your tablet does not work well with WinTab.

数位板测试器

4.1 新版功能.

This is a special feature for debugging tablet input. When you click on it, it will open a window with two sections. The left section is the Drawing Area and the right is the Text Output.

If you draw over the Drawing Area, you will see a line appear. If your tablet is working it should be both a red and blue line.

The red line represents mouse events. Mouse events are the most basic events that Krita can pick up. However, mouse events have crude coordinates and have no pressure sensitivity.

The blue line represents the tablet events. The tablet events only show up when Krita can access your tablet. These have more precise coordinates and access to sensors like pressure sensitivity.

重要

If you have no blue line when drawing on the lefthand drawing area, Krita cannot access your tablet. Check out the page on drawing tablets for suggestions on what is causing this.

When you draw a line, the output on the right will show all sorts of text output. This text output can be attached to a help request or a bug report to figure out what is going on.

外部资源

David Revoy wrote an indepth guide on using this feature to maximum advantage. [http://www.davidrevoy.com/article182/calibrating-wacom-stylus-pressure-on-krita]

渲染动画

Render animation allows you to render your animation to an image sequence, gif, mp4, mkv, or ogg file. It replaces Export Animation .

For rendering to an animated file format, Krita will first render to a png sequence and then use FFMpeg, which is really good at encoding into video files, to render that sequence to an animated file format. The reason for this two-step process is that animation files can be really complex and really big, and this is the best way to allow you to keep control over the export process. For example, if your computer has a hiccup, and one frame saves out weird, first saving the image sequence allows you to only resave that one weird frame before rendering.

This means that you will need to find a good place to stick your frames before you can start rendering. If you only do throwaway animations, you can use a spot on your hard-drive with enough room and select Delete Sequence After Rendering

图像序列

Base Name

The base name of your image sequence. This will get suffixed with a number depending on the frame.

文件格式

The file format to export the sequence to. When rendering we enforce png. The usual export options can be modified with ….

Render Location

Where you render the image sequence to. Some people prefer to use a flash-drive or perhaps a harddrive that is fast.

首帧

The first frame of the range of frames you wish to adjust. Automatically set to the first frame of your current selection in the timeline. This is useful when you only want to re-render a little part.

尾帧

As above, the last frame of the range of frames you wish to adjust. Automatically set to the last frame of your current selection in the timeline.

Naming Sequence starts with

The frames are named by using Base Name above and adding a number for the frame. This allows you to set where the frame number starts, so rendering from 8 to 10 with starting point 3 will give you images named 11 and 15. Useful for programs that don’t understand sequences starting with 0, or for precision output.

渲染动画

Render As

The file format to render to. All except gif have extra options that can be manipulated via ….

文件

Location and name of the rendered animation.

FFMpeg

The location where your have ffmpeg. If you don’t have this, Krita cannot render an animation. For proper gif support, you will need ffmpeg 2.6, as we use its palettegen functionality.

在渲染后删除序列

Delete the prerendered image sequence after done rendering. This allows you to choose whether to try and save some space, or to save the sequence for when encoding fails.

警告

None of the video formats support saving from images with a transparent background, so Krita will try to fill it with something. You should add a background color yourself to avoid it from using, say, black.

配置 Krita 以导出动画

You will need to download an extra application and link it in Krita for it to work. The application is pretty big (50MB), so the Krita developers didn’t want to bundle it with the normal application. The software that we will use is free and called FFMpeg. The following instructions will explain how to get it and set it up. The setup is a one-time thing so you won’t have to do it again.

第一步 - 下载 FFMpeg

For Windows

Go to the ffmpeg website [http://ffmpeg.org/download.html]. The URL that had the link for me was here… [https://ffmpeg.zeranoe.com/builds/]

Watch out for the extremely annoying google and that looks like a download button! There is no big button for what we need. Either get the 64-bit STATIC version or 32-bit STATIC version that is shown later down the page. If you bought a computer in the past 5 years, you probably want the 64-bit version. Make sure you get a exe file, if you hover over the options they will give more information about what exactly you are downloading.

For OSX

Please see the section above. However, FFmpeg is obtained from here [https://evermeet.cx/ffmpeg/] instead. Just pick the big green button on the left under the FFmpeg heading. You will also need an archiving utility that supports .7z, since ffmpeg provides their OSX builds in .7z format. If you don’t have one, try something like Keka [http://www.kekaosx.com].

For Linux

FFMPeg can be installed from the repositories on most Linux systems. Version 2.6 is required for proper gif support, as we use the palettegen functionality.

第二步 - 解压缩并与 Krita 建立联系

For Windows

Unzip the package that was just downloaded. Rename the long folder name to just ffmpeg. Let’s put this folder in a easy to find location. Go to your C:and place it there. You can put it wherever you want, but that is where I put it.

Open Krita back up and go to File ‣ Render Animation. Click the Browse button on the last item called FFMpeg. Select this file C:/ffmpeg/bin/ffmpeg.exe and click OK .

For OSX

After downloading ffmpeg, you just need to extract it and then simply point to it in the FFMPEG location in Krita like /Users/user/Downloads/ffmpeg (assuming you downloaded and extracted the .7z file to /Users/user/Downloads).

For Linux

FFMpeg is, if installed from the repositories, usually found in /usr/bin/ffmpeg

第三步 - 测试导出动画

ffmpeg.exe is what Krita uses to do all of its animation export magic. Now that it is hooked up, let us test it out.

Let’s make an animated GIF. In the Render Animation dialog, change the Render As field to “GIF image”. Choose the file location where it will save with the “File” menu below. I just saved it to my desktop and called it “export.gif”. When it is done, you should be able to open it up and see the animation.

警告

By default, FFMPEG will render MP4 files with a too new codec, which means that Windows Media Player won’t be able to play it. So for Windows, select “baseline” for the profile instead of “high422” before rendering.

注解

OSX does not come with any software to play MP4 and MKV files. If you use Chrome for your web browser, you can drag the video file into that and the video should play. Otherwise you will need to get a program like VLC to see the video.

资源管理

Resources are pluggable bits of data, like brush presets or patterns. Krita has variety of resources and also has a good resource management starting from 2.9, making it really easy for artists to share and collate all the resources together

资源包

Starting from 2.9 Krita has a new format to manage resources it is called ‘’Bundles’‘, a bundle is just a compressed file containing all the resources together.

标签

Krita also has a robust tagging system for you to manage the resources on the fly while painting. All Krita resources can be tagged. These tags can be added via the resource manager, but also via the respective dockers such as brush preset docker, pattern docker etc. You can mouseleft the plus icon in the docker and add a tag name. In addition to adding you can rename and delete a tag as well.

Resources can belong to one or more tags. For example, you may have a Brush Preset of a favorite Ink Pen variant and have it tagged so it shows in up in your Inking, Painting, Comics and Favorites groups of brushes.

Brushes in the “Predefined” tab of the Brush Settings Editor can be also tagged and grouped for convenience.

过滤

Some dockers, for example the brush preset docker as shown below, have a resource filter, which functions like a powerful search bar for the resource in question.

You can enter brush name, tag name to quickly pull up a list of brush preset you want. When you select any tag from the tag drop-down and want to include brush presets from other tags as well then you can add filters the following way:

To filter based on the partial, case insensitive name of the resources you can add partialname or !partialname

To include other Tags type the respective name of the tag in square brackets like this [Tagname] or to exclude a tag type ![Tagname].

For case sensitive matching of preset name type "Preset name" or ! "Preset name" to exclude.

An incredibly quick way to save a group or brushes into a tag is to:

Create a new tag by mouseleft on the green plus sign. This will empty out the contents of the Brush Preset docker.

Use the Resource Filter at the bottom of the Brush Presets dock or Brush Settings Editor to type in what you want to group. For instance: if you type Pencil in the filter box you will get all Brush Presets with Pencil somewhere in their name. Now you have all the Pencil-related Brush Presets together in one place.

To finish, click the Save button (small disk icon to the right of the Resource Filter box) or press Enter and all the items will be saved with the new tag you created.

Now, anytime you want to open up your “digital pencil box” and see what you have to work with all you have to do is use the pull-down and select Pencils. The Resource Filter works the same way in other parts of Krita so be on the lookout for it!

Resource Zooming

If you find the thumbnails of the resources such as color swatches brushes and pattern to be small you can make them bigger or Zoom in. All resource selectors can be zoomed in and out of, by hovering over the selector and using Ctrl + mousescroll

管理资源

As mentioned earlier Krita has a flexible resource management system. Starting from version 2.9 you can share various resources mentioned above by sharing a single compressed zip file created within Krita.

The manage resources section in the settings was also revamped for making it easy for the artists to prepare these bundle files. You can open manage resource section by going to Settings then Manage Resources

导入资源包

To import a bundle click on Import Bundles/Resources button on the top right side of the dialog. Select .bundle file format from the file type if it is not already selected, browse to the folder where you have downloaded the bundle, select it and click Open. Once the bundle is imported it will be listed in the Active Bundle section. If you don’t need the bundle you can temporarily make it inactive by selecting it and clicking on the arrow button, this will move it to the Inactive section.

创建你自己的资源包

You can create your own bundle from the resources of your choice. Click on the Create bundle button. This will open a dialog box as shown below

The left hand section is for filling up information about the bundle like author name, website, email, bundle icon, etc. The right hand side provides a list of available resources. Choose the type of resource you wish to add in to the bundle from the drop-down above and add it to the bundle by selecting a resource and clicking on the arrow button.

警告

Make sure you add brush tips for used in the respective paintop presets you are adding to the bundle. If you don’t provide the brush tips then the brush presets loaded from this bundle will have a ‘X’ mark on the thumbnail denoting that the texture is missing. And the brush preset won’t be the same

Once you have added all the resources you can create bundle by clicking on the Save button, the bundle will be saved in the location you have specified. You can then share this bundle with other artists or load it on other workstations.

删除备份文件

When you delete a preset from Krita, Krita doesn’t actually delete the physical copy of the preset. It just adds it to a black list so that the next time when you start Krita the presets from this list are not loaded. To delete the brushes from this list click on Delete Backup Files.

删除已导入的资源包

In case you wish to delete the bundles you have imported permanently click on the Open Resource Folder button in the Manage Resources dialog. This will open the resource folder in your file manager / explorer. Go inside the bundles folder and delete the bundle file which you don’t need any more. The next time you start Krita the bundle and its associated resources will not be loaded.

Krita 的资源类型

笔刷预设

笔尖

渐变

图案

工作空间

笔刷预设

Paint Op presets store the preview thumbnail, brush-engine, the parameters, the brush tip, and, if possible, the texture. They are saved as .kpp files

For information regarding the brush system, see Brushes.

The Docker

The docker for Paint-op presets is the 笔刷预设. Here you can tag, add, remove and search paint op presets.

Editing the preview thumbnail

You can edit the preview thumbnail in the brush-scratchpad, but you can also open the *.kpp file in Krita to get a 200x200 file to edit to your wishes.

笔尖

These are the brush tip or textures used in the brush presets. They can be png files or .abr file from Photoshop or .gbr files from gimp

注解

Currently Krita only import a brush texture from abr file, you have to recreate the brushes by adding appropriate values in size, spacing etc.

They can be modified/tagged in the brush preset editor.

See 笔尖 for more info.

Example: Loading a Photoshop Brush (*.ABR)

For some time Photoshop has been using the ABR format to compile brushes into a single file. Krita can read and load .ABR files, although there are certain features. For this example we will use an example of an .ABR file that contains numerous images of types of trees and ferns. We have two objectives. The first is to create a series of brushes that we an quickly access from the Brush Presets dock to easily put together a believable forest. The second is to create a single brush that we can change on the fly to use for a variety of flora, without the need to have a dedicated Brush Preset for each type.

First up is download the file (.ZIP, .RAR,…) that contains the .ABR file and any licensing or other notes. Be sure to read the license if there is one!

Extract the .ABR file into Krita’s home directory for brushes.

In your Brush Presets dock, select one of your brushes that uses the Pixel Brush Engine. An Ink Pen or solid fill type should do fine.

Open the Brush Settings Editor (F5 )

Click on the tab “Predefined” next to “Auto”. This will change the editor to show a scrollable screen of thumbnail images, most will be black on a white background. At the bottom of the window are two icons:

Click on the blue file folder on the left and then navigate to where you saved your .ABR file and open it.

If everything went fine you will see a number of new thumbnails show up at the bottom of the window. In our case, they would all be thumbnails representing different types of trees. Your job now is to decide which of these you want to have as Brush Presets (Just like your Pencil) or you think you’ll only use sporadically.

Let’s say that there is an image of an evergreen tree that we’re pretty sure is going to be a regular feature in some of our paintings and we want to have a dedicated brush for it. To do this we would do the following:

Click on the image of the tree we want

Change the name of the brush at the very top of the Brush Editor Settings dialog. Something like “Trees - Tall Evergreen” would be appropriate.

Click the “Save to Presets” button

Now that you have a “Tall Evergreen” brush safely saved you can experiment with the settings to see if there is anything you would like to change, for instance, by altering the size setting and the pressure parameter you could set the brush to change the tree size depending on the pressure you were using with your stylus (assuming you have a stylus!).

Once you’re satisfied with your brush and its settings you need to do one last thing (but click Overwrite Brush first!)

It’s time now to create the Brush Preview graphic. The simplest and easiest way to do this for a brush of this type is to clear out the ScratchPad using the Reset button. Now, center your cursor in the Brush Preview square at the top of the ScratchPad and click once. You should see an image of your texture (in this case it would be the evergreen tree). In order to work correctly though the entire image should fit comfortably within the square. This might mean that you have to tweak the size of the brush. Once you have something you are happy with then click the Overwrite Brush button and your brush and its preview image will be saved.

An alternative method that requires a little more work but gives you greater control of the outcome is the following:

Locate the Brush Preview thumbnail .KPP file in Krita and open it to get a 200x200 file that you can edit to your wishes.

You’re ready to add the next texture! From here on it’s just a matter of wash, rinse and repeat for each texture where you want to create a dedicated Brush Preset.

渐变

Accessing a Gradient

The Gradients configuration panel is accessed by clicking the Gradients icon (usually the icon next to the disk).

Gradients are configurations of blending between colors. Krita provides over a dozen preset dynamic gradients for you to choose from. In addition, you can design and save your own.

Some typical uses of gradients are:

Fill for vector shapes.

Gradient tool

As a source of color for the pixel brush.

There is no gradients docker. They can only be accessed through the gradient “quick-menu” in the toolbar.

Editing a Gradient

Krita has two gradient types:

Segmented Gradients, which are compatible with GIMP, have many different features but are also a bit complicated to make.

Stop Gradients, which are saved as SVG files and similar to how most applications do their gradients, but has less features than the segmented gradient.

Initially we could only make segmented gradients in Krita, but in 3.0.2 we can also make stop gradients.

You can make a new gradient by going into the drop-down and selecting the gradient type you wish to have. By default Krita will make a stop-gradient.

Stop Gradients

Stop gradients are very straight forward:

mouseleft on the gradient to add a stop.

mouseleft on the stops to select them, and drag to move them.

mouseright on the stops to remove them. A stop gradient will not allow you to remove stops if there’s only two left.

A selected stop can have its color and transparency changed using the color button and the opacity slider below.

As per SVG spec, you can make a sudden change between stops by moving them close together. The stops will overlap, but you can still drag them around.

Segmented Gradients

Segmented gradients are a bit more tricky. Instead of going from color to color, it allows you to define segments, which each can have a begin and end color.

mouseright the gradient to call up this menu:

拆分段

This splits the current segment in two, using the white arrow, the segment middle as the place to split. It will also use the color at the white arrow to define the new colors in place in the new segments.

Duplicate segment

Similar to split, but instead the two new segments are copies of the old one.

Mirror segment.

Mirrors the segment colors.

Remove segment

Removes the segment.

mouseleft + dragging the black arrows will resize the segments attaching to those arrows. mouseleft + dragging the white arrows will change the mid point of that segment, changing the way how the mixture is made.

At the bottom, you can set the color and transparency of either part of the segment.

You can also set the blending. The first is the interpolation mode:

Linear - Does a linear blending between both segments.

Curved - This causes the mix to ease-in and out faster.

Sine - Uses a sine function. This causes the mix to ease in and out slower.

Sphere, increasing - This puts emphasis on the later color during the mix.

Sphere, decreasing - This puts emphasis on the first color during the mix.

Finally, there’s the model:

RGB

Does the blending in RGB model.

HSV clockwise

Blends the two colors using the HSV model, and follows the hue clockwise (red-yellow-green-cyan-blue-purple). The above screenshot is an example of this.

HSV counter-clock wise.

Blends the color as the previous options, but then counter-clockwise.

图案

Patterns are small raster files that tile. They can be used as following:

As fill for a vector shape.

As fill-tool color.

As height-map for a brush using the ‘texture’ functionality.

As fill for a generated layer.

Adding new patterns

You can add new patterns via the pattern docker, or the pattern-quick-access menu in the toolbar. At the bottom of the docker, beneath the resource-filter input field, there are the Import resource and Delete resource buttons. Select the former to add png or jpg files to the pattern list.

Similarly, removing patterns can be done by pressing the :guilabel::Delete resource button. Krita will not delete the actual file then, but rather black list it, and thus not load it.

Temporary patterns and generating patterns from the canvas

You can use the pattern drop-down to generate patterns from the canvas but also to make temporary ones.

First, draw a pattern and open the pattern drop-down.

Then go into custom and first press Update to show the pattern in the docker. Check if it’s right. Here, you can also choose whether you use this layer only, or the whole image. Since 3.0.2, Krita will take into account the active selection as well when getting the information of the two.

Then, click either Use as Pattern to use it as a temporary pattern, or Add to predefined patterns to save it into your pattern resources!

You can then start using it in Krita by for example making a canvas and doing Edit –> Fill with Pattern.

图案

You can tag patterns here, and filter them with the resource filter.

工作空间

Workspaces are basically saved configurations of dockers. Each workspace saves how the dockers are grouped and where they are placed on the screen. They allow you to easily move between workflows without having to manual reconfigure your setup each time. They can be as simple or as complex as you want.

Workspaces can only be accessed via the toolbar or Window ‣ Workspaces There’s no docker for them. You can save workspaces, in which your current configuration is saved. You can also import them (from a *.kws file), or delete them (which black lists them).

Workspaces can technically be tagged, but outside of the resource manager this is not possible.

Window Layouts

When you work with multiple screens, a single window with a single workspace won’t be enough. For multi monitor setups we instead can use sessions. Window layouts allow us to store multiple windows, their positions and the monitor they were on.

You can access Window Layouts from the workspace drop-down in the toolbar.

Primary Workspace Follows Focus

This treats the workspace in the first window as the ‘primary’ workspace, and when you switch focus, it will switch the secondary windows to that primary workspace. This is useful when the secondary workspace is a very sparse workspace with few dockers, and the primary is one with a lot of different dockers.

Show Active Image In All Windows

This will synchronise the currently viewed image in all windows. Without it, different windows can open separate views for an image via Window ‣ New View ‣ document.kra.

会话

Sessions allow Krita to store the images and windows opened. You can tell Krita to automatically save current or recover previous sessions if so configured in the 其他.

You can access sessions from File ‣ Sessions.

对选区描边

Sometimes, you want to add an even border around a selection. Stroke Selection allows you to do this. It’s under Edit ‣ Stroke Selection

First make a selection and call up the menu:

The main options are about using the current brush, or lining the selection with an even line. You can use the current foreground color, the background color or a custom color.

Using the current brush allows you to use textured brushes:

Lining the selection also allows you to set the background color, on top of the line width in pixels or inches:

This creates nice silhouettes:

工具

The contents of the toolbox docker.

形状选择工具

形状编辑工具

文字工具

渐变编辑工具

图案编辑工具

西文书法工具

手绘笔刷工具

直线工具

矩形工具

椭圆工具

多边形工具

折线工具

贝塞尔曲线工具

手绘路径工具

力学笔刷工具

多重笔刷工具

裁切工具

移动工具

变形工具

填充工具

渐变工具

拾色器工具

着色蒙版

网格工具

透视网格工具

智能补丁工具

绘画辅助尺工具

参考图像工具

测量工具

矩形选区工具

椭圆选区工具

轮廓选区工具

多边形选区工具

相连选区工具

路径选区工具

相似颜色选区工具

缩放工具

平移工具

形状选择工具

The shape selection tool used to be called the “default” tool. This had to do with Krita being part of an office suite once upon a time. But this is no longer the case, so we renamed it to its purpose in Krita: Selecting shapes! This tool only works on vector layers, so trying to use it on a paint layer will give a notification.

After you create vector shapes, you can use this tool to select, transform, and access the shape’s options in the tool options docker. There are a lot of different properties and things you can do with each vector shape.

选择

Selecting shapes works as follows. You can click on a shape to select a single shape. You can select multiple shapes with click drag.

There’s two types of drag action, a blue one and a green one. The blue one is created by dragging from left to right, and will only select shapes that are fully covered by it. The green selection is created from right to left and will select all shapes it touches.

旋转、移动、缩放、切变

Once an object is selected, a dashed box will appear around the object. There are handles that you can pull and stretch the box to scale it. If you move your cursor just outside the corner handles you can rotate the object.

工具选项

The tool options of this menu are quite involved, and separated over 3 tabs.

几何属性

Geometry is the first section. It allows you to precisely set the x, y, width and height.

锚点锁定

This is not implemented at the moment.

Uniform scaling

When enabled, it will scale the stroke width with the shape, when not enabled, the stroke with will stay the same.

Global coordinates

Determines whether the width and height bars use the width and height of the object, while taking transforms into account.

不透明度

The general opacity, or transparency, of the object.

描边

The stroke tab determines how stroke around the object should look.

The first set of buttons to choose is the fill of the stroke. This has the same features as the fill of the shape, so scroll down a bit for details on that.

Then, there’s the settings for the stroke style.

厚度

The width of the stroke is determined by this entry. When creating a shape, Krita will use the current brush size to determine the width of the stroke.

Cap and corner style

If you press the button after the thickness entry, you will be able to set the stroke cap and the stroke corner style.

Line-style

Determines whether the stroke is solid or uses dashes and dots.

马克笔颜色

Which markers can be added to the stroke. Markers are little figures that will appear at the start, end or all the nodes in between depending on your configuration.

填充

The fill of the shape. As this has the same features as the fill of the stroke, this is explained here as well.

A fill can be a flat color, a gradient or a pattern. Or it can be nothing (transparent)

未分组

No fill. It’s transparent.

彩色

A flat color, you can select a new one by pressing the color button.

渐变色

This one has a few more options.

文件系统

A linear or radial gradient.

转发

How the gradient repeats itself.

预设

A quick menu for choosing a base gradient to edit.

You can edit the gradient in two ways. The first one is the actual gradient in the docker that you can manipulate. Vectors always use stop-gradients. The other way to edit gradients is editing their position on canvas.

模式

Patterns aren’t implemented yet.

右键菜单

The shape selection tool has a nice right click menu that gives you several features. If you have an object selected, you can perform various functions like cutting, copying, or moving the object to the front or back.

If you have multiple objects selected you can perform “Logical Operators” on them, or boolean operations as they are commonly called. It will be the last item on the right-click menu. You can combine, subtract, intersect, or split the objects.

形状编辑工具

The shape editing tool is for editing vector shapes. In Krita versions before 4.0 it would only show up in the docker when you had a vector shape selected. In Krita 4.0, this tool is always visible and has the Shape Properties docker as a part of it.

You can access the Edit Shapes tool by clicking on the icon in the toolbox, but you can also access it by pressing Enter when in the Shape Selection tool and having a shape selected that can be most efficiently edited with the edit shapes tool (right now, that’s all shapes but text).

在画布上编辑形状

As detailed further in the Tool Options, there’s a difference between path shapes and specialized vector shapes that make it easy to have perfect ellipses, rectangles and more.

路径形状

Path shapes can be recognized by the different nodes they have.

Paths in Krita are mostly bezier curves, and are made up of nodes. For straight lines, the nodes are connected by a line-segment and that’s it. For curved lines, each node has a side handle to allow curving of that segment using the cubic bezier curve algorithm [https://en.wikipedia.org/wiki/B%C3%A9zier_curve#/media/File:B%C3%A9zier_3_big.gif] .

What that means, in short, is that moving the side handles into a given direction will make the segment curve in that direction, and the longer the line of the node to the side handle, the stronger the curving.

Selecting Nodes for Editing

You can select a single node with mouseleft, they will turn bright green if selected.

mouseleft + Shift on unselected nodes will add them to a selection.

mouseleft + drag will make a selection rectangle. All nodes whose handles are touched by the rectangle will be selected. This combines with mouseleft + Shift above.

Selected Nodes

You can add and remove side handles from a selected node with mouseleft + Shift.

Krita has several node-types that allow you control the side handles more efficiently. These are the corner, smooth and symmetric modes.

Corner

Represented by a circle, the corner type allows you to have handles that can point in different directions and have different lengths.

平滑

Represented by a square, the smooth type will ensure a smooth transition by always pointing the handles into opposite directions, but they can still have different lengths.

Symmetric

Represented by a diamond, the symmetric node will force handles to always point in opposite directions and have the same length.

mouseleft + Ctrl on a selected node will cycle between the node-types.

Del will remove the selected node.

Selected Segments

Segments are the lines between nodes. Hovering over a segment will show a dotted line, indicating it can be selected.

You can mouseleft and drag on a segment to curve it to the mouse point. Clicking on different parts of the segment and dragging will curve it differently.

Double mouseleft on a segment will add a node on the segment under the mouse cursor. The new node will be selected.

Other Shapes

Shapes that aren’t path shapes only have a single type of node: A small diamond like, that changes the specific parameters of that shape on-canvas. For example, you can change the corner radius on rectangles by dragging the nodes, or make the ellipse into a pie-segment.

工具选项

Path shapes have options. The top left options are for converting to different anchor point types. The bottom left options are for adding or removing points. The top right options are for converting the line to different types. The bottom right options are for breaking and joining line segments.

The tool options of the Edit Shapes Tool change depending on the type of shape you have selected. With the exception of the path shape, all shapes have a Convert to Path action, which converts said shape to a path shape.

路径形状

toolbeziercurve, toolline, toolpolyline, toolpolygon, toolfreehandpath

Path shapes are the most common shape and can be made with the following tools

贝塞尔曲线工具

直线工具

多边形工具

折线工具

手绘路径工具

Node Editing

Edit the nodes.

Corner Point

Make the selected node a corner or cusp. This means that the side handles can point in different directions and be different lengths.

Smooth Point

Make the selected node smooth. The two side handles will always point in opposite directions, but their length can be different.

对称点

Make the selected node smooth. The two side handles will always point in opposite directions, and their length will stay the same.

Insert Point

Insert a new node into the middle of the selected segment.

Remove Point

Remove the selected node.

Line Segment Editing

Edit line segments between nodes.

Segment To Line

Make the current segment a straight line.

Segment To Curve

Make the current segment a curve: It’ll add side handles for this segment to the nodes attached to it.

Make Line Point

Turn the selected node into a sharp corner: This will remove the side handles.

Make Curve Point

Turn the selected node into one that can curve: This will add side handles to the node.

Break at Point

Break the path at this point.

Break Segment

Break the path at the selected segment.

Join with Segment

Join two nodes that are only attached on one side with a segment.

Merge Points

Merge two nodes into one, if the nodes are adjacent or if both nodes are only attached on one side with a segment.

Rectangle Shapes

Rectangle shapes are the ones made with the 矩形工具. It has extra options to make rounded corners easy.

Corner radius x

The radius of the y-axis of the corner curve.

Corner radius y

The radius of the y-axis of the corner curve.

Ellipse Shapes

Ellipse shapes are the ones made with the 椭圆工具.

文件系统

The type of ellipse shape it is.

弧

An arc shape will keep the path open when it isn’t fully circular.

饼图

A pie shape will add two extra lines to the center when the shape isn’t fully circular, like how one cuts out a piece from a pie.

Cord

A cord shape will add a straight line between the two ends if the path isn’t fully circular, as if a cord is being strung between the two points.

Start Angle

The angle at which the shape starts.

End Angle

The angle at which the shape ends.

Close Ellipse

An action to quickly make the ellipse fully circular.

文字工具

This tool allows you to add text to your artwork.

You use it by doing mouseleft + drag to create a rectangular selection. When releasing mouseleft a default text will be created and the text editor window will pop-up.

Hovering over other text shapes will highlight their bounding box. mouseleft on a highlighted text will select it as the active text.

工具选项

创建新文本自…

This contains features with which to create new texts, the following items are available:

字体

The letter type used by newly created texts.

Size in pt

The letter-size used by newly created texts. It is in pts (points), which is a common standard for fonts that is measured 72 points per inch. It therefore will stay proportionally the same size if you increase or decrease canvas dpi.

Anchor/Align text to the left/middle/right

Text alignment. This allows you to align text to the left, center it, or to the right. This is called text-anchor because svg 1.1’s multiline text only uses text-anchor, and this is a slight bit different than text-align (and also the reason justify isn’t available at the moment).

编辑文本

This will summon the text editor for the currently selected shape. This can be quickly invoked with either pressing Enter or Double - mouseleft the shape.

文字编辑器

A small window for all your text editing needs. The Text Editor has two tabs: Rich text and SVG source.

Activating

You can use the Text tool to first create a text box. There are a few options in the tool options if you want to customize how the text will be adding. You will need to drag a rectangle on the canvas to create the text area. Once your text is created, you can edit the text from two ways:

Select the text with the shape selection tool (first tool). Press the Enter key. The text editor will appear.

Select the text with the shape selection tool (first tool). Then click the Text tool. In the tool options there is an Edit Text button. When you click that the text editor window will appear.

编辑

If you are unfamiliar with the way svg text works, use the rich text tab, it will allow you to edit the text as you see it, at the cost of not having all functionality.

If you are a little bit more familiar with svg text, you can directly edit the SVG source. Do note that certain things, like stroke, fill, letter-spacing don’t convert back to the rich text editor, so do be careful when switching back.

Press Save as you’re done with your edits to preview them on canvas.

文件

Save Ctrl + S

Save current edits to the text on canvas.

Close Ctrl + W

Close the editor

编辑

Basic editing functions

Undo Ctrl + Z

Undo the last action in the text editor.

Redo Ctrl + Shift + Z

Redo the last undone action in the text editor.

Cut Ctrl + X

Cut selected text to the clipboard.

Copy Ctrl + C

Copy selected text to the clipboard.

Paste Ctrl + V

Paste text from the clipboard.

Select all Ctrl + A

Select all text in the active editor.

Deselect Ctrl + Shift + A

Deselect any selected text.

Find Ctrl + F

Pops up a window with an input to find the given text in the active editor.

Find Next F3

Searches for the next text using the last search key.

Find Previous Shift + F3

Searches for the last text using the last search key.

Replace… Ctrl + R

Pops up a dialog with two inputs: The string you wish to find, and the string you wish to replace it with. Will always replace ALL found instances.

查看

Zoom Out Ctrl + -

Zoom out the text.

Zoom In Ctrl + +

Zoom in the text.

Insert

Special Character… Alt + Shift + C

Pops up a dialog that allows you to search for special characters that are difficult to type in with your keyboard.

格式化

Bold Ctrl + B

Set the font-weight to bold.

Italic Ctrl + I

Sets the selected text italic.

Underline Ctrl + U

Underline the selected text.

Strike-Through

Adds a strike-through text decoration.

Superscript Ctrl + Shift + P

Sets the text to super-script baseline.

Subscript Ctrl + Shift + B

Sets the text to subscript baseline.

质量

Sets the font weight a little more specifically. Possibilities are… Light, Normal, Bold, and Black.

左对齐

Align the selected paragraph to the left.

Align Center Ctrl + Alt + C

Center the selected paragraph.

Align Right Ctrl + Alt + R

Align the selected paragraph to the right.

设置

设置…

Calls up the text-editor settings dialog.

文本编辑器设置

The settings that can be configured for the text editor.

编辑器模式

Whether you want both the Rich Text Editor and the SVG Source Editor, or only one of either.

色彩

Here you can configure the syntax highlighting for the SVG source.

关键字

These highlights important characters like <, /, and >

元素

The format for highlighting the element tag name. text and tspan are examples of element names.

属性

The format for highlighting the attributes of the tag. For example, font-family, when it isn’t in the style tag is usually written as an attribute.

价值

The format for highlighting value of attributes.

评论

This highlights xml comments, which are written as following: <!-- This is an xml comment -->. Comments are pieces of text that never get interpreted.

Editor Text Color

The main color of the editor.

Editor background color

The main background color of the editor.

字体

This allows you to filter the selection of fonts in the editor by writing system. Some systems have a lot of fonts specifically for showing foreign languages properly, but these might not be useful for you. You just tick the writing systems which you use yourself, and the font drop-down will only show fonts that have full support for that language.

在 SVG 源代码页面微调排版

So, the rich text editor cannot control all functionality that SVG text allows for. For that, you will need to touch the SVG source directly. But to do that, you will first need to go to the text editor settings and enable either SVG Source or Both. The Rich Text editor will lose some information, so if you go all out, use SVG Source.

Word-spacing, Letter-spacing and Kerning

These three are written and read from the rich text tab, but have no sliders associated with them, because there was no time.

Kerning

Kerning, in SVG 1.1 [https://www.w3.org/TR/SVG/text.html#KerningProperty] behaves slightly differently than font-kerning in css. Krita by default uses the auto property for this, which means it is on. To turn it off use kerning:0 in the style section of the text.

<text style="kerning:0; font-family:Dancing Script; font-size:18pt; font-size-adjust:0.265625">
    <tspan>No Kerning on Valhalla Tower.</tspan>
</text>

Letter-spacing

This is the distance between letters in pts, usually. Just write letter-spacing in the style and add a distance in pts behind it. A negative value will decrease the value between letters.

Word-spacing

This is the extra distance between words, defaulting to pts. By default, word-spacing: 0; will have it use only the width of the space character for that font. A negative value will decrease the amount of space between words:

<text style="font-family:Noto Serif; font-size:12pt; font-size-adjust:0.389915; text-anchor:middle">
    <tspan>No Adjustment.</tspan>
    <tspan style="letter-spacing:2" x="0" dy="22pt">Letter spacing: 2</tspan>
    <tspan style="letter-spacing:-2" x="0" dy="22pt">Letter spacing: -2</tspan>
    <tspan style="word-spacing:5" x="0" dy="22pt">Word spacing: 5</tspan>
    <tspan style="word-spacing:-5" x="0" dy="22pt">Word spacing: -5</tspan>
</text>

x, y, dx, dy

These are even finer-grained controls that can be used to position text. However, they CANNOT be reliably converted to the format of the rich text editor, because the rich text editor uses these to figure out if a line is a new-line and thus writes to these.

X and Y

X and Y are absolute coordinates. But because you cannot change the absolute coordinates of the text from the editor, these get added to the position when they show up in a tspan.

dx and dy

These are relative coordinates to the position of the previous letter.

Font-stretch and Small-caps

These can also be stored and written to the rich text tab’s internal format, but they don’t get used in the on screen text object.

Dominant Baseline, Alignment baseline, Font-size-adjust, Writing mode, Glyph-orientation, rotate

These are not stored in the rich text right now, and while they can be written into the SVG text, the SVG text-shape doesn’t do anything with them.

Krita generates font-size-adjust for the font when coming from rich text, as this can help designers when they want to use the SVG source as a basis for later adjustments.

渐变编辑工具

4.0 版后已移除: This tool has been removed in Krita 4.0, and its functionality has been folded into the 形状选择工具.

This tool allows you to edit the gradient on canvas, but it only works for vector layers. If you have a vector shape selected, and draw a line over the canvas, you will be able to see the nodes, and the stops in the gradient. Move around the nodes to move the gradient itself. Select the stops to change their color in the tool options docker, or to move their position in the on canvas gradient. You can select preset gradient in the tool docker to change the active shape’s gradient to use those stops.

图案编辑工具

4.0 版后已移除: The pattern editing tool has been removed in 4.0, currently there’s no way to edit pattern fills for vectors

The Pattern editing tool works on Vector Shapes that use a Pattern fill. On these shapes, the Pattern Editing Tool allows you to change the size, ratio and origin of a pattern.

在画布上编辑

You can change the origin by click dragging the upper node, this is only possible in Tiled mode.

You can change the size and ratio by click-dragging the lower node. There’s no way to constrain the ratio in on-canvas editing, this is only possible in Original and Tiled mode.

工具选项

There are several tool options with this tool, for fine-tuning:

First there are the Pattern options.

重复：

This can be set to

原始：

This will only show one, unstretched, copy of the pattern.

Tiled (Default):

This will let the pattern appear tiled in the x and y direction.

拉伸:

This will stretch the Pattern image to the shape.

Reference point:

pattern origin. This can be set to

左上

上移

右上

左方

中间对齐

右方

左下

置底

右下.

参照点偏移:

For extra tweaking, set in percentages.

X:

offset in the X coordinate, so horizontally.

Y：

offset in the Y coordinate, so vertically.

平铺偏移:

The tile offset if the pattern is tiled.

图案大小:

Fine Tune the resizing of the pattern.

宽：

The width, in pixels.

高：

The height, in pixels.

And then there’s Patterns, which is a mini pattern docker, and where you can pick the pattern used for the fill.

西文书法工具

The Calligraphy tool allows for variable width lines, with input managed by the tablet. Press down with the stylus/left mouse button on the canvas to make a line, lifting the stylus/mouse button ends the stroke.

工具选项

填充

Doesn’t actually do anything.

书法

The drop-down menu holds your saved presets, the Save button next to it allows you to save presets.

Follow Selected Path

If a stroke has been selected with the default tool, the calligraphy tool will follow this path.

Use Tablet Pressure

Uses tablet pressure to control the stroke width.

Thinning

This allows you to set how much thinner a line becomes when speeding up the stroke. Using a negative value makes it thicker.

宽度

Base width for the stroke.

Use Tablet Angle

Allows you to use the tablet angle to control the stroke, only works for tablets supporting it.

角

The angle of the dab.

Fixation

The ratio of the dab. 1 is thin, 0 is round.

盒盖

Whether or not an stroke will end with a rounding or flat.

质量

How much weight the stroke has. With drag set to 0, high mass increases the ‘orbit’.

拖曳

How much the stroke follows the cursor, when set to 0 the stroke will orbit around the cursor path.

注解

The calligraphy tool can be edited by the edit-line tool, but currently you can’t add or remove nodes without converting it to a normal path.

手绘笔刷工具

The default tool you have selected on Krita start-up, and likely the tool that you will use the most.

The freehand brush tool allows you to paint on paint layers without constraints like the straight line tool. It makes optimal use of your tablet’s input settings to control the brush-appearance. To switch the brush, make use of the brush-preset docker.

快捷键和粘滞键

The freehand brush tool’s hotkey is B.

The alternate invocation is the ‘’color picker’’ (standardly invoked by Ctrl) Press Ctrl to switch the tool to “color picker”, use left or right click to pick fore and background color respectively. Release the Ctrl to return to the freehand brush tool.

The Primary setting is “size”. (standardly invoked by Shift) Press Shift and drag outward to increase brush size. Drag inward to decrease it.

You can also press V as a stickykey for the straight-line tool.

The hotkey can be edited in Settings ‣ Configure Krita ‣ Configure Shortcuts. The sticky-keys can be edited in Settings ‣ Configure Krita ‣ Canvas Input Settings.

工具选项

平滑

Smoothing, also known as stabilising in some programs, allows the program to correct the stroke. Useful for people with shaky hands, or particularly difficult long lines.

The following options can be selected:

无平滑.

The input from the tablet translates directly to the screen. This is the fastest option, and good for fine details.

基本平滑.

This option will smooth the input of older tablets like the Wacom Graphire 3. If you experience slightly jagged lines without any smoothing on, this option will apply a very little bit of smoothing to get rid of those lines.

Weighted smoothing:

This option allows you to use the following parameters to make the smoothing stronger or weaker:

距离

The distance the brush needs to move before the first dab is drawn. (Literally the amount of events received by the tablet before the first dab is drawn.)

Stroke Ending

This controls how much the line will attempt to reach the last known position of the cursor after the left-mouse button/or stylus is lifted. Will currently always result in a straight line, so use with caution.

平滑压力

This will apply the smoothing on the pressure input as well, resulting in more averaged size for example.

等比例距离

This makes it so that the numbers involved will be scaled along the zoom level.

防抖

This option averages all inputs from the tablet. It is different from weighted smoothing in that it allows for always completing the line. It will draw a circle around your cursor and the line will be a bit behind your cursor while painting.

距离

This is the strength of the smoothing.

推迟

This toggles and determines the size of the dead zone around the cursor. This can be used to create sharp corners with more control.

Finish Line

This ensures that the line will be finished.

Stabilize sensors

Similar to Smooth Pressure, this allows the input (pressure, speed, tilt) to be smoother.

等比例距离

This makes it so that the numbers involved will be scaled along the zoom level.

助手

Ticking this will allow snapping to 绘画辅助尺工具, and the hotkey to toggle it is Ctrl + Shift + L. See 借助辅助工具绘画 for more information.

The slider will determine the amount of snapping, with 1000 being perfect snapping, and 0 being no snapping at all. For situations where there is more than one assistant on the canvas, the defaultly ticked Snap Single means that Krita will only snap to a single assistant at a time, preventing noise. Unticking it allows you to chain assistants together and snap along them.

直线工具

This tool is used to draw lines. Click the mouseleft to indicate the first endpoint, keep the button pressed, drag to the second endpoint and release the button.

快捷键和粘滞键

To activate the Line tool from freehand brush mode, use V. Use other keys afterwards to constraint the line.

Use Shift while holding the mouse button to constrain the angle to multiples of 15º. You can press Alt while still keeping the mouseleft down to move the line to a different location.

注解

Using the Shift keys BEFORE pushing the holding the left mouse button/stylus down will, in default Krita, activate the quick brush-resize. Be sure to use Shift after

工具选项

The following options allow you to modify the end-look of the straight-line stroke with tablet-values. Of course, this only work for tablets, and currently only on Paint Layers.

使用传感器

This will draw the line while taking sensors into account. To use this effectively, start the line and trace the path like you would when drawing a straight line before releasing. If you make a mistake, make the line shorter and start over.

Preview

This will show the old-fashioned preview line so you know where your line will end up.

矩形工具

This tool can be used to paint rectangles, or create rectangle shapes on a vector layer. Click and hold mouseleft to indicate one corner of the rectangle, drag to the opposite corner, and release the button.

快捷键和粘滞键

There’s no default hotkey for switching to rectangle.

If you hold Shift while drawing, a square will be drawn instead of a rectangle. Holding Ctrl will change the way the rectangle is constructed. Normally, the first mouse click indicates one corner and the second click the opposite. With Ctrl, the initial mouse position indicates the center of the rectangle, and the final mouse position indicates a corner. You can press Alt while still keeping mouseleft down to move the rectangle to a different location.

You can change between the corner/corner and center/corner drawing methods as often as you want by pressing or releasing Ctrl, provided that you keep mouseleft pressed. With Ctrl pressed, mouse movements will affect all four corners of the rectangle (relative to the center), without Ctrl, one of the corners is unaffected.

工具选项

填充

Not filled.

The rectangle will be transparent from the inside.

前景色

The rectangle will use the foreground color as fill.

背景颜色.

The rectangle will use the background color as fill.

花式

The rectangle will use the active pattern as fill.

轮廓

无轮廓

The Rectangle will render without outline.

刷子

The Rectangle will use the current selected brush to outline.

注解

On vector layers, the rectangle will not render with a brush outline, but rather a vector outline.

椭圆工具

Use this tool to paint an ellipse. The currently selected brush is used for drawing the ellipse outline. Click and hold the left mouse button to indicate one corner of the ‘bounding rectangle’ of the ellipse, then move your mouse to the opposite corner. Krita will show a preview of the ellipse using a thin line. Release the button to draw the ellipse.

While dragging the ellipse, you can use different modifiers to control the size and position of your ellipse:

In order to make a circle instead of an ellipse, hold Shift while dragging. After releasing Shift any movement of the mouse will give you an ellipse again:

In order to keep the center of the ellipse fixed and only growing and shrinking the ellipse around it, hold Ctrl while dragging:

In order to move the ellipse around, hold Alt:

You can change between the corner/corner and center/corner dragging methods as often as you want by holding down or releasing Ctrl, provided you keep the left mouse button pressed. With Ctrl pressed, mouse movements will affect all four corners of the bounding rectangle (relative to the center), without Ctrl, the corner opposite to the one you are moving remains still. With Alt pressed, all four corners will be affected, but the size stays the same.

工具选项

多边形工具

With this tool you can draw polygons. Click the mouseleft to indicate the starting point and successive vertices, then double-click or press Enter to connect the last vertex to the starting point.

Shift + Z undoes the last clicked point.

工具选项

折线工具

Polylines are drawn like 多边形工具, with the difference that the double-click indicating the end of the polyline does not connect the last vertex to the first one.

贝塞尔曲线工具

You can draw curves by using this tool. Click the mouseleft to indicate the starting point of the curve, then click again for consecutive control points of the curve.

Krita will show a blue line with two handles when you add a control point. You can drag these handles to change the direction of the curve in that point.

On a vector layer, you can click on a previously inserted control point to modify it. With an intermediate control point (i.e. a point that is not the starting point and not the ending point), you can move the direction handles separately to have the curve enter and leave the point in different directions. After editing a point, you can just click on the canvas to continue adding points to the curve.

Pressing Del will remove the currently selected control point from the curve. Double-click the mouseleft on any point of the curve or press Enter to finish drawing, or press Esc to cancel the entire curve. You can use Ctrl while keeping the mouseleft pressed to move the entire curve to a different position.

While drawing Ctrl while dragging will push the handles both ways. Alt will create a sharp corner, and Shift will allow you to make a handle while at the end of the curve. mouseright will undo the last added point.

工具选项

4.1.3 新版功能:

自动平滑曲线

Toggling this will have nodes initialize with smooth curves instead of angles. Untoggle this if you want to create sharp angles for a node. This will not affect curve sharpness from dragging after clicking.

角度捕捉增量：

The angle to snap to.

Activate Angle Snap

Angle snap will make it easier to have the next line be at a specific angle of the current. The angle is determined by the Angle Snapping Delta.

手绘路径工具

With the Freehand Path Tool you can draw a path (much like the 轮廓笔刷引擎) the shape will then be filled with the selected color or pattern and outlined with a brush if so chosen. While drawing a preview line is shown that can be modified in pattern, width and color.

This tool can be particularly good for laying in large swaths of color quickly.

力学笔刷工具

Add custom smoothing dynamics to your brush. This will give you similar smoothing results as the normal freehand brush. There are a couple options that you can change.

质量

Average your movement to make it appear smoother. Higher values will make your brush move slower.

拖曳

A rubberband effect that will help your lines come back to your cursor. Lower values will make the effect more extreme.

Recommended values are around 0.02 Mass and 0.92 Drag.

多重笔刷工具

The Multibrush tool allows you to draw using multiple instances of a freehand brush stroke at once, it can be accessed from the Toolbox docker or with the default shortcut Q. Using the Multibrush is similar to toggling the 对称绘画工具, but the Multibrush is more sophisticated, for example it can mirror freehand brush strokes along a rotated axis.

The settings for the tool will be found in the tool options dock.

The multibrush tool has three modes and the settings for each can be found in the tool options dock. Symmetry and mirror reflect over an axis which can be set in the tool options dock. The default axis is the center of the canvas.

The three modes are:

提示数对称分布

Symmetry will reflect your brush around the axis at even intervals. The slider determines the number of instances which will be drawn on the canvas.

镜像

Mirror will reflect the brush across the X axis, the Y axis, or both.

平移

Translate will paint the set number of instances around the cursor at the radius distance.

雪花型

This works as a mirrored symmetry, but is a bit slower than symmetry+toolbar mirror mode.

The assistant and smoothing options work the same as in the 手绘笔刷工具, though only on the real brush and not its copies.

裁切工具

The crop tool can be used to crop an image or layer. To get started, choose the Crop tool and then click once to select the entire canvas. Using this method you ensure that you don’t inadvertently grab outside of the visible canvas as part of the crop. You can then use the options below to refine your crop. Press Enter to finalize the crop action, or use the Crop button in the tool options docker.

At its most basic, the crop tool allows you to size a rectangle around an area and reduce your image or layer to only that content which is contained within that area. There are several options which give a bit more flexibility and precision.

The two numbers on the left are the exact horizontal position and vertical position of the left and top of the cropping frame respectively. The numbers are the right are from top to bottom: width, height, and aspect ratio. Selecting the check boxes will keep any one of these can be locked to allow you to manipulate the other two without losing the position or ratio of the locked property.

中间对齐

Keeps the crop area centered.

增大

Allows the crop area to expand beyond the image boundaries.

Applies to

Lets you apply the crop to the entire image or only to the active layer. When you are ready, hit the Crop button and the crop will apply to your image.

Decoration

Help you make a composition by showing you lines that divide up the screen. You can for example show thirds here, so you can crop your image according to the Rule of Thirds.

连续裁切

If you crop an image, and try to start a new one directly afterwards, Krita will attempt to recall the previous crop, so you can continue it. This is the continuous crop. You can press Esc to cancel this and crop anew.

移动工具

With this tool, you can move the current layer or selection by dragging the mouse.

Move current layer

Anything that is on the selected layer will be moved

Move layer with content

Any content contained on the layer that is resting under the four-headed Move cursor will be moved

Move the whole group

All content on all layers will move. Depending on the number of layers this might result in slow and, sometimes, jerky movements. Use this option sparingly or only when necessary.

Shortcut move distance (3.0+)

This allows you to set how much, and in which units, the &larr;, &uarr;, &rarr; and &darr; actions will move the layer.

Large Move Scale (3.0+)

Allows you to multiply the movement of the Shortcut Move Distance when pressing Shift before pressing a direction key.

显示坐标

When toggled will show the coordinates of the top-left pixel of the moved layer in a floating window.

Constrained movement

If you click, then press Shift, then move the layer, movement is constrained to the horizontal and vertical directions. If you press Shift, then click, then move, all layers will be moved, with the movement constrained to the horizontal and vertical directions

使用滤镜的区段

Gives the top-left coordinate of the layer, can also be manually edited.

变形工具

The Transform tool lets you quickly transform the current selection or layer. Basic transformation options include resize, rotate and skew. In addition, you have the option to apply advanced transforms such as Perspective, Warp, Cage and Liquid. These are all powerful options and will give you complete control over your selections/layers.

When you first invoke the tool, handles will appear at the corners and sides, which you can use to resize your selection or layer. You can perform rotations by moving the mouse above or to the left of the handles and dragging it. You can also click anywhere inside the selection or layer and move it by dragging the mouse.

You can fine-tune the transform tool parameters using tool options docker. The parameters are split between five tabs: Free Transform, Warp, Perspective, Cage and Liquify.

Free Transform docker

自由变形

This allows you to do basic rotation, resizing, flipping, and even perspective skewing if you hold Ctrl. Holding the Shift key will maintain your aspect ratio throughout the transform.

Free transform in action.

If you look at the bottom, there are quick buttons for flipping horizontally, vertically and rotating 90 degrees left and right. Furthermore, the button to the left of the anchor point widget allows you to choose whether to always transform using the anchor point, or not.

Video of how to use the anchor point for resizing. [https://www.youtube.com/watch?v=grzccBVd0O8]

透视变形

While free transform has some perspective options, the perspective transform allows for maximum control. You can drag the corner points, or even the designated vanishing point.

You can also change the size, shear and position transform while remaining in perspective with the tool-options.

Perspective transform

网面变形

Warp allows you to deform the image by dragging from a grid or choosing the dragging points yourself.

Warp Option

Free transform in action.

There are warp options: Rigid, Affine and Similtude. These change the algorithm used to determine the strength of the deformation. The flexibility determines, how strong the effect of moving these points are.

锚点

You can divide these either by subdivision or drawing custom points.

Subdivision

This allows you to subdivide the selected area into a grid.

平局

Draw the anchor points yourself. Locking the points will put you in transform mode. Unlocking the points back into edit mode.

外框变形

Create a cage around an image, and when it’s closed, you can use it to deform the image. If you have at the least 3 points on the canvas, you can choose to switch between deforming and editing the existing points.

Transforming a straight banana to be curved with the cage tool

Hotkeys

Both Cage and Warp use little nodes. These nodes can be selected and deselected together by pressing Ctrl before clicking nodes.

Then you can move them by pressing the cursor inside the bounding box. Rotating is done by pressing and dragging the cursor outside the bounding box and scaling the same, only one presses Ctrl before doing the motion.

液化变形

Like our deform brush, the liquify brush allows you to draw the deformations straight on the canvas.

步

Drag the image along the brush stroke.

比例

Grow/Shrink the image under the cursor.

旋转

Twirl the image under the cursor

偏移量

Shift the image under the cursor.

悔棋

Erases the actions of other tools.

Liquify used to turn an apple into a pear

In the options for each brush there are:

权限模式

This is either Wash or Build up. Wash will normalize the effect to be between none, and the amount parameter as maximum. Build up will just add on until it’s impossible.

尺寸

The brush size. The button to the right allow you to let it scale with pressure.

金额

The strength of the brush. The button to the right lets it scale with tablet pressure.

Flow

Only applicable with Build up.

间距

The spacing of the liquify dabs.

逆序

Reverses the action, so grow becomes shrink, rotate results in clockwise becoming counter-clockwise.

liquify on the left and deform brush on the right.

Krita also has a 扭曲笔刷引擎 which is much faster than liquify, but has less quality. If you are attempting to make liquefy a little faster, note that it speeds up with the less information it needs to process, so working with liquefy within a selection or using liquefy on a separate layer with little on it will greatly enhance the speed.

递归变形

The little spider icon on the lower-left of the transform tool options is the Recursive Transform.

Recursive transform transforms all the layers in the group, so with this apple, both the lineart as the fill will be transformed.

Recursive transform, when toggled, allows you to mass-transform all the layers in a group when only transforming the group.

持续变形

If you apply a transformation, and try to start a new one directly afterwards, Krita will attempt to recall the previous transform, so you can continue it. This is the continuous transform. You can press Esc to cancel this and start a new transform, or press Reset in the tool options while no transform is active.

变形蒙版

These allow you make non-destructive transforms, check here for more info.

填充工具

Krita has one of the most powerful and capable Fill functions available. The options found in the Tool Options docker and outlined below will give you a great deal of flexibility working with layers and selections.

To get started, clicking anywhere on screen with the fill-tool will allow that area to be filed with the foreground color.

工具选项

Fast Mode

This is a special mode for really fast filling. However, many functions don’t work with this mode.

阀值

Determines when the fill-tool sees another color as a border.

扩张选区

This value extends the shape beyond its initial size.

Feathering Radius

This value will add a soft border to the filled-shape.

Fill Entire Selection

Activating this will result in the shape filling the whole of the active selection, regardless of threshold.

限制到当前图层

Activating this will prevent the fill tool from taking other layers into account.

Use Pattern

Ticking this will result in the active pattern being used.

渐变工具

The Gradient tool is found in the Tools Panel. Left-Click dragging this tool over the active portion of the canvas will draw out the current gradient. If there is an active selection then, similar to the 填充工具, the paint action will be confined to the selection’s borders.

工具选项

形状：

线性

This will draw the gradient straight.

放射

This will draw the gradient from a center, defined by where you start the stroke.

平方

This will draw the gradient from a center in a square shape, defined by where you start the stroke.

圆锥

This will wrap the gradient around a center, defined by where you start the stroke.

Conical-symmetric

This will wrap the gradient around a center, defined by where you start the stroke, but will mirror the wrap once.

成形

This will shape the gradient depending on the selection or layer.

重复：

未分组

This will extend the gradient into infinity.

转发

This will repeat the gradient into one direction.

交替

This will repeat the gradient, alternating the normal direction and the reversed.

逆序

Reverses the direction of the gradient.

Antialias threshold

Doesn’t do anything, original function must have gotten lost in a port.

拾色器工具

This tool allows you to choose a point from the canvas and make the color of that point the active foreground color. When a painting or drawing tool is selected the Color Picker tool can also be quickly accessed by pressing Ctrl.

There are several options shown in the Tool Options docker when the Color Picker tool is active:

The first drop-down box allows you to select whether you want to sample from all visible layers or only the active layer. You can choose to have your selection update the current foreground color, to be added into a color palette, or to do both.

4.1 新版功能: The middle section contains a few properties that change how the Color Picker picks up color; you can set a Radius, which will average the colors in the area around the cursor, and you can now also set a Blend percentage, which controls how much color is “soaked up” and mixed in with your current color. Read 混合颜色 for information about how the Color Picker’s blend option can be used as a tool for off-canvas color mixing.

At the very bottom is the Info Box, which displays per-channel data about your most recently picked color. Color data can be shown as 8-bit numbers or percentages.

着色蒙版

A tool for quickly coloring line art, the Colorize Mask Editing tool can be found next to the gradient tool on your toolbox.

This feature is technically already in 3.1, but disabled by default because we had not optimized the filling algorithm for production use yet. To enable it, find your krita configuration file, open it in notepad, and add “disableColorizeMaskFeature=false” to the top. Then restart Krita. Its official incarnation is in 4.0.

用法

This tool works in conjunction with the colorize mask, and the usage is as follows:

For this example, we’ll be using the ghost lady also used to explain masks on the basic concepts page.

This image has the line art for the lady separated from the background, and what’s more, the background is made up of two layers: one main and one for the details.

First, select the colorize mask editing tool while having the line art layer selected. mouseleft the canvas will add a colorize mask to the layer. You can also mouseright the line art layer, and then Add ‣ Colorize Mask. The line art will suddenly become really weird, this is the prefiltering which are filters through which we put the line art to make the algorithm easier to use. The tool options overview below shows which options control that.

Now, you make strokes with brush colors, press Update in the tool options, or tick the last icon of the colorize mask properties. In the layer docker, you will be able to see a little progress bar appear on the colorize mask indicating how long it takes. The bigger your file, the longer it will take.

We want to have the blue transparent. In the tool options of the colorize editing tool you will see a small palette. These are the colors already used. You can remove colors here, or mark a single color as standing for transparent, by selecting it and pressing “transparent”. Updating the mask will still show the blue stroke, but the result will be transparent:

Because the colorize mask algorithm is slow, and we only need a part of our layer to be filled to fill the whole ghost lady figure, we can make use of Limit to layer bounds. This will limit Colorize Mask to use the combined size of the line art and the coloring key strokes. Therefore, make sure that the colorizing keystrokes only take up as much as they really need.

Now the algorithm will be possibly a lot faster, allowing us to add strokes and press Update in rapid succession:

To see the final result, disable Edit Key Strokes or toggle the second to last icon on the colorize mask.

If you want to edit the strokes again, re-enable Edit Key Strokes.

Now, the colorize mask, being a mask, can also be added to a group of line art layers. It will then use the composition of the whole group as the line art. This is perfect for our background which has two separate line art layers. It also means that the colorize mask will be disabled when added to a group with pass-through enabled, because those have no final composition. You can recognize a disabled colorize mask because its name is stricken through.

To add a colorize mask to a group, select the group and mouseleft the canvas with the Colorize Mask editing tool, or mouseright the layer to Add ‣ Colorize Mask.

Now, we add strokes to the background quickly. We do not need to use the Limit to Layer Bounds because the background covers the whole image.

For the record, you can use other brushes and tools also work on the colorize mask as long as they can draw. The Colorize Mask Editing tool is just the most convenient because you can get to the algorithm options.

Out final result looks like this:

Now we are done, mouseright the colorize mask and Convert ‣ to Paint Layer. Then, Layer ‣ Split ‣ Split Layer. This will give separate color islands that you can easily edit:

This way we can very quickly paint the image. Due to the colorize mask going from the first image to the following took only 30 minutes, and would’ve taken quite a bit longer.

The colorize masks are saved to the .kra file, so as long as you don’t save and open to a different file format, nor convert the colorize mask to a paintlayer, you can keep working adjust the results.

工具选项

更新

Run the colorize mask algorithm. The progress bar for updates on a colorize mask shows only in the layer docker.

编辑关键描边

Put the mask into edit mode. In edit mode, it will also show the ‘prefiltering’ on the line art, which is for example a blur filter for gap closing.

显示输出

Show the output of the colorize mask. If Edit key strokes is active, this will be shown semi-transparently, so it will be easy to recognize the difference between the strokes and the output.

On the Left: Show Output is on, Edit Key Strokes is off. In the Middle: Show Output and Edit Key Strokes are on. On the Right: Show Output is off and Edit Key Strokes is on.

限制到图层边界

Limit the colorize mask to the combined layer bounds of the strokes and the line art it is filling. This can speed up the use of the mask on complicated compositions, such as comic pages.

Edge detection

Activate this for line art with large solid areas, for example shadows on an object. For the best use, set the value to the thinnest lines on the image. In the image below, note how edge detection affects the big black areas:

From left to right: an example with big black shadows on an object but no edge detection, the same example without the edit key strokes enabled. Then the same example with edge detection enabled and set to 2px, and that same example without edit key strokes enabled.

Gap close hint

While the algorithm is pretty good against gaps in contours, this will improve the gap recognition. The higher this value is, the bigger the gaps it will try to close, but a too high value can lead to other errors. Note how the prefiltered line art (that’s the blurry haze) affects the color patches.

On the Left: Gap close hint is 0px. In the Middle: Gap close hint is 15px (the lines are 10px). On the Right: Gap close hint is 275px.

Clean up

This will attempt to handle messy strokes that overlap the line art where they shouldn’t. At 0 no clean up is done, at 100% the clean-up is most aggressive.

Key strokes

This palette keeps track of the colors used by the strokes. This is useful so you can switch back to colors easily. You can increase the swatch size by hovering over it with the mouse, and doing Ctrl + mousescroll.

透明度

This button is under the keystrokes palette, you can mark the selected color to be interpreted a ‘transparent’ with this. In the clean-up screenshot above, cyan had been marked as transparent.

图层属性

The colorize mask layer has four properties. They are all the buttons on the right side of the layer:

显示输出

The first button, it allows you to toggle whether you’ll see the output from the colorize algorithm.

锁定

Stops the mask from being edited.

编辑关键描边

Whether the colorize mask is in edit mode. In edit mode it’ll show the strokes, and the output will be semi-transparent.

更新

The last button will force the colorize mask to update, even when you’re in a different tool.

Colorize masks cannot be animated.

网格工具

3.0 版后已移除: Deprecated in 3.0, use the 网格与参考线 instead.

When you click on the edit grid tool, you’ll get a message saying that to activate the grid you must press Enter. Press Enter to make the grid visible. Now you must have noticed the tool icon for your pointer has changed to icon similar to move tool.

To change the spacing of the grid, press and hold Ctrl and then mouseleft + drag on the canvas. In order to move the grid you have to press Alt and then mouseleft + drag.

透视网格工具

3.0 版后已移除: Deprecated in 3.0, use the 透视 instead.

The perspective grid tool allows you to draw and manipulate grids on the canvas that can serve as perspective guides for your painting. A grid can be added to your canvas by first clicking the tool in the tool bar and then clicking four points on the canvas which will serve as the four corners of your grid.

The grid can be manipulated by pulling on any of its four corners. The grid can be extended by clicking and dragging a midpoint of one of its edges. This will allow you to expand the grid at other angles. This process can be repeated on any subsequent grid or grid section. You can join the corners of two grids by dragging one onto the other. Once they are joined they will always move together, they cannot be separated. You can delete any grid by clicking on the red X at its center. This tool can be used to build reference for complex scenes.

As displayed while the Perspective Grid tool is active: *

As displayed while any other tool is active: *

You can toggle the visibility of the grid from the main menu View ‣ Show Perspective Grid option. You can also clear any grid setup you have and start over by using the View ‣ Clear Perspective Grid.

智能补丁工具

The smart patch tool allows you to seamlessly remove elements from the image. It does this by letting you draw the area which has the element you wish to remove, and then it will attempt to use patterns already existing in the image to fill the blank.

You can see it as a smarter version of the clone brush.

The smart patch tool has the following tool options:

精度

Accuracy indicates how many samples, and thus how often the algorithm is run. A low accuracy will do few samples, but will also run the algorithm fewer times, making it faster. Higher accuracy will do many samples, making the algorithm run more often and give more precise results, but because it has to do more work, it is slower.

补丁半径

Patch size determines how big the size of the pattern to choose is. This will be best explained with some testing, but if the surrounding image has mostly small elements, like branches, a small patch size will give better results, while a big patch size will be better for images with big elements, so they get reused as a whole.

绘画辅助尺工具

Create, edit, and remove drawing assistants on the canvas. There are a number of different assistants that can be used from this tool. The tool options allow you to add new assistants, and to save/load assistants. To add a new assistant, select a type from the tool options and begin clicking on the canvas. Each assistant is created a bit differently. There are also additional controls on existing assistants that allow you to move and delete them.

The set of assistants on the current canvas can be saved to a “*.paintingassistant” file using the Save button in the tool options. These assistants can then be loaded onto a different canvas using the Open button. This functionality is also useful for creating copies of the same drawing assistant(s) on the current canvas.

Check 借助辅助工具绘画 for more information.

工具选项

4.0 新版功能.

全局颜色：

Global color allows you to set the color and opacity of all assistants at once.

4.1 新版功能.

自定义颜色:

Custom color allows you to set a color and opacity per assistant, allowing for different colors on an assistant. To use this functionality, first ‘select’ an assistant by tapping its move widget. Then go to the tool options docker to see the Custom Color check box. Check that, and then use the opacity and color buttons to pick either for this particular assistant.

参考图像工具

4.1 新版功能.

The reference images tool is a replacement for the reference images docker. You can use it to load images from your disk as reference, which can then be moved around freely on the canvas and placed wherever.

工具选项

添加参考图像

Load a single image to display on the canvas.

Load Set

Load a set of reference images.

Save Set

Save a set of reference images.

删除所有参考图像

Delete all the reference images

保持高宽比

When toggled this will force the image to not get distorted.

不透明度

Lower the opacity.

饱和度

Desaturate the image. This is useful if you only want to focus on the light/shadow instead of getting distracted by the colors.

Storage mode

How is the reference image stored.

Embed to *.kra

Store this reference image into the kra file. This is recommended for small vital files you’d easily lose track of otherwise.

链接到外部文件.

Only link to the reference image, krita will open it from the disk everytime it loads this file. This is recommended for big files, or files that change a lot.

You can move around reference images by selecting them with mouseleft, and dragging them. You can rotate reference images by holding the cursor close to the outside of the corners till the rotate cursor appears, while tilting is done by holding the cursor close to the outside of the middle nodes. Resizing can be done by dragging the nodes. You can delete a single reference image by clicking it and pressing Del. You can select multiple reference images with Shift and perform all of these actions.

To hide all reference images temporarily use View ‣ Show Reference Images.

测量工具

This tool is used to measure distances and angles. Click the mouseleft to indicate the first endpoint or vertex of the angle, keep the button pressed, drag to the second endpoint and release the button. The results will be shown on the Tool Options docker. You can choose the length units from the drop-down list.

工具选项

The measure tool-options allow you to change between the units used. Unit conversion varies depending on the DPI setting of a document.

矩形选区工具

This tool, represented by a rectangle with a dashed border, allows you to make 选区 of a rectangular area. Simply click and drag around the section you wish to select.

快捷键和粘滞键

J selects this tool.

R sets the selection to ‘replace’ in the tool options, this is the default mode.

A sets the selection to ‘add’ in the tool options.

S sets the selection to ‘subtract’ in the tool options.

Shift after starting the selection, constraints it to a perfect square.

Ctrl after starting the selection, makes the selection resize from center.

Alt after starting the selection, allows you to move it.

Shift + mouseleft sets the subsequent selection to ‘add’. You can release the Shift key while dragging, but it will still be set to ‘add’. Same for the others.

Alt + mouseleft sets the subsequent selection to ‘subtract’.

Ctrl + mouseleft sets the subsequent selection to ‘replace’.

Shift + Alt + mouseleft sets the subsequent selection to ‘intersect’.

注解

So to subtract a perfect square, you do Alt + mouseleft, then release the Alt key while dragging and press Shift to constrain.

注解

You can switch the behaviour of the Alt key to use Ctrl instead by toggling the switch in the 常规设置

工具选项

抗锯齿

This toggles whether or not to give selections feathered edges. Some people prefer hard-jagged edges for their selections.

宽度

Gives the current width. Use the lock to force the next selection made to this width.

高度

Gives the current height. Use the lock to force the next selection made to this height.

份额

Gives the current ratio. Use the lock to force the next selection made to this ratio.

4.1.3 新版功能:

圆角 X

The horizontal radius of the rectangle corners.

圆角 Y

The vertical radius of the rectangle corners.

椭圆选区工具

This tool, represented by an ellipse with a dashed border, allows you to make 选区 of a elliptical area. Simply click and drag around the section you wish to select.

快捷键和粘滞键

J selects this tool.

R sets the selection to ‘replace’ in the tool options, this is the default mode.

A sets the selection to ‘add’ in the tool options.

S sets the selection to ‘subtract’ in the tool options.

Shift after starting the selection, constraints it to a perfect circle.

Ctrl after starting the selection, makes the selection resize from center.

Alt after starting the selection, allows you to move it.

Shift + mouseleft sets the subsequent selection to ‘add’. You can release the Shift key while dragging, but it will still be set to ‘add’. Same for the others.

Alt + mouseleft sets the subsequent selection to ‘subtract’.

Ctrl + mouseleft sets the subsequent selection to ‘replace’.

Shift + Alt + mouseleft sets the subsequent selection to ‘intersect’.

注解

So to subtract a perfect circle, you do Alt + mouseleft, then release the Alt key while dragging and press Shift to constrain.

注解

You can switch the behaviour of the Alt key to use Ctrl instead by toggling the switch in the 常规设置

工具选项

抗锯齿

This toggles whether or not to give selections feathered edges. Some people prefer hard-jagged edges for their selections.

宽度

Gives the current width. Use the lock to force the next selection made to this width.

高度

Gives the current height. Use the lock to force the next selection made to this height.

份额

Gives the current ratio. Use the lock to force the next selection made to this ratio.

轮廓选区工具

Make 选区 by drawing freehand around the canvas. Click and drag to draw a border around the section you wish to select.

快捷键和粘滞键

R sets the selection to ‘replace’ in the tool options, this is the default mode.

A sets the selection to ‘add’ in the tool options.

S sets the selection to ‘subtract’ in the tool options.

Shift + mouseleft sets the subsequent selection to ‘add’. You can release the Shift key while dragging, but it will still be set to ‘add’. Same for the others.

Alt + mouseleft sets the subsequent selection to ‘subtract’.

Ctrl + mouseleft sets the subsequent selection to ‘replace’.

Shift + Alt + mouseleft sets the subsequent selection to ‘intersect’.

注解

You can switch the behaviour of the Alt key to use Ctrl instead by toggling the switch in the 常规设置

工具选项

抗锯齿

This toggles whether or not to give selections feathered edges. Some people prefer hard-jagged edges for their selections.

多边形选区工具

This tool, represented by a polygon with a dashed border, allows you to make 选区 of a polygonal area point by point. Click where you want each point of the Polygon to be. Double click to end your polygon and finalize your selection area.

快捷键和粘滞键

R sets the selection to ‘replace’ in the tool options, this is the default mode.

A sets the selection to ‘add’ in the tool options.

S sets the selection to ‘subtract’ in the tool options.

Shift + mouseleft sets the subsequent selection to ‘add’. You can release the Shift key while dragging, but it will still be set to ‘add’. Same for the others.

Alt + mouseleft sets the subsequent selection to ‘subtract’.

Ctrl + mouseleft sets the subsequent selection to ‘replace’.

Shift + Alt + mouseleft sets the subsequent selection to ‘intersect’.

注解

You can switch the behaviour of the Alt key to use Ctrl instead by toggling the switch in the 常规设置

工具选项

抗锯齿

This toggles whether or not to give selections feathered edges. Some people prefer hard-jagged edges for their selections.

相连选区工具

This tool, represented by a magic wand, allows you to make 选区 by selecting a point of color. It will select any contiguous areas of a similar color to the one you selected. You can adjust the “fuzziness” of the tool in the tool options dock. A lower number will select colors closer to the color that you chose in the first place.

快捷键和粘滞键

R sets the selection to ‘replace’ in the tool options, this is the default mode.

A sets the selection to ‘add’ in the tool options.

S sets the selection to ‘subtract’ in the tool options.

Shift + mouseleft sets the subsequent selection to ‘add’. You can release the Shift key while dragging, but it will still be set to ‘add’. Same for the others.

Alt + mouseleft sets the subsequent selection to ‘subtract’.

Ctrl + mouseleft sets the subsequent selection to ‘replace’.

Shift + Alt + mouseleft sets the subsequent selection to ‘intersect’.

注解

You can switch the behaviour of the Alt key to use Ctrl instead by toggling the switch in the 常规设置

工具选项

抗锯齿

This toggles whether or not to give selections feathered edges. Some people prefer hard-jagged edges for their selections.

模糊度

This controls whether or not the contiguous selection sees another color as a border.

Grow/Shrink selection.

This value extends/contracts the shape beyond its initial size.

Feathering

This value will add a soft border to the selection-shape.

Limit to Current Layer

Activating this will prevent the fill tool from taking other layers into account.

路径选区工具

This tool, represented by an ellipse with a dashed border and a curve control, allows you to make a 选区 of an area by drawing a path around it. Click where you want each point of the path to be. Click and drag to curve the line between points. Finally click on the first point you created to close your path.

快捷键和粘滞键

R sets the selection to ‘replace’ in the tool options, this is the default mode.

A sets the selection to ‘add’ in the tool options.

S sets the selection to ‘subtract’ in the tool options.

Shift + mouseleft sets the subsequent selection to ‘add’. You can release the Shift key while dragging, but it will still be set to ‘add’. Same for the others.

Alt + mouseleft sets the subsequent selection to ‘subtract’.

Ctrl + mouseleft sets the subsequent selection to ‘replace’.

Shift + Alt + mouseleft sets the subsequent selection to ‘intersect’.

警告

Selection modifiers don’t quite work yet with the path tool, as Shift breaks the path

注解

You can switch the behaviour of the Alt key to use Ctrl instead by toggling the switch in the 常规设置

工具选项

4.1.3 新版功能:

Autosmooth Curve

Toggling this will have nodes initialize with smooth curves instead of angles. Untoggle this if you want to create sharp angles for a node. This will not affect curve sharpness from dragging after clicking.

抗锯齿

This toggles whether or not to give selections feathered edges. Some people prefer hard-jagged edges for their selections.

相似颜色选区工具

This tool, represented by a dropper over an area with a dashed border, allows you to make 选区 by selecting a point of color. It will select any areas of a similar color to the one you selected. You can adjust the “fuzziness” of the tool in the tool options dock. A lower number will select colors closer to the color that you chose in the first place.

快捷键和粘滞键

R sets the selection to ‘replace’ in the tool options, this is the default mode.

A sets the selection to ‘add’ in the tool options.

S sets the selection to ‘subtract’ in the tool options.

Shift + mouseleft sets the subsequent selection to ‘add’. You can release the Shift key while dragging, but it will still be set to ‘add’. Same for the others.

Alt + mouseleft sets the subsequent selection to ‘subtract’.

Ctrl + mouseleft sets the subsequent selection to ‘replace’.

Shift + Alt + mouseleft sets the subsequent selection to ‘intersect’.

注解

You can switch the behaviour of the Alt key to use Ctrl instead by toggling the switch in the 常规设置

工具选项

模糊度

This controls whether or not the contiguous selection sees another color as a border.

缩放工具

The zoom tool allows you to zoom your canvas in and out discretely. It can be found at the bottom of the toolbox, and you just activate it by selecting the tool, and doing mouseleft on the canvas will zoom in, while mouseright will zoom out.

You can reverse this behaviour in the Tool Options.

There’s a number of hotkeys associated with this tool, which makes it easier to access from the other tools:

Ctrl + Space + mouseleft + drag on the canvas will zoom in or out fluently.

Ctrl + mousemiddle + drag on the canvas will zoom in or out fluently.

Ctrl + Alt + Space + mouseleft + drag on the canvas will zoom in or out with discrete steps.

Ctrl + Alt + mousemiddle + drag on the canvas will zoom in or out with discrete steps.

+ will zoom in with discrete steps.

- will zoom out with discrete steps.

1 will set the zoom to 100%.

2 will set the zoom so that the document fits fully into the canvas area.

3 will set the zoom so that the document width fits fully into the canvas area.

For more information on such hotkeys, check 界面导览.

平移工具

The pan tool allows you to pan your canvas around freely. It can be found at the bottom of the toolbox, and you just it by selecting the tool, and doing mouseleft + drag over the canvas.

There’s two hotkeys associated with this tool, which makes it easier to access from the other tools:

Space + mouseleft + drag over the canvas.

mousemiddle + drag over the canvas.

For more information on such hotkeys, check 界面导览.

教学和技巧

我们的开发人员和用户提供了一系列教程，向你传授如何在实际工作中使用 Krita。

目录：

剪贴蒙版和透明度继承

常用工作流程

快速绘画和探索概念

给线稿上色

绘画

制作拼贴画和材质

绘制像素画

平涂颜色

理解图层

Preparing your line art

相乘混色法

使用选区

使用蒙版

使用颜色转为透明度滤镜

填充工具

选区

几何图形工具

着色蒙版

结语

描线

姿势

笔画平滑

贝塞尔曲线和其他工具

预设

为描线环节准备草图

绘制超细线条

笔刷技巧：动态笔刷

问题

笔刷技巧：散景高光

问题

笔刷技巧：焦散线

问题

笔刷技巧：绒毛和草丛

问题

笔刷技巧：头发

笔刷技巧：轮廓线

问题

笔刷技巧：彩虹笔刷

问题

笔刷技巧：雕塑笔触

问题

用变形蒙版绘制杜鹃花

绘制画面零部件

克隆图层

变形蒙版的威力

为互联网保存图像

JPG

PNG

GIF

剪贴蒙版和透明度继承

Krita doesn’t have clipping mask functionality in the manner that Photoshop and programs that mimic Photoshop’s functionality have. That’s because in Krita, unlike such software, a group layer is not an arbitrary collection of layers. Rather, in Krita, group layers are composited separately from the rest of the stack, and then the result is added into the stack. In other words, in Krita group layers are in effect a separate image inside your image.

The exception is when using pass-through mode, meaning that alpha inheritance won’t work right when turning on pass-through on the layer.

当我们对图层打开透明度继承时，该图层与在它之下的图层保持相同的透明度。

Combined with group layers this can be quite powerful. A situation where this is particularly useful is the following:

Here we have an image with line art and a layer for each flat of colors. We want to add complicated multi-layered shading to this, while keeping the neatness of the existing color flats. To get a clipping mask working, you first need to put layers into a group. You can do this by making a group layer and drag-and-dropping the layers into it, or by selecting the layers you want grouped and pressing Ctrl+G. Here we do that with the iris and the eye-white layers.

We add a layer for the highlight above the other two layers, and add some white scribbles.

In the above, we have our layer with a white scribble on the left, and on the right, the same layer, but with alpha inheritance active, limiting it to the combined area of the iris and eye-white layers.

Now there’s an easier way to set up alpha inheritance. If you select a layer or set of layers and press Ctrl+Shift+G, you create a quick clipping group. That is, you group the layers, and a ‘mask layer’ set with alpha inheritance is added on top.

The fact that alpha inheritance can use the composited transparency from a combination of layers means that you can have a layer with the erase-blending mode in between, and have that affect the area that the layer above is clipped to. Above, the lower image is exactly the same as the upper one, except with the erase-layer hidden. Filters can also affect the alpha inheritance:

Above, the blur filter layer gives different results when in different places, due to different parts being blurred.

常用工作流程

Krita’s main goal is to help artists create a digital painting from scratch. Krita is used by comic artists, matte painters, texture artists, and illustrators around the world. This section explains some common workflow that artists use in Krita. When you open a new document in Krita for the first time, you can start painting instantly. The brush tool is selected by default and you just have to paint on the canvas. However, let us look at what artists do in Krita. Below are some of the common workflows used in Krita:

快速绘画和探索概念

Some artists work only on the digital medium, sketching and visualizing concepts in Krita from scratch. As the name suggests a technique of painting done within a matter of hours to quickly visualize the basic scene, character, look and feel of the environment or to denote the general mood and overall concept is called a speed painting. Finishing and finer details are not the main goals of this type of painting, but the representation of form value and layout is the main goal.

Some artists set a time limit to complete the painting while some paint casually. Speed painting then can be taken forward by adding finer details and polish to create a final piece. Generally, artists first block in the composition by adding patches and blobs of flat colors, defining the silhouette, etc. Krita has some efficient brushes for this situation, for example, the brush under Block Tag like Block fuzzy, Block basic, layout_block, etc.

After the composition and a basic layout has been laid out the artists add as many details as possible in the given limited time, this requires a decent knowledge of forms, value perspective and proportions of the objects. Below is an example of speed paint done by David Revoy [http://www.davidrevoy.com/] in an hours time.

Artwork by David Revoy, license : CC-BY [http://creativecommons.org/licenses/by/3.0/]

You can view the recorded speed painting demo for the above image on Youtube [https://www.youtube.com/watch?v=93lMLEuxSLk].

给线稿上色

Often an artist, for example, a comic book colorist will need to take a pencil sketch or other line art of some sort and use Krita to paint underneath it. This can be either an image created digitally or something that was done outside the computer and has been scanned.

处理线稿

If your images have a white or other single-tone background, you can use either of the following methods to prepare the art for coloring:

Place the line art at the top of the layer stack and set its layer blending mode to Multiply

If you want to clean the line art a bit you can press Ctrl + L or go to Filters ‣ Adjust ‣ Levels

You can clean the unwanted grays by moving the white triangle in the input levels section to left and darken the black by moving the black triangle to right.

If you draw in blue pencils and then ink your line art you may need to remove the blue lines first to do that go to Filters ‣ Adjust ‣ Color adjustment curves or press shortcut Ctrl + M.

Now select Red from the drop-down, click on the top right node on the graph and slide it all the way down. Or you can click on the top right node and enter 0 in the input field. Repeat this step for Green too.

Now the whole drawing will have a blue overlay, zoom in and check if the blue pencil lines are still visible slightly. If you still see them, then go to Blue Channel in the color adjustment and shift the top right node towards left a bit, Or enter a value around 190 (one that removes the remaining rough lines) in the input box.

Now apply the color adjustment filter, yes we still have lots of blue on the artwork. Be patient and move on to the next step. Go to Filters ‣ Adjust ‣ Desaturate or press Ctrl + Shift + U. Now select Max from the list.

提示

It is good to use non-photo-blue pencils to create the blue lines as those are easy to remove. If you are drawing digitally in blue lines use #A4DDED color as this is closer to non-photo-blue color.

You can learn more about doing a sketch from blue sketch to digital painting here in a tutorial by David Revoy [http://www.davidrevoy.com/article239/cleaning-blue-lines-sketch-in-krita].

After you have a clean black and white line art you may need to erase the white color and keep only black line art, to achieve that go to Filters ‣ Color ‣ Color to Alpha. Use the dialog box to turn all the white areas of the image transparent. The Color Picker is set to White by default. If you have imported scanned art and need to select another color for the paper color then you would do it here.

This will convert the white color in your line art to alpha i.e. it will make the white transparent leaving only the line art. Your line art can be in grayscale color space, this is a unique feature in Krita which allows you to keep a layer in a color-space independent from the image.

铺上底色

There are many ways to color a line art in Krita, but generally, these three are common among the artists.

Paint blocks of color directly with block brushes.

Fill with Flood fill Tool.

Use one of the G’MIC colorize comics filters.

Blocking with brush

The first is the more traditional method of taking a shape brush or using the geometric tools to lay in color. This would be similar to using an analog marker or brush on paper. There are various block brushes in Krita, you can select Block Tag from the drop-down in the brush presets docker and use the brushes listed there.

Add a layer underneath your line art layer and start painting with the brush. If you want to correct any area you can press E and convert the same brush into an eraser. You can also use a layer each for different colors for more flexibility.

Filling with Flood Fill tool

The second method is to use the Flood fill tool to fill large parts of your line art quickly. This method generally requires closed gaps in the line art. To begin with this method place your line art on a separate layer. Then activate the flood fill tool and set the Grow selection to 2px, uncheck Limit to current layer if previously checked.

Choose a color from color selector and just click on the area you want to fill the color. As we have expanded the fill with grow selection the color will be filled slightly underneath the line art thus giving us a clean fill.

GMIC Colorize [Interactive]

The third method is to use take advantage of the integrated G’Mic filters. These are powerful filters that can dramatically improve your workflow and cut you down on your production time. To begin coloring with the G’MIC colorize interactive, go to Filters ‣ G’MIC. Choose Filters ‣ G’MIC ‣ Black & white ‣ Colorize[interactive] from the list of filters. Then select Line art for Input type, Image + Colors (2 Layers) for output type, set the view resolution according to your need. If you have any specific color palette to use for coloring add the path for it in an additional color palette. The example of the filter window with the required inputs is shown below.

Press Apply to begin the coloring, this will open a color selector palette window and a window showing your line art. Choose the color from the palette and click on the areas that need to be filled with color like the example shown below.

If you feel that the dots are a bit distracting you can press Tab to reduce the size or hide the dots. To zoom out you can press Ctrl + ↓ and Ctrl + ↑ vice versa. Panning is done by mousemiddle + drag. Press Spacebar to generate the colors. If you want to replace a color select the color by mousemiddle and pressing R then you can select an alternate color from the palette.

Once you have finished adding the desired flat colors you can press Enter to apply the filter. Then don’t forget to press Ok in the G’MIC dialog box.

The flats colors will be placed on a separate layer. You can check this [http://www.davidrevoy.com/article240/gmic-line-art-colorization] tutorial by David Revoy to know more about this technique.

GMIC Colorize [comics]

Krita provides one more option to prepare flat colors through G’MIC colorize comics filter. This technique needs some preparations before you run the G’MIC filter. This layer extrapolates the color spots that you input below the line art

You have to create two layers below the line art, one for the color spots indicating which color you need to be filled in the region and one for the final extrapolated output of the filter. Mark some colors spots in the layer beneath the line art. The layer setup can be seen in the image below.

The colors spots are marked in red in the image

Now go to Filters ‣ G’MIC ‣ Black & white ‣ Colorize[comics]. In the G’MIC dialog box, select All for input and In place (default) for output, select Lineart + color spots + extrapolated layers for both input and output layers on the right-hand side. Smoothness is for filling gap tolerance and details the default is 0.5 you can adjust it according to your line art.

Press Apply and Ok to apply and exit the G’MIC dialog. You’ll now have flat colors beneath your line art. More details about this technique can be found in the tutorial at Timothée Giet’s blog [http://timotheegiet.com/blog/comics/gmic-colorize-comics-working-in-krita.html].

绘画

从混沌中开始

Here, you start by making a mess through random shapes and texture, then taking inspirations from the resulting chaos you can form various concepts. It is kind of like making things from clouds or finding recognizable shapes of things in abstract and random textures. Many concept artists work with this technique.

You can use brushes like the shape brush, or the spray brush to paint a lot of different shapes, and from the resulting noise, you let your brain pick out shapes and compositions.

You then refine these shapes to look more like shapes you think they look, and paint them over with a normal paintbrush. This method is best done in a painting environment.

从基于明度的画面基盘开始

This method finds its origins in old oil-painting practice: You first make an under-painting and then paint over it with color, having the dark underground shine through.

With Krita you can use blending modes for this purpose. Choosing the color blending mode on a layer on top allows you to change the colors of the image without changing the relative luminosity. This is useful, because humans are much more sensitive to tonal differences than the difference in saturation and hue. This’ll allow you to work in grayscale before going into color for the polishing phase.

You can find more about this technique here [http://www.davidrevoy.com/article185/tutorial-getting-started-with-krita-1-3-bw-portrait].

制作拼贴画和材质

Many artists use Krita to create textures for 3d assets used for games animation etc. Krita has many texture templates for you to choose and get started with creating textures. These templates have common sizes, bit depth and color profiles that are used for texturing workflow.

Krita also has a real-time seamless tile mode to help texture artist prepare tiles and texture easily and check if it is seamless on the fly. The tiled mode is called wrap-around mode, to activate this mode you have press W. Now when you paint the canvas is tiled in real-time allowing you to create seamless pattern and texture, it is also easy to prepare interlocking patterns and motifs in this mode.

绘制像素画

Krita can also be used to create a high definition pixel painting. The pixel art look can be achieved by using Index color filter layer and overlaying dithering patterns. The general layer stack arrangement is as shown below.

The index color filter maps specific user-selected colors to the grayscale value of the artwork. You can see the example below, the strip below the black and white gradient has an index color applied to it so that the black and white gradient gets the color selected to different values.

You can choose the required colors and ramps in the index color filter dialog as shown below.

Dithering can be used to enhance the look of the art and to ease the banding occurred by the index color filter. Krita has a variety of dithering patterns by default, these can be found in pattern docker. You can use these patterns as fill layer, then set the blend mode to overlay and adjust the opacity according to your liking. Generally, an opacity range of 10% - 25% is ideal.

Paint the artwork in grayscale and add an index color filter layer at the top then add the dithering pattern fill layer below the index color filter but above the artwork layer, as shown in the layer stack arrangement above. You can paint or adjust the artwork at any stage as we have added the index color filter as a filter layer.

You can add different groups for different colors and add different dithering patterns for each group.

Below is an example painted with this layer arrangement.

平涂颜色

So you’ve got a cool black on white drawing, and now you want to color it! The thing we’ll aim for in this tutorial is to get your line art colored in with flat colors. So no shading just yet. We’ll be going through some techniques for preparing the line art, and we’ll be using the layer docker to put each color on a separate layer, so we can easily access each color when we add shading.

注解

This tutorial is adapted from this tutorial [http://theratutorial.tumblr.com/post/66584924501/flat-colouring-in-the-kingdom-of-2d-layers-are] by the original author.

理解图层

To fill line art comfortably, it’s best to take advantage of the layerstack. The layer stack is pretty awesome, and it’s one of those features that make digital art super-convenient.

In traditional art, it is not uncommon to first draw the full background before drawing the subject. Or to first draw a line art and then color it in. Computers have a similar way of working.

In programming, if you tell a computer to draw a red circle, and then afterwards tell it to draw a smaller yellow circle, you will see the small yellow circle overlap the red circle. Switch the commands around, and you will not see the yellow circle at all: it was drawn before the red circle and thus ‘behind’ it.

This is referred to as the “drawing order”. So like the traditional artist, the computer will first draw the images that are behind everything, and layer the subject and foreground on top of it. The layer docker is a way for you to control the drawing order of multiple images, so for example, you can have your line art drawn later than your colors, meaning that the lines will be drawn over the colors, making it easier to make it neat!

Other things that a layer stack can do are blending the colors of different layers differently with blending modes, using a filter in the layer stack, or using a mask that allows you to make parts transparent.

小技巧

Programmers talk about transparency as ‘’Alpha’‘, which is because the ‘a’ symbol is used to present transparency in the algorithms for painting one color on top of another. Usually when you see the word ‘’Alpha’’ in a graphics program, just think of it as affecting the transparency.

Preparing your line art

Put the new layer underneath the layer containing the line art (drag and drop or use the up/down arrows for that), and draw on it.

…And notice nothing happening. This is because the white isn’t transparent. You wouldn’t really want it to either, how else would you make convincing highlights? So what we first need to do to color in our drawing is prepare our line art. There’s several methods of doing so, each with varying qualities.

相乘混色法

So, typically, to get a black and white line art usable for coloring, you can set the blending mode of the line art layer to Multiply. You do this by selecting the layer and going to the drop-down that says Normal and setting that to Multiply.

And then you should be able to see your colors!

Multiply is not a perfect solution however. For example, if through some image editing magic I make the line art blue, it results into this:

This is because multiply literally multiplies the colors. So it uses maths!

What it first does is take the values of the RGB channels, then divides them by the max (because we’re in 8bit, this is 255), a process we call normalising. Then it multiplies the normalized values. Finally, it takes the result and multiplies it with 255 again to get the result values.

| 粉 | Pink (normalized) | 蓝色 | Blue (normalized) | Normalized, multiplied | 结果
红色 | 222 | 0.8705 | 92 | 0.3607 | 0.3139 | 80
绿色 | 144 | 0.5647 | 176 | 0.6902 | 0.3897 | 99
蓝色 | 123 | 0.4823 | 215 | 0.8431 | 0.4066 | 103

This isn’t completely undesirable, and a lot of artists use this effect to add a little richness to their colors.

优点

Easy, can work to your benefit even with colored lines by softening the look of the lines while keeping nice contrast.

缺点

Not actually transparent. Is a little funny with colored lines.

使用选区

The second method is one where we’ll make it actually transparent. In other programs this would be done via the channel docker, but Krita doesn’t do custom channels, instead it uses Selection Masks to store custom selections.

Duplicate your line art layer.

Convert the duplicate to a selection mask. mouseright the layer, then Convert ‣ to Selection Mask.

Invert the selection mask. Select ‣ Invert Selection.

Make a new layer, and do Edit ‣ Fill with Foreground Color.

And you should now have the line art on a separate layer.

优点

Actual transparency.

缺点

Doesn’t work when the line art is colored.

使用蒙版

This is a simpler variation of the above.

Make a filled layer underneath the line art layer.

Convert the line art layer to a transparency mask mouseright the layer, then Convert ‣ to Transparency Mask.

Invert the transparency mask by going to Filter ‣ Adjust ‣ Invert

优点

Actual transparency. You can also very easily doodle a pattern on the filled layer where the mask is on without affecting the transparency.

缺点

Doesn’t work when the line art is colored already. We can still get faster.

使用颜色转为透明度滤镜

By far the fastest way to get transparent line art.

Select the line art layer and apply the color to alpha filter. Filter ‣ Colors ‣ Color to Alpha. The default values should be sufficient for line art.

优点

Actual transparency. Works with colored line art as well, because it removes the white specifically.

缺点

You’ll have to lock the layer transparency or separate out the alpha via the right-click menu if you want to easily color it.

Coloring the image

Much like preparing the line art, there are many different ways of coloring a layer.

You could for example fill in everything by hand, but while that is very precise it also takes a lot of work. Let’s take a look at the other options, shall we?

填充工具

In most cases the fill-tool can’t deal with the anti-aliasing (the soft edge in your line art to make it more smooth when zoomed out) In Krita you have the grow-shrink option. Setting that to say… 2 expands the color two pixels.

Threshold decides when the fill-tool should consider a different color pixel to be a border. And the feathering adds an extra soft border to the fill.

Now, if you click on a gapless-part of the image with your preferred color… (Remember to set the opacity to 1.0!)

Depending on your line art, you can do flats pretty quickly. But setting the threshold low can result in little artifacts around where lines meet:

However, setting the threshold high can end with the fill not recognizing some of the lighter lines. Besides these little artifacts can be removed with the brush easily.

优点

Pretty darn quick depending on the available settings.

缺点

Again, not great with gaps or details. And it works best with aliased line art.

选区

Selections work using the selection tools.

For example with the 路径选区工具 you can easily select a curved area, and the with Shift + mouseleft (not mouseleft + Shift, there’s a difference!) you can easily add to an existing selection.

You can also edit the selection if you have Select ‣ Show Global Selection Mask turned on. Then you can select the global selection mask, and paint on it. (Above with the alternative selection mode, activated in the lower-left corner of the stats bar)

When done, select the color you want to fill it with and press Shift + backspace.

You can save selections in selection masks by mouseright a layer, and then going to Add ‣ Local Selection. You first need to deactivate a selection by pressing the circle before adding a new selection.

This can serve as an alternative way to split out different parts of the image, which is good for more painterly pieces:

优点

A bit more precise than filling.

缺点

Previewing your color isn’t as easy.

几何图形工具

So you have a tool for making rectangles or circles. And in the case of Krita, a tool for bezier curves. Select the path tool (path tool), and set the tool options to fill=foreground and outline=none. Make sure that your opacity is set to 1.00 (fully opaque).

By clicking and holding, you can influence how curvy a line draw with the path tool is going to be. Letting go of the mouse button confirms the action, and then you’re free to draw the next point.

You can also erase with a geometric tool. Just press E or the eraser button.

优点

Quicker than using the brush or selections. Also decent with line art that contains gaps.

缺点

Fiddly details aren’t easy to fill in with this. So I recommend skipping those and filling them in later with a brush.

着色蒙版

So, this is a bit of an odd one. In the original tutorial, you’ll see I’m suggesting using G’Mic, but that was a few years ago, and G’Mic is a little unstable on windows. Therefore, the Krita developers have been attempting to make an internal tool doing the same.

It is disabled in 3.1, but if you use 4.0 or later, it is in the toolbox. Check the Colorize Mask for more information.

So it works like this:

Select the colorize mask tool.

Tick the layer you’re using.

Paint the colors you want to use on the colorize mask

Click update to see the results:

When you are satisfied, mouseright the colorize mask, and go to Convert ‣ Paint Layer. This will turn the colorize mask to a generic paint layer. Then, you can fix the last issues by making the line art semi-transparent and painting the flaws away with a pixel art brush.

Then, when you are done, split the layers via Layer ‣ Split ‣ Split Layer. There are a few options you can choose, but the following should be fine:

Finally, press Ok and you should get the following. Each color patch it on a different layer, named by the palette in the menu and alpha locked, so you can start painting right away!

优点

Works with anti-aliased line art. Really quick to get the base work done. Can auto-close gaps.

缺点

No anti-aliasing of its own. You have to choose between getting details right or the gaps auto-closed.

结语

I hope this has given you a good idea of how to fill in flats using the various techniques, as well as getting a hand of different Krita features. Remember that a good flat filled line art is better than a badly shaded one, so keep practicing to get the best out of these techniques!

描线

The first thing to realize about inking is that unlike anatomy, perspective, composition or color theory, you cannot compensate for lack of practice with study or reasoning. This is because all the magic in drawing lines happens from your shoulder to your fingers, very little of it happens in your head, and your lines improve with practice.

On the other hand, this can be a blessing. You don’t need to worry about whether you are smart enough, or are creative enough to be a good inker. Just dedicated. Doubtlessly, inking is the Hufflepuff of drawing disciplines.

That said, there are a few tips to make life easy:

姿势

Notice how I mentioned up there that the magic happens between your shoulders and fingers? A bit weird, not? But perhaps, you have heard of people talking about adopting a different pose for drawing.

You can in fact, make different strokes depending on which muscles and joints you use to make the movement: The Fingers, the wrist and lower-arm muscles, the elbow and upper-arm muscles or the shoulder and back muscles.

Generally, the lower down the arm the easier it is to make precise strokes, but also the less durable the joints are for long term use. We tend to start off using our fingers and wrist a lot during drawing, because it’s easier to be precise this way. But it’s difficult to make long strokes, and furthermore, your fingers and wrist get tired far quicker.

Your shoulders and elbows on the other hand are actually quite good at handling stress, and if you use your whole hand you will be able to make long strokes far more easily. People who do calligraphy need shoulder based strokes to make those lovely flourishes (personally, I can recommend improving your handwriting as a way to improve inking), and train their arms so they can do both big and small strokes with the full arm.

To control pressure in this state effectively, you should press your pinky against the tablet surface as you make your stroke. This will allow you to precisely judge how far the pen is removed from the tablet surface while leaving the position up to your shoulders. The pressure should then be put by your elbow.

So, there are not any secret rules to inking, but if there is one, it would be the following: The longer your stroke, the more of your arms you need to use to make the stroke.

笔画平滑

So, if the above is the secret to drawing long strokes, that would be why people having been inking lovely drawings for years without any smoothing? Then, surely, it is decadence to use something like stroke smoothing, a short-cut for the lazy?

Example of how a rigger brush can smooth the original movement (here in red)

Not really. To both, actually. Inkers have had a real-life tool that made it easier to ink, it’s called a rigger-brush, which is a brush with very long hairs. Due to this length it sorta smooths out shakiness, and thus a favoured brush when inking at three in the morning.

With some tablet brands, the position events being sent aren’t very precise, which is why we having basic smoothing to apply the tiniest bit of smoothing on tablet strokes.

On the other hand, doing too much smoothing during the whole drawing can make your strokes very mechanical in the worst way. Having no jitter or tiny bumps removes certain humanity from your drawings, and it can make it impossible to represent fabric properly.

Therefore, it’s wise to train your inking hand, yet not to be too hard on yourself and refuse to use smoothing at all, as we all get tired, cold or have a bad day once in a while. Stabilizer set to 50 or so should provide a little comfort while keeping the little irregularities.

贝塞尔曲线和其他工具

So, you may have heard of a French curve. If not, it’s a piece of plastic representing a stencil. These curves are used to make perfectly smooth curves on the basis of a sketch.

In digital painting, we don’t have the luxury of being able to use two hands, so you can’t hold a ruler with one hand and adjust it while inking with the other. For this purpose, we have instead Bezier curves, which can be made with the 路径选区工具.

You can even make these on a vector layer, so they can be modified on the fly.

The downside of these is that they cannot have line-variation, making them a bit robotic.

You can also make small bezier curves with the 绘画辅助尺工具, amongst the other tools there.

Then, in the freehand brush tool options, you can tick Snap to Assistants and start a line that snaps to this assistant.

预设

So here are some things to consider with the brush-presets that you use:

锯齿效应和抗锯齿

A starting inker might be inclined to always want to use anti-aliased brushes, after all, they look so smooth on the screen. However, while these look good on screen, they might become fuzzy when printing them. Therefore, Krita comes with two default types. Anti-aliased brushes like ink_brush_25 and slightly aliased brushes like ink_tilt, with the latter giving better print results. If you are trying to prepare for both, it might be an idea to consider making the inking page 600dpi and the color page 300dpi, so that the inking page has a higher resolution and the ‘jaggies’ aren’t as visible. You can turn any pixel brush into an aliased brush, by going F5 and ticking Sharpness.

纹理

Do you make smooth ‘wet’ strokes? Or do you make textured ones? For the longest time, smooth strokes were preferred, as that would be less of a headache when entering the coloring phase. Within Krita there are several methods to color these easily, the colorize mask being the prime example, so textured becomes a viable option even for the lazy amongst us.

Left: No texture, Center: Textured, Right: Predefined Brush tip

压力响应曲线

Of course, the nicest lines are made with pressure sensitivity, so they dynamically change from thick to thin. However, different types of curves on the pressure give different results. The typical example is a slightly concave line to create a brush that more easily makes thin lines.

Ink_Gpen_25 is a good example of a brush with a concave pressure curve. This curve makes it easier to make thin lines.

conversely, here’s a convex brush. The strokes are much rounder

Fill_circle combines both into an s-curve, this allows for very dynamic brush strokes

Pressure isn’t the only thing you can do interesting things with, adding an inverse convex curve to speed can add a nice touch to your strokes

为描线环节准备草图

So, you have a sketch and you wish to start inking it. Assuming you’ve scanned it in, or drew it, you can try the following things to make it easier to ink.

把不透明度降到 10%

Put a white (just press Backspace) layer underneath the sketch. Turn down the opacity of the sketch to a really low number and put a layer above it for inking.

Make the sketch colored

Put a layer filled with a color you like between the inking and sketch layer. Then set that layer to ‘screen’ or ‘addition’, this will turn all the black lines into the color! If you have a transparent background, or put this layer into a group, be sure to tick the alpha-inherit symbol!

Make the sketch colored, alternative version

Or, right-click the layer, go to layer properties, and untick ‘blue’. This works easier with a single layer sketch, while the above works best with multi-layer sketches.

绘制超细线条

If you are interested in super-thin lines, it might be better to make your ink at double or even triple the size you usually work at, and, only use an aliased pixel brush. Then, when the ink is finished, use the fill tool to fill in flats on a separate layer, split the layer via Layer ‣ Split ‣ Layer Split, and then resize to the original size.

This might be a little of an odd way of working, but it does make drawing thin lines trivial, and it’s cheaper to buy RAM so you can make HUGE images than to spent hours on trying to color the thin lines precisely, especially as colorize mask will not be able to deal with thin anti-aliased lines very well.

小技巧

David Revoy made a set of his own inking tips for Krita and explains them in this youtube video [https://www.youtube.com/watch?v=xvQ5l0edsq4].

笔刷技巧：动态笔刷

问题

I was messing with the brushes and noticed there is like an option for it being “animated”. What does it mean and how do I use it?

Basically, they’re what is officially called an ‘image hose’, and they’re quite fun. They are basically a brush-tip with multiple image files.

The typical way to make them is to first draw the ‘frames’ on a small canvas, per layer:

You can use Alt + mouseleft on the layer thumbnails to isolate layers without hiding them.

When done you should have a mess like this.

Go into the brush settings (F5), and go to predefined brush-tips, and click stamp. You will get this window.

And then use style animated and selection mode set to random.

Krita uses Gimp’s image hose format which allows for random selection of the images, angle based selection, pressure based selection, and incremental selection (I have no idea what constant does).

Then select the above brush and your new leafy-brush tip.

And use it to paint trees! (for example)

You can also use animated brush tips to emulate, for example, bristle brush tips that go from very fine bristles to a fully opaque stamp based on pressure, like a dry paintbrush might do. To do this, you would follow the above instructions, but for each layer, create a different cross-section of the brush to correspond with the amount of pressure applied.

笔刷技巧：散景高光

问题

How do you do bokeh effects?

First, blur your image with the Lens Blur to roughly 50 pixels.

Take smudge_textured, add scattering, turn off tablet input.

Change the brush-tip to ‘Bokeh’ and check ‘overlay’ (you will want to play with the spacing as well).

Then make a new layer over your drawing, set that to ‘lighter color’ (it’s under lighter category) and painter over it with you brush.

Overlay mode on the smudge brush allows you to sample all the layers, and the ‘lighter color’ blending mode makes sure that the Bokeh circles only show up when they are a lighter color than the original pixels underneath. You can further modify this brush by adding a ‘fuzzy’ sensor to the spacing and size options, changing the brush blending mode to ‘addition’, or by choosing a different brush-tip.

笔刷技巧：焦散线

问题

Could you do a tutorial on how to recreate the look of light refracting in water?

Sure, caustics, it’s not like it’s the most complicated effect known to CG graphics… Okay, so the first thing is that light effects never work in isolation: you need to be spot on with colors and other effects to make it work. So we first need to recreate the surroundings a bit.

We set up something simple with gradients. Some radial, some linear. The eraser mode works with gradients as well, so use that to your advantage!

We create a simple smudge brush by taking smudge_soft and adding scattering to it, as well as an s-curve on the smudge length.

And then we build up a quick base:

Note how the smudge brush here is used not just to mix areas, but also to create definition of borders by lowering the scatter. (If you reverse the pressure curve on the scatter, this’ll be easily done by increasing the pressure on the stylus)

Now for the real magic. Caustics are a bit hairy, which means it’s a good candidate for the sketch brush engine.

Take sketch_ink_big, and add pressure to the Line width while setting Density under the Brush size to 100%. This makes it extra hairy.

Set the brush blending mode to Color Dodge, and select the color of our caustics. Color dodge will cause a move towards white by applying special dodge color maths to our brush dabs instead of the Normal averaging color maths.

Outside of pressure for making varying strokes, glowiness for the light and extra density, we also want to have the size of the line decrease the further away it is…

Then, use the assistant editor tool to add a perspective grid. It doesn’t need to be perfectly in perspective, because we’ll only use it for the perspective sensor.

This will cause the brush to give smaller lines the further it registers on the perspective assistant. (It only works per single perspective assistant, making it not very good for chaining, but for our purpose this is good.)

Then you start slowly building up your lines. (Make sure to make a copy of the layer. The color dodge blending doesn’t work well on a separate layer, so do it on one that also has the ground on it.)

Make sure to try and follow the shapes you made. (I failed at this) The great thing about the sketch brush is that it causes those little ‘melt-togethers’ where two lines cross. This is only per stroke, so make a lot of long ongoing strokes with this brush to make use of it.

Then take the gradient tool, and set the blending mode to color and the paint tool to a light blue, so we can get in the bluish atmospheric effect.

Then use the airbrush_pressure with the line tool to make some light-shafts of different sizes on a separate layer. (Don’t forget you can use the eraser mode for subtle erasing with the line tool as well)

Set the blending mode to color dodge and lower the opacity.

Finally, polish the piece with the airbrush tool and some local color picking.

Final Result

笔刷技巧：绒毛和草丛

问题

对于毛皮纹理而言，哪种画刷是坠吼的？

So typically, you see the same logic applied on fur as on regular 笔刷技巧：头发.

However, you can make a brush a little easier by using the Gradient, Mix and HSV options in the pixel and color smudge brushes. Basically, what we want to do is have a stroke start dark and then become lighter as we draw with it, to simulate how hair-tips catch more light and look lighter due to being thinner at the ends, while at the base they are frequently more dark.

Take the ink_brush_25 and choose under Brush Tip ‣ Predefined “A-2 dirty brush”. Set the spacing to Auto and right-click the spacing bar to type in a value between 0.25 and 0.8. Also turn on the Enable Pen Settings on flow. Replicate the pressure curve above on the size option. We don’t want the hairs to collapse to a point, hence why the curve starts so high.

Then activate value and reproduce this curve with the Distance or Fade sensor. Like how the pressure sensor changes a value (like size) with the amount of pressure you put on the stylus, the distance sensor measures how many pixels your stroke is, and can change an option depending on that. For the HSV sensors: If the curve goes beneath the middle, it’ll become remove from that adjustment, and above the vertical middle it’ll add to that adjustment. So in this case, for the first 100px the brush dab will go from a darkened version of the active paint color, to the active paint color, and then for 100px+ it’ll go from the active color to a lightened version. The curve is an inverse S-curve, because we want to give a lot of room to the mid-tones.

We do the same thing for saturation, so that the darkened color is also slightly desaturated. Notice how the curve is close to the middle: This means its effect is much less strong than the value adjustment. The result should look somewhat like the fifth one from the left on the first row of this:

The others are done with the smudge brush engine, but a similar setup, though using color rate on distance instead. Do note that it’s very hard to shade realistic fur, so keep a good eye on your form shadow. You can also use this with grass, feathers and other vegetation:

For example, if you use the mix option in the pixel brush, it’ll mix between the fore and background color. You can even attach a gradient to the color smudge brush and the pixel brush. For color smudge, this is just the Gradient option, and it’ll use the active gradient. For the pixel brush, set the color-source to Gradient and use the mix option.

On tumblr it was suggested this could be used to do this tutorial [https://vimeo.com/78183651]. Basically, you can also combine this with the lighter color blending mode and wraparound mode to make making grass-textures really easy!

笔刷技巧：头发

Usually, most digital styles tend to focus on simple brushes, like the round brushes, and their usage in hair is no different. So, the typical example would be the one on the left, where we use fill_round to draw a silhouette and build up to lighter values.

The reason I use fill_round here is because the pressure curve on the size is s-shaped. My tablet has a spring-loaded nib which also causes and s-shaped curve hard-ware wise. This means that it becomes really easy to draw thin lines and big lines. Having a trained inking hand helps a lot with this as well, and it’s something you build up over time.

We then gloss the shadow parties with the basic_tip_default. So you can get really far with basic brushes and basic painting skills and indeed I am almost convinced tysontan, who draws our mascot, doesn’t use anything but the basic_tip_default sometimes.

However, if you want an easy hair brush, just take the fill_round, go to the brush-tip, pick predefined and select A2-sparkle-1 as the brush tip. You can fiddle with the spacing below the selection of predefined brushtip to space the brush, but I believe the default should be fine enough to get result.

笔刷技巧：轮廓线

问题

How to make an outline for a single brush stroke using Krita?

Not really a brush, but what you can do is add a layer style to a layer, by mouseright a layer and selecting layer style. Then input the following settings:

Then, set the main layer to multiply (or add a 颜色转为透明度 filter mask), and paint with white:

(The white thing is the pop-up that you see as you hover over the layer)

Merge into a empty clear layer after ward to fix all the effects.

笔刷技巧：彩虹笔刷

问题

Hello, there is a way to paint with rainbow on Krita?

Yes there is.

First, select the fill_circle:

Then, press F5 to open the brush editor, and toggle Hue.

This should allow you to change the color depending on the pressure.

警告

The brightness of the rainbow is relative to the color of the currently selected color, so make sure to select bright saturated colors for a bright rainbow!

Uncheck Pressure and check Distance to make the rainbow paint itself over distance. The slider below can be mouseright to change the value with keyboard input.

When you are satisfied, give the brush a new name and save it.

笔刷技巧：雕塑笔触

问题

How do I make a brush like the one in Sinix’s paint-like-a-sculptor video?

It’s actually quite easy, but most easy to do since Krita 3.0 due a few bugfixes.

First, select Basic_Wet from the default presets, and go into the brush editor with F5.

Then, the trick is to go into Opacity, untoggle Pressure from the sensors, toggle Fade and then reverse the curve as shown above. Make sure that the curve ends a little above the bottom-right, so that you are always painting something. Otherwise, the smudge won’t work.

This’ll make the color rate decrease and turn it into a smudge brush as the stroke continues:

The Fade sensor will base the stroke length on brush size. The Distance sensor will base it on actual pixels, and the Time on actual seconds.

Then, select Brushtip ‣ Predefined and select the default A_Angular_Church_HR brushtip.

This makes for a nice textured square brush.

Of course, this’ll make the stroke distance longer to get to smudging, so we go back to the Opacity.

Just adjust the fade-length by mouseright on the slider bar. You can then input a number. In the screenshot, I have 500, but the sweet spot seems to be somewhere between 150 and 200.

Now, you’ll notice that on the start of a stroke, it might be a little faded, so go into Color Rate and turn off the Enable Pen Settings there.

Then, finally, we’ll make the brush rotate.

Tick the Rotation parameter, and select it. There, untick Pressure and tick Drawing Angle.

Then, for better angling, tick Lock and set the Angle Offset to 90 degrees by mouseright the slider bar and typing in 90.

Now, give your brush a new name, doodle on the brush-square, Save to presets and paint!

用变形蒙版绘制杜鹃花

注解

This page was ported from the original post on the main page

Okay, so I’ve wanted to do a tutorial for transform masks for a while now, and this is sorta ending up to be a flower-drawing tutorial. Do note that this tutorial requires you to use Krita 2.9.4 at MINIMUM. It has a certain speed-up that allows you to work with transform masks reliably!

I like drawing flowers because they are a bit of an unappreciated subject, yet allow for a lot of practice in terms of rendering. Also, you can explore cool tricks in Krita with them.

Today’s flower is the Azalea flower. These flowers are usually pink to red and appear in clusters, the clusters allow me to exercise with transform masks!

I got an image from Wikipedia for reference, mostly because it’s public domain, and as an artist I find it important to respect other artists. You can copy it and, if you already have a canvas, Edit ‣ Paste into New Image or New ‣ Create from Clipboard.

Then, if you didn’t have a new canvas make one. I made an A5 300dpi canvas. This is not very big, but we’re only practicing. I also have the background color set to a yellow-grayish color (#CAC5B3), partly because it reminds me of paper, and partly because bright screen white can strain the eyes and make it difficult to focus on values and colors while painting. Also, due to the lack of strain on the eyes, you’ll find yourself soothed a bit. Other artists use #c0c0c0, or even more different values.

So, if you go to Window ‣ Tile, you will find that now your reference image and your working canvas are side by side. The reason I am using this instead of the docker is because I am lazy and don’t feel like saving the wikipedia image. We’re not going to touch the image much.

绘制画面零部件

First we make a bunch of branches. I picked a slightly darker color here than usual, because I know that I’ll be painting over these branches with the lighter colors later on. Look at the reference how branches are formed.

Then we make an approximation of a single flower on a layer. We make a few of these, all on separate layers. We also do not color pick the red, but we guess at it. This is good practice, so we can learn to analyze a color as well as how to use our color selector. If we’d only pick colors, it would be difficult to understand the relationship between them, so it’s best to attempt matching them by eye.

I chose to make the flower shape opaque quickly by using the behind blending mode. This’ll mean Krita is painting the new pixels behind the old ones. Very useful for quickly filling up shapes, just don’t forget to go back to normal once you’re done.

Now, we’ll put the flowers in the upper left corner, and group them. You can group by making a group layer, and selecting the flower layers in your docker with Ctrl + mouseleft and dragging them into the group. The reason why we’re putting them in the upper left corner is because we’ll be selecting them a lot, and Krita allows you to select layers with kbd:R + mouseleft on the canvas quickly. Just hold R and mouseleft the pixels belonging to the layer you want, and Krita will select the layer in the layer docker.

克隆图层

Now, we will make clusters. What we’ll be doing is that we select a given flower and then make a new clone layer. A clone layer is a layer that is literally a clone of the original. They can’t be edited themselves, but edit the original and the clone layer will follow suit. Clone Layers, and File layers, are our greatest friends when it comes to transform masks, and you’ll see why in a moment.

You’ll quickly notice that our flowers are not good enough for a cluster: we need far more angles on the profile for example. If only there was a way to transform them… but we can’t do that with clone layers. Or can we?

变形蒙版的威力

Transform Masks are a really powerful feature introduced in 2.9. They are in fact so powerful, that when you first use them, you can’t even begin to grasp where to use them.

Transform masks allow us to do a transform operation onto a layer, any given layer, and have it be completely dynamic! This includes our clone layer flowers!

How to use them:

mouseright the layer you want to do the transform on, and add a Transform mask.

A transform mask should now have been added. You can recognize them by the little ‘scissor’ icon.

Now, with the transform mask selected, select the tooltransform, and rotate our clone layer. Apply the transform. You know you’re successful when you can hide the transform mask, and the layer goes back to its original state!

You can even go and edit your transform! Just activate the tooltransform again while on a transform mask, and you will see the original transform so you can edit it. If you go to a different transform operation however, you will reset the transform completely, so watch out.

We’ll be only using affine transformations in this tutorial (which are the regular and perspective transform), but this can also be done with warp, cage and liquify, which’ll have a bit of a delay (3 seconds to be precise). This is to prevent your computer from being over-occupied with these more complex transforms, so you can keep on painting.

We continue on making our clusters till we have a nice arrangement.

Now do the same thing for the leaves.

Now, if you select the original paint layers and draw on them, you can see that all clone masks are immediately updated!

Above you can see there’s been a new view added so we can focus on painting the flower and at the same time see how it’ll look. You can make a new view by going Window ‣ New View and selecting the name of your current canvas (save first!). Views can be rotated and mirrored differently.

Now continue painting the original flowers and leaves, and we’ll move over to adding extra shadow to make it seem more lifelike!

We’re now going to use Alpha Inheritance. Alpha inheritance is an ill-understood concept, because a lot of programs use clipping masks instead, which clip the layer’s alpha using only the alpha of the first next layer.

Alpha inheritance, however, uses all layers in a stack, so all the layers in the group that haven’t got alpha inheritance active themselves, or all the layers in the stack when the layer isn’t in a group. Because most people have an opaque layer at the bottom of their layer stack, alpha inheritance doesn’t seem to do much.

But for us, alpha inheritance is useful, because we can use all clone-layers in a cluster (if you grouped them), transformed or not, for clipping. Just draw a light blue square over all the flowers in a given cluster.

Then press the last icon in the layer stack, the alpha-inherit button, to activate alpha-inheritance.

Set the layer to multiply then, so it’ll look like everything’s darker blue.

Then, with multiply and alpha inheritance on, use an eraser to remove the areas where there should be no shadow.

For the highlights use exactly the same method, AND exactly the same color, but instead set the layer to Divide (you can find this amongst the Arithmetic blending modes). Using Divide has exactly the opposite effect as using multiply with the same color. The benefit of this is that you can easily set up a complementary harmony in your shadows and highlights using these two.

Do this with all clusters and leaves, and maybe on the whole plant (you will first need to stick it into a group layer given the background is opaque) and you’re done!

Transform masks can be used on paint layers, vector layers, group layers, clone layers and even file layers. I hope this tutorial has given you a nice idea on how to use them, and hope to see much more use of the transform masks in the future!

You can get the file I made here [https://share.kde.org/public.php?service=files&t=48c601aaf17271d7ca516c44cbe8590e] to examine it further! (Caution: It will freeze up Krita if your version is below 2.9.4. The speed-ups in 2.9.4 are due to this file.)

为互联网保存图像

Krita 的默认保存格式是 *.kra 格式。此格式可以保存 Krita 能够对图像进行的一切操作：包括图层、滤镜、辅助尺、蒙版、色彩空间等。为了保存这么多的数据， *.kra 文件的体积一般都很大，对于上传到互联网来说很不方便。如果人们只能使用 *.kra 文件来查看图片，他们的流量肯定两下就用光了。因此我们需要为互联网用途优化输出的图像。

这涉及到下面几步：

先把图像保存为一个 .kra 文件，这是你的工作文件，同时也作为应对操作失误的备份。

平整全部图层为一层。可在 图层 ‣ 平整图像 或按 Ctrl + Shift + E 来进行。平整过程有时较慢，如果图像比较大，Krita 会有几秒钟没有反应，请不用担心！程序很快就会恢复响应。

将色彩空间转换为 8位 sRGB (如果之前不是)。这对于减小文件体积非常有用，而且 PNG 是无法保存高于 16 位的图像的。可在 图像 ‣ 转换图像色彩空间 将相应选项设为 RGB、8 位 和 sRGB-elle-v2-srgbtrc.icc。如果你使用了线性工作空间，不要勾选 Little CMS 优化。

调整大小。在 图像 ‣ 缩放图像至新尺寸 或使用 Ctrl + Alt + I 打开调整大小对话框。一般经验是把图像的宽高控制在 1200 像素以内。(这也是高清格式的尺寸)。你可以简单地通过把 打印大小 的 分辨率 改为 72 dpi，然后点击 确定 即可调整图像整体大小。

把图像另存为对网络安全的格式。有三种较好的选择：

JPG

如果图像有大量不同的色彩，如传统绘画等，可选用此格式。

PNG

如果图像色彩不是特别丰富，如漫画那样的黑白或者像素图，可选用此格式。选中 尝试保存为索引 PNG 可进一步优化图像大小。

GIF

仅用于动画 (今年将实现支持)，或颜色种类特别少的图像，因为这是一个索引图像格式。

保留图像透明度

只有在使用 GIF 和 PNG 格式时才能保留图像的透明度。首先要确保你在 Krita 的画布上能看见代表透明像素的棋盘格 (要做到这一点，可以隐藏最底下的图层，或者 图像 ‣ 图像背景色与透明度 ，或者 滤镜 ‣ 颜色 ‣ 颜色转为透明度)。最后，保存为 PNG ，勾选 存储透明度通道。

点击保存，然后就可以把输出的图像上传并分享了！

Krita 常见问答

本页面对人们使用 Krita 时经常遇到的问题作出了解答。我们在作答时假定了用户正在使用最新版本的 Krita 软件。请确保你安装的 Krita 与官方网站的最新稳定版本一致。

目录

Krita 常见问答

常规问题

Krita 是什么？

Krita 有中文版吗？

Krita 支持图层剪贴或者剪贴蒙版吗？

Windows 平台：OBS 无法录制 Krita 的 OpenGL 画布

Krita 的配置文件存放在哪里？

重置 Krita 配置

我的资源保存在哪里？

Krita 提示它无法找到某些文件，然后自动关闭。我应该怎么办？

Krita 支持什么显卡？

我无法编辑 Photoshop 创建的 PSD 文件中的文字

我的图像需要占用多大内存？

为什么我使用橡皮擦之后会出现棋盘格图案？

Windows 环境：我可以在 Sandboxie 里面运行 Krita 吗？

Windows 环境：Krita 无法保存

Krita 可以处理 8 位索引颜色图像吗？

我在 Windows 上面如何生成回溯跟踪记录？

我可以下载旧版的 Krita 吗？

在 Windows 下面，Krita 的界面元素在我的高分辨率屏幕上显得太小了。

数位板

Krita 支持哪些数位板？

Krita 不识别数位板怎么办？

Linux

Windows

在 Windows 下面使用多屏幕时，如何修复数位板的偏移问题

Microsoft Surface Pro 和 NTrig

Tablet Pro 和 Surface Pro

在 Windows 下面使用数位板会出现涟漪、圆环、乱涂或者其他怪事

触摸在 Windows 下面似乎不起作用

工具框

工具箱不见了

工具图标太大了

Krita 无法最大化

资源

我不小心把自带笔刷的预设给覆盖掉了，可以恢复它原来的选项吗？

常用预设如何设置？

Krita 可以加载 Photoshop 笔刷吗？

Krita 运行缓慢

启动速度缓慢

笔刷绘制缓慢

使用一段时间后程序变慢

动画

为什么动画在我的视频播放器里只有一片黑

工具

为什么变形工具在操作过程中图像很清晰，但输出结果时却变得比较模糊？

许可证、权利和 Krita 基金会

Krita 归谁所有？

Kiki 是谁？她是什么？

为什么 Krita 是自由/免费的？

我可以将 Krita 用于商业用途吗？

我可以在 iPad 或者安卓上使用 Krita 吗？

谁为 Krita 提供翻译

参考

常规问题

常规问题

Krita 是什么？

Krita 项目的开发构想如下：

Krita 是一款自由、免费、开源的跨平台数字绘画应用软件，它为作者提供了从起稿、描线到上色、输出等整个数字绘画流程的完整解决方案。Krita 为手绘用途量身定制，为经常性、长时间、精神高度集中的绘画工作进行优化。它适用于创作插画、概念美术、电影布景、材质、漫画和动画等作品。Krita 的开发人员与用户密切交流，软件的设计充分考虑了用户的实际需求和绘画流程。Krita 支持开放标准，能够与其他软件进行协作。

Krita 有中文版吗？

Krita 支持多语言，它会自动检测并使用当前操作系统的语言。如果界面依然是英语，请按照下面步骤进行设定：

菜单 → Settings (设置) → Switch Application Language (切换应用程序语言)。点击它会显示一个对话框。

点击 Primary language （首选语言） 右侧的下拉菜单，选择您的语言（简体中文）。

点击 OK （确定） 按钮关闭对话框。

重新启动 Krita。现在它的界面语言就变成中文了！

如果这样做了还是不行，进入刚才的对话框中，点击“Add Fallback Language (添加备选语言)”按钮，然后在下拉菜单中再次选中中文。这是一个已知问题，但我们尚未找到解决办法。

Krita 支持图层剪贴或者剪贴蒙版吗？

Krita 没有剪贴蒙版功能，但它具备一个叫做继承透明度的功能来实现剪贴操作。请到 此页面 学习如何在 Krita 里面进行剪贴！

Windows 平台：OBS 无法录制 Krita 的 OpenGL 画布

目前的解决办法有两种：

如需关闭 OpenGL，可到 设置 ‣ 配置 Krita ‣ 显示 。

或者不要在 OBS 里面使用 Hardware Accelerated Mode (game recording mode) / 硬件加速模式 (游戏录制模式)。这也做的缺点是 OBS 会录制整个桌面而不只是捕获 Krita 的窗口。

你也可以试试在设置中显示页面的“渲染器”下拉菜单处选用 ANGLE 而不是原生 OpenGL 渲染器。

Krita 的配置文件存放在哪里？

不同的操作系统下面 Krita 保存设置文件的路径不同：

Linux

$HOME/.config/kritarc

Windows

%APPDATA%\Local\kritarc

MacOS X

$HOME/Library/Preferences/kritarc

“kritarc”文件便是 Krita 的配置文件。Krita 不使用 Windows 注册表保存配置。

重置 Krita 配置

你可以通过以下方法重置 Krita 的配置：

Krita 3.0 或更新版本：删除/重命名“kritarc”文件，它的路径是：

Linux

$HOME/.config/kritarc

Windows

%LOCALAPPDATA%\kritarc

MacOS X

$HOME/Library/Preferences/kritarc

在某些情况下你可能还要移除“kritaopenglrc”和“kritadisplayrc”文件。

如果你对 Krita 进行配置之后发生了崩溃，不要删除上述文件。将其重命名之后发送一份给我们，这样可以帮助我们查明造成崩溃的原因。

如果你从 Windows Store 安装 Krita，kritarc 文件会在不同的位置

%LOCALAPPDATA%\Packages\49800Krita_一组随机字符串\LocalCache\Local\kritarc

随机字符串每次安装都不同.

Windows 用户习惯在软件发生问题时卸载后重装软件以解决问题。然而除非是安装错误或者是反病毒软件、硬盘错误等原因造成的文件损坏，否则重装 Krita 只是将跟硬盘上一样的数据重新写入一遍。这个方法并不会重置 Krita 的设置，因此也不会有任何效果。

我的资源保存在哪里？

Linux

$HOME/.local/share/krita/

Windows

%APPDATA%\krita\

Mac OS X

~/Library/Application Support/Krita/

如果你从 Windows Store 安装 Krita，你的自定义资源会在如下位置：

%LOCALAPPDATA%\Packages\49800Krita_随机字符串\LocalCacheRoamingkrita

Krita 提示它无法找到某些文件，然后自动关闭。我应该怎么办？

造成问题的原因可能是：

你下载到的 Krita 软件包是损坏的，因此缺少了这部分文件。在网络不稳定，例如在使用信号较差的 WiFi 时，下载文件比较容易损坏。你可以找网络稳定可靠的场所重新下载 Krita。在正常情况下，Krita 软件包的大小在 80 到 100 MB 不等。

Krita 在安装时可能发生了异常情况。检查你安装 Krita 的硬盘是否已满，在预留出至少 120 MB 的硬盘空间后重新安装 Krita。如果问题依然存在，那么你的设备可能存在其他问题，我们建议你联系计算机专业人员对其进行检查。

某些解压缩工具无法正确处理我们的压缩包。Windows、OSX 和绝大多数的 Linux 发行版都自带了系统原生的解压缩工具，它们都能正常工作，因此我们建议你使用它们来解压缩。

你可能在资源管理器里删除或者移动了 Krita 的资源，因此 Krita 无法找到它们。

Krita 支持什么显卡？

Krita 可以使用 OpenGL 加速绘画、画布缩放、旋转和平移，并提高缩放和旋转时的显示品质。为了达到最佳效果，显卡驱动程序至少要支持 OpenGL 3.2。Nvidia 和较新的 Intel 显卡通常工作良好。AMD/ATI 显卡的问题较多，尤其是在 Linux 下面使用专有驱动时。不过 AMD 显卡在 Linux 下面使用自由开源驱动时工作良好。以下是各公司支持 OpenGL 3.2 的最早的显卡型号：

Intel

Intel 第三代核芯显卡，IvyBridge 或 Bay-Trail 微架构，2012 年发布。常见产品：Celeron J1x00、N2x00、Celeron (G)1xx0、Pentium J2x00、N3500、Pentium (G)2xx0、Core i3/5/7-3xx0 等。

AMD/ATI

Radeon HD 2000 家族，TeraScale 1 微架构，2007 年发布。常见产品：Radeon HD 2400 PRO、Radeon HD 2600 PRO 等。

Nvidia

GeForce 8 家族，Tesla 微架构，2006 年发布。常见产品：GeForce 8400 GS、GeForce 8800 GTS、9800 GTX、GTS 250 等。

＊Krita 3.3 及更高版本＊Krita 在 Windows 下面可以通过 ANGLE 使用 Direct3D 11 进行图形加速。如果你的系统使用 Intel GPU，此功能将会自动启用。

我无法编辑 Photoshop 创建的 PSD 文件中的文字

我们尚不支持 PSD 文件内的文字。文字会在被像素化之后转换为颜料图层。

我的图像需要占用多大内存？

对于简单图像来说，图像的大小是：像素宽度 x 像素高度 x 色彩通道数量 x 每色彩通道大小。例如一个 1000 x 1000 的 16 位整数 RGBA 图像：1000 x 1000 x 4 x 2 字节。在这个结果上再 x (图层数目 + 2)。这个 2 里面一个是给图像的，一个是给显示器的。如果你用了蒙版、滤镜图层或者克隆图层，计算起来就会非常复杂。

为什么我使用橡皮擦之后会出现棋盘格图案？

你大概习惯使用 GIMP 或者 Photoshop。在这两个软件里，图像的最下面的一个图层默认是没有透明度通道的。在它们的背景图层上使用橡皮擦实际上是在用背景色进行绘制。

在 Krita 里面，所有的图层都有透明度通道。如果你想要消除背景图层上除了背景色外的颜色，就应该直接用背景色进行绘制而不是用橡皮擦来擦除。反过来说，如果你在 GIMP 里面新建了一个图像，在背景图层上添加一个透明度通道，然后用橡皮擦在图层上擦除，效果也会跟 Krita 里面一样。大多数 Krita 用户会在第一个图层上方再新建一个空白图层 (快捷键：Insert) 然后在上面作画。这样并不会耗费更多内存，因为无论是一个空白图层还是一个默认颜色图层都只会占用一个像素所需的内存。

Windows 环境：我可以在 Sandboxie 里面运行 Krita 吗？

我们不建议那样做。Sandboxie 对磁盘资源呼叫的解析方式会造成程序卡顿甚至锁死。

Windows 环境：Krita 无法保存

如果提示信息时“无法找到文件。检查文件名后重试。”你可能启用了受控文件夹访问。

选择 开始 ‣ 设置 。

选择 更新和安全 ‣ Windows 安全中心 。

Select 打开 Windows 安全中心 。

选择 病毒和威胁保护，然后选择 病毒和威胁保护设置。

找到 文件夹限制访问 ，将它关闭。

你可以将 Krita 添加到白名单中，根据这些说明进行操作 [https://docs.microsoft.com/en-us/windows/security/threat-protection/windows-defender-exploit-guard/customize-controlled-folders-exploit-guard#allow-specific-apps-to-make-changes-to-controlled-folders].

Krita 可以处理 8 位索引颜色图像吗？

不能。Krita 是被设计来处理真实颜色而不是索引色阶的。我们也没有计划支持索引颜色图像。虽然 Krita 能够导出某些索引颜色图像格式，例如 GIF，但它并不提供对像素数值的精确控制。

我在 Windows 上面如何生成回溯跟踪记录？

参见

Dr. Mingw debugger

如果 Krita 在 Windows 下面崩溃了，而且你也可以重现该崩溃，那么在向我们报告程序问题时请附上一个该崩溃的回溯跟踪记录。回溯跟踪记录相当于飞机的黑匣子，它可以揭示程序崩溃时计算机正在运行的指令和发生崩溃的部分，这对于分析崩溃的原因至关重要。

Krita 的软件包已经自带了 Dr. Mingw debugger。请参照 Dr. Mingw debugger 页面的说明来生成回溯跟踪记录。

我可以下载旧版的 Krita 吗？

所有旧版的 Krita 软件都被保留在这里：

旧版软件 [http://download.kde.org/Attic/krita]

在 Windows 下面，Krita 的界面元素在我的高分辨率屏幕上显得太小了。

你可以在 Windows 的显示设置中把缩放更改为 150% 或 200%，然后在 Krita 的设置里面启用高分辨率支持：

在菜单上选择 设置 ‣ 配置 Krita

在 常规 页面，切换至 窗口 标签。

勾选 启用高分辨率屏幕 (Hi-DPI) 支持

重新启动 Krita

你还可以在工具箱上点击右键，然后更改工具箱的图标大小。

数位板

Krita 支持哪些数位板？

要发挥 Krita 的潜力，一块具备压力感应功能的数位板非常重要。数位板在操作系统中正确配置后，Krita 不需要任何设置即可正常使用。

在 Windows 下面，你可以安装数位板的驱动程序来使用 Wintab 驱动，也可以在 Krita 的设置里面启用 Windows 8+ 指针输入 选项。

在 这里 你可以找到一个由社区维护的数位板支持列表。

如果你想要了解关于 iPad 和安卓平板的信息，请参阅 这里。

Krita 不识别数位板怎么办？

Linux

请在终端里运行下列命令，并将完整的输出结果反馈给我们：

lsmod

xinput

xinput list-props (id 可以通过 xinput 查到)

获取该数位板的事件日志 (如果可能的话)：

打开一个终端应用程序，例如在 KDE 下面的 Konsole

设置回滚行数为“无限” (对于 Konsole: 设置 ‣ 编辑当前配置 ‣ 滚动 ‣ 无限回滚)

输入“krita”启动 Krita 程序，然后随便新建一个文档

在 Krita 里面按 Ctrl + Shift + T，你会见到信息显示“已启用数位板事件记录”

试着重现你遇到的数位板问题

现在终端窗口已经被数位板事件日志填满。把它们全部拷贝下来附到问题报告中。

把全部上述数据通过 paste.kde.org 的服务附到问题报告中

Windows

首先检查数位板驱动程序是否已经正确安装。有些时候，其他硬件的驱动程序更新、Windows 更新、安装 Razer 游戏鼠标驱动程序等操作也会影响数位板的工作。

试试切换到 Windows 8 指针 API：设置 ‣ 配置 Krita ‣ 数位板。

如果之后还是不行，请向我们提供数位板日志以便分析。

从微软官方网站下载并安装 DebugView <http://technet.microsoft.com/en-us/sysinternals/bb896647.aspx>

启动 DebugView

启动 Krita

在 Krita 里面按 Ctrl + Shift + T，你会见到信息显示“已启用数位板事件记录”

试着重现你遇到的数位板问题

回到 DebugView 并将它的输出保存成文件，再把该文件附到问题报告中，也可以把内容粘贴到类似 paste.kde.org 的服务。

不过，在最近五年里关于 Windows 用户不能在 Krita 下面使用数位板的报告中，没有一个是因为 Krita 的问题造成的。它们要么是驱动程序自身的问题，要么是驱动程序安装的问题。

在 Windows 下面使用多屏幕时，如何修复数位板的偏移问题

如果你在画布上工作时发现数位板的定位有偏移，那么 Krita 很可能从系统处获取了错误的屏幕分辨率。这很可能是因为有外置显示器或者数位板在系统启动之后才被连接到了计算机。

可以通过下面的办法手动解决这个问题。

将压感笔移出数位板感应区域。

用键盘、鼠标等非压感笔设备启动 Krita。

按住 Shift 键不放。

用压感笔触碰数位板，这时 Krita 会自动对其进行识别。

Krita 会弹出一个对话框来询问正确的显示器分辨率。选择正确的数值或者手动输入，然后点击 确定。

如果在双显示器配置下数位板只能在屏幕的上半部分移动，你可能要输入两个显示器的宽度之和或者高度之和。

如果还是不行，而你使用的是 Wacom 数位板，那么偏移可能是错误的 Wacom 设置文件造成的。卸载、重装 Wacom 驱动程序是不会删除、替换这个文件的，所以还需要一些额外操作。

使用“Wacom 数位板设置文件工具”来清空全部设置。这样 Krita 就可以自动检测到正确的设置了。

警告

这个操作会将数位板的全部设置进行复位，因此你将需要重新配置或校准它。

＊Krita 3.3 及更高版本＊可以尝试在 Krita 的设置里面 启用 “Windows 8+ 指针输入”，但某些功能将无法使用。

Microsoft Surface Pro 和 NTrig

Krita 3.3.0 和之后的版本原生支持 Windows 指针 API (Windows Ink)。只需启用这项功能，你的 Surface Pro 或者其他使用了 n-trig 技术的平板电脑即可使用 Krita 正常工作。设置 ‣ 配置 Krita ‣ 数位板。

Tablet Pro 和 Surface Pro

与 Wacom 的 Companion、MobileStudio Pro 等笔式电脑相比，Surface 平板电脑没有配备硬件快捷键按钮。Tablet Pro 是一个用于将虚拟按钮显示在屏幕上的工具软件，但它并非自由软件。Krita 3.1 和之后的版本为 Tablet Pro 提供了预设的快捷键配置方案。

http://tabletpro.net/

如需详细指导，请参考 http://www.youtube.com/watch?v=WKXZgYqC3tI

在 Windows 下面使用数位板会出现涟漪、圆环、乱涂或者其他怪事

Windows 为笔式输入设备内建了花样繁多的设置和配套功能，但它们没有一个是好东西。这个工具可以帮助你在使用数位板时进行正确设置：

https://github.com/saveenr/Fix_My_Pen/releases

触摸在 Windows 下面似乎不起作用

你可能需要先禁用后再重新启用触摸设备的驱动程序。(点击 开始 按钮并输入设备管理器)。选择符合 HID 标准(的用户控制设备或类似项目) 或者 Intel(R) 精确触摸设备等设备。点击右键，禁用该设备。再点击右键，启用该设备。

工具框

工具箱不见了

你可以点击工具栏最右端的按钮，从列出的工作空间中选中一个，随后 Krita 的界面将会依照该工作空间的配置复位。

你也可以在工具栏的空白区域或者任意工具面板的标题栏上点击右键，勾选第二项“工具箱”即可。

你还可以进入 设置 菜单，在“工具面板”子菜单中勾选 工具箱。

工具图标太大了

在工具箱上点击右键即可指定图标大小。

Krita 无法最大化

如果启用的工具面板过多或位置安排不当，Krita 的窗口高度会受到工具面板总高度的推挤而超出屏幕大小，此时 Krita 将无法最大化。请重新安排工作空间中的各个工具面板。

资源

我不小心把自带笔刷的预设给覆盖掉了，可以恢复它原来的选项吗？

可以。首先进入资源目录：

Linux

$HOME/.local/share/krita/

Windows

user\Appdata\Roaming\krita\ 或者 %APPDATA%\Roaming\krita\

OSX

~/Library/Application Support/Krita/

你也可以通过另一种方式来访问它： 设置 ‣ 管理资源 ‣ 打开资源文件夹。

然后进入 paintoppressets 文件夹，删除你刚才创建的的预设文件。

回到资源文件夹，编辑“blacklist”文件，移除里面的“paintop”类预设，之后 Krita 就会重新加载默认预设。(这个系统有点麻烦，不过至少你不会因为误操作而彻底丢失笔刷预设)

常用预设如何设置？

在笔刷工具面板的任意笔刷上面点击右键，然后给它分配一个标签。接着在画布上点击右键呼叫浮动画具板，在画具板的右下角点击靠近内侧的图标，选择刚才笔刷分配到的标签即可加载它。

Krita 可以加载 Photoshop 笔刷吗？

可以，但存在一些限制。你可以在笔刷编辑器的“预制形状”标签页中使用“导入”按钮来加载 ABR 笔刷。但由于 Adobe 从未公开过他们笔刷的文件格式规范，我们只得通过逆向工程来摸索加载的方式。目前可以加载的内容仅限基本功能。

Krita 运行缓慢

造成 Krita 运行缓慢的原因有很多，下面仅列出一些常见情况。

其他程序正在占用 CPU 或者内存：Spotify 和其他 Electron 应用会造成该现象。

你正在运行 Windows，并且安装了第三方安全软件，如 Sandboxie 或 Total Defender 等。

图像太大，这可以是尺寸太大、颜色通道深度太高、图层数目过多等，你的硬件性能不足以流畅地处理它。

你没有在 Krita 中启用画布加速功能

请参照 此页面 [https://phabricator.kde.org/T7199]

启动速度缓慢

你可能安装了太多资源。请禁用一部分资源：设置 ‣ 管理资源。

如果你正在运行 Windows，且使用的是压缩包版本的 Krita，Windows 会在每次启动 Krita 时扫描解压后的每一个文件，拖慢启动速度。你可以使用安装包版的 Krita，或者在 Microsoft Security Essentials 里面将 Krita 和它的文件夹设为例外。

笔刷绘制缓慢

检查笔刷的工具选项，看看是否不小心打开了防抖功能。

换用另一个缩放模式，如三线性算法过滤：设置 ‣ 配置 Krita ‣ 显示页面。

尝试使用 16 位以下的通道色深。

如果是 Nvidia 显卡，可以尝试使用 16 位浮点的色彩空间。

如果是较为老旧的 AMD CPU，请禁用矢量优化，此功能在 AMD CPU上有问题：设置 ‣ 配置 Krita ‣ 性能。如果使用的是教新的 Threadripper AMD CPU，你不需要更改此选项。

Krita 是一个相当消耗内存的应用程序，2 GB 的内存是最低限度，我们建议至少要有 4 GB 内存。

检查有没有其他程序在占用 CPU 资源

如果你正在使用较大的笔刷，请启用即时预览。(使用很小的笔刷时请禁用它)。

将笔刷精度设置为 3 或者自动。

增大笔刷间隔数值。

如果这些办法都没用，请为此录制一段视频并配上说明，发表到 Krita 的论坛上。

检查是否已经启用了 OpenGL，如果没有，请启用它。如果 OpenGL 已经启用，而你的操作系统是 Windows，请换用 ANGLE 渲染器，或者干脆禁用 OpenGL。

使用一段时间后程序变慢

当程序开始变慢时，点击状态栏显示图像尺寸的区域，它会显示 Krita 使用了多少内存，是否超出了内存限制，是否已经开始内存交换。内存交换功能使用硬盘缓存数据，因此会极大地拖慢程序的运行速度。你可以尝试缩小图像的尺寸，也可以尝试提高内存限制：设置 ‣ 配置 Krita ‣ 性能 ‣ 高级。

动画

为什么动画在我的视频播放器里只有一片黑

你没有选用“baseline”选项渲染动画，而你的默认视频播放器是 Windows Media Player。你可以换用 baseline 选项或着换用更好的视频播放应用程序，如 VLC。详情可参考 此流程图 [https://www.deviantart.com/tiarevlyn/art/T-Krita-4-1-7-rendering-issues-manual-783473428]。

工具

为什么变形工具在操作过程中图像很清晰，但输出结果时却变得比较模糊？

变形工具在输出结果之前会生成预览图像。预览以屏幕分辨率为准，输出结果则以图像分辨率为准，因此可能会发生实际结果看起来比预览模糊的现象。详情请看：https://forum.kde.org/viewtopic.php?f=139&t=127269

许可证、权利和 Krita 基金会

Krita 归谁所有？

Krita 商标的所有权归 Stichting Krita Foundation (Krita 有限责任基金会) 所有。Krita 源代码的版权归每一位贡献过源代码的人员所有。

Kiki 是谁？她是什么？

Kiki 是一只电子松鼠，她是我们的吉祥物。她的设计者是 Tyson Tan (谭代山/钛山)。“Krita”在阿尔巴尼亚语中的含义是松鼠，因此我们选择了一只松鼠作为我们的吉祥物。

为什么 Krita 是自由/免费的？

Krita 是 KDE 社区开发的一款`自由软件<http://www.gnu.org/>`。我们认为任何作者都应该得到使用优秀创作工具的机会。如果你想要支持 Krita 的开发，你也可以在 Windows Store 上购买支持自动更新的 Krita。

我可以将 Krita 用于商业用途吗？

可以。你使用 Krita 创作的作品是由你独占的私人财产。作品的所有权归属于你，你可以使用任意一种许可证来发表你的作品。Krita 的 GPL 许可证只对其源代码有效。Krita 可以被用于任意商业用途。不管是制作概念美术、材质、特效的工作室，参加商业游戏开发的游戏美术人员，以科研为目的的科学家，还是在校学生都可以自由地使用 Krita 来进行创作。

如果你改动了 Krita 的程序并打算分发你改动过的版本，你必需与其他人分享你的改动。Krita 的 GNU GPL 许可证赋予人们使用、研究、修改和分发 Krita 的自由，任何人无权剥夺这些自由。

我可以在 iPad 或者安卓上使用 Krita 吗？

现在还不行。

谁为 Krita 提供翻译

Krita 是一款 KDE 应用程序 [http://www.kde.org/] — 我们对此感到自豪！Krita 的翻译由 KDE 本地化小组 [http://i18n.kde.org/] 负责进行。如果你想要为某种语言的翻译提供帮助，你可以加入该语言的小组。你也可以加入 Krita 的开发团队，指出或修复给翻译工作带来困难的代码问题，让 Krita 的界面文字在任何一种语言下面都自然流畅。

参考

https://answers.launchpad.net/krita-ru/+faqs

参与者手册

参与 Krita 项目工作所需的全部知识。

目录：

Krita 社区

互联网中继聊天

邮件列表

Phabricator

Bugzilla：程序问题跟踪器

开发冲刺活动

Krita 使用手册的标记语言使用惯例

元数据

标题

链接

图像

文中标记

置换参考

列表

表格

警示与旁注

代码片段

其他预格式化文本

词汇表、术语和索引

引号

Krita 手册写作指引

新手指引

指导思想

规程

其他

如何为使用手册准备图像

截图工具

按用途选择合适的文件格式。

优化图像品质和尺寸。

编辑文件的元数据

Technical Pages

Building krita with Docker

Building Krita from Source

CMake Settings for Developers

Introduction to Hacking Krita

Modern C++ usage guidelines for the Krita codebase

Developing Features

Optimizing tips and tools for Krita

Advanced Merge Request Guide

Reporting Bugs

Running Krita from Source

Triaging Bugs

Unittests in Krita

Krita 社区

保持联系！除了https://www.krita.org网站外，Krita项目还有三个主要的沟通渠道：

互联网中继聊天 (IRC)

邮件列表

Phabricator

虽然 Krita 的开发者和用户会使用 Twitter、Mastodon、Reddit, Google+、Tumblr 或 Facebook 等社交媒体，但这些并不是我们讨论新功能、程序问题、软件开发或制定未来计划的地方。

还有：

程序问题追踪器

开发冲刺活动

你会发现有有那么几个人特别活跃，他们便是 Krita 的核心团队。

Boudewijn (irc: boud)：项目维护人员、主程序员。为 Krita 全职工作。管理Krita基金会，分拣程序问题，负责社交媒体和管理员事务。Boudewijn 的 Reddit 用户名是 boudewijnrempt。

Dmitry (irc：dmitryk_log)：主程序员。为 Krita 全职工作。

Wolthera (irc：wolthera_laptop)：程序员。编写手册和教程，分拣程序问题，帮助大家解决问题。

Scott Petrovic (irc：scottyp)：UX 设计人员，程序员，网站管理员。

David Revoy (irc: deevad)：资深用户，创作了自由漫画 Pepper & Carrot，维护 Krita 的资源包。

Alvin Wong (irc: windragon)：Windows 专家。

Ben Cooksley (irc: bcooksley)：KDE 系统管理员。

Krita 的团队人员遍布全球，但大部分的开发工作在欧洲和俄罗斯进行。

Krita 项目是 KDE 社区大集体的一员。KDE® 社区是一个自由软件社区，致力于创建开放且用户友好的计算体验，它提供了先进的图形化桌面环境，一系列用于通信、办公、教育和娱乐领域的应用程序以及一套能够轻松构建全新应用程序的软件平台。KDE 贡献者指引也适用于 Krita 项目，可通过 此链接 [https://archive.flossmanuals.net/kde-guide/] 查看。

Krita 基金会是为了支持 Krita 的发展而成立的。自2013年以来 Krita 基金会一直在赞助 Dmitry 为 Krita 进行的工作。

互联网中继聊天

IRC 是主要的通信渠道。每种操作系统都有适用的 IRC 客户端，Krita 网站上也有一个 IRC 网页客户端。

加入IRC：连接到 irc.freenode.net，选择一个与众不同的昵称，然后加入 #krita 和 ##krita-chat 频道。#krita 是项目相关讨论频道，##krita-chat 则是闲聊频道。

不要询问是否能问问题：有问题直接提出就是了。

如果看到有好几个不同的讨论在同时进行，别慌。在繁忙的频道里这是家常便饭。

输入某人的昵称外加一个冒号即可与其进行交谈。

我们会在几乎每个周一的 CET 或 CEST 时间14:00 举行一场会议，讨论上一周发生的事情，我们正在做的事情，还有本项目的一切相关事务。会议记录以 Google Docs 的形式保存。

Krita 的各个频道在 CET 或 CEST 时间的早上和晚间最为活跃，而在美国时间的早上和晚间最为安静。

IRC 不会保存记录。频道窗口一旦关闭，你将离开对话，在下次登录之前你将无法读取频道内发生的一切。如果你在 IRC 中进行提问提问，你必须保持登录状态才能得到回答。

如果你不停地连接和断开，对于其他用户来说是一种滋扰，也会打断别人的对话。

邮件列表

邮件列表用于发表公告，也会被零星地用于讨论。所有想要为 Krita 进行工作的人都应该订阅邮件列表。

邮件列表存档 [https://mail.kde.org/mailman/listinfo/kimageshop]

该邮件列表叫做 “kimageshop”，因为那是 Krita 项目最初使用的名称。后来因为法律问题项目的名称发生了两次更改，先是改为 Krayon，然后改为 Krita。

Phabricator

Phabricator 为 Krita 团队提供以下功能：

跟踪我们正在进行的工作：https://phabricator.kde.org/maniphest/ 这包括了开发任务、设计新功能、UX 设计和与网站有关的任务。

检阅提交的代码：https://phabricator.kde.org/differential/

承载 Git 软件库：https://phabricator.kde.org/source/krita/ 请留意我们的 Git 软件库在 Github 上设有镜像，但我们并不使用 Github 来进行 Krita 的开发工作。

不要 把程序问题当成任务在 Phabricator 上面发布。Phabricator 是我们组织协调工作的场所。

不要 把你的全部代码 (补丁) 发布到 Phabricator 上。不要 把补丁附在程序问题跟踪器的问题中。

Bugzilla：程序问题跟踪器

Krita 与 KDE 社区的其他项目共用一个程序问题跟踪器。Krita 的程序问题被放在在 Krita 产品项目里。程序问题跟踪器有两类报告：问题 (bugs) 和愿望 (wishes)。程序问题的处理请参阅“程序问题报告”和“程序问题分拣”章节。愿望则是新功能请求。除非有开发人员让你这样做，否则不要在 Bugzilla 里面报告新功能请求。关于如何创建一个好的新功能请求，参见“新功能请求”章节。

开发冲刺活动

有些时候 Krita 的核心开发人员会集合起来进行开发冲刺活动，对代码设计、UX 设计、网站等需要真人面对面交流的事物进行集中处理。这样的活动通常在荷兰的代芬特尔进行。参加开发冲刺活动的旅费通常由 KDE e.V. 资助，而住宿则由 Krita 基金会资助。

Krita 使用手册的标记语言使用惯例

本文详细介绍了在 Krita 使用手册中使用 reStructuredText 的样式惯例。

我们建议查阅 reStructuredText 的 官方规范 [http://docutils.sourceforge.net/rst.html] 该项目在 sourceforge 上面运作因此服务器并不稳定，可将其保存一份到本地以便日后查阅 ):

用户手册：

入门知识 [http://docutils.sourceforge.net/docs/user/rst/quickstart.html]

快速参考 [http://docutils.sourceforge.net/docs/user/rst/quickref.html]

文本功能备忘录 [http://docutils.sourceforge.net/docs/user/rst/cheatsheet.txt]

参考文档：

简介 [http://docutils.sourceforge.net/docs/ref/rst/introduction.html]

标记规范 [http://docutils.sourceforge.net/docs/ref/rst/restructuredtext.html]

指令规范 [http://docutils.sourceforge.net/docs/ref/rst/directives.html]

角色规范 [http://docutils.sourceforge.net/docs/ref/rst/roles.html]

Sphinx 特有指令文档：

Sphinx’ 关于 restructured 文本的文档 [http://www.sphinx-doc.org/en/master/usage/restructuredtext/index.html] – 这些文章有助于理解用于生成如目录等用途的 Sphinx 特有指令和角色。

由于官方版本的 reStructuredText 和 Sphinx 的文档所载的用法存在差异。本文档将介绍我们建议遵循的惯例。

目录

Krita 使用手册的标记语言使用惯例

元数据

标题

链接

脚注和延伸阅读

图像

文中标记

置换参考

列表

有序列表

无序列表

定义列表

表格

警示与旁注

代码片段

其他预格式化文本

词汇表、术语和索引

引号

元数据

每个页面都应该以下列几个要素开始：

元描述

这是对于该页面的概述，它的内容会被转换为一组 html meta 标记以便搜索引擎读取:

.. meta::
    :description:
        Description.

作者列表和许可证。

用于记录哪些人编辑过该页面并对他们的贡献予以声明。此处应作为注解撰写以免被机器轻易理解。整个手册均使用 GDL 1.3 许可证，并且应该在此声明:

.. metadata-placeholder

   :authors: - Author 1
             - Author 2
   :license: GNU free documentation license 1.3 or later.

索引关键词。

关键词以半角逗号进行区分并在 索引 处列出。手册自动生成的索引对于制作 PDF 和不了解所需内容关键词的人们来说非常有用。关键词的定义方式如下:

.. index:: Keyword, Keyword with Spaces, ! Main Definition Keyword

标签。

通过标签我们可以方便地通过 :ref:`label_name` 连接到所需页面。请尽量构思简明易懂的变量名:

.. _label_name:

在标签后面你应当添加标题，因为 :ref:`label_name` 将使用标题文本作为链接的文字。

标题

各个级别的标题通过以下顺序生成:

############
Part/Section
############

For pages that have a lot of subpages.

=========
Heading 1
=========

Start most manual pages with this.

Heading 2
---------

Heading 3
~~~~~~~~~

Heading 4
^^^^^^^^^

Heading 5
'''''''''

Heading 6
"""""""""

这些使用惯例大致遵循了 pandoc 所用的由 Mediakiwi 到 reStructuredText 转换方式。如果你想要用超过四级的标题，你最好先想清楚页面会不会变得太杂乱，是不是考虑拆分这个页面。

如需创建一个链接到某个页面的小节，则在标题上方添加一个标签。

标题不应该以标点结尾，因为标题文本会在生成链接标签时被用作链接文字。

链接

链接通过 :ref:`label_name` 生成。如需把链接显示成其他文字，则使用 :ref:`实际显示的文字<label_name>`。

外部链接通过 `url`_ 和 `链接名称 <url>`_ 生成，它们会被如下显示：链接名称 。

Pandoc 喜欢把这些上述要素改成 `链接名称`__ 然后将 `` .. __ :url `` 添加到文档末尾。这便是所谓的 ‘匿名超链接’，它们在文档末尾的先后顺序取决于链接本身在文中出现的先后顺序，文末链接的排序也因此相互关联。如果你觉得这很难理解，你并没有错。这也是为什么我们希望避免使用类似的链接。

脚注和延伸阅读

脚注可以通过三种方式生成，最常用的便是为每处引用进行自动编号：

1 是对脚注 1 的引用，而 2 则是对脚注 2 的引用。

1

这是脚注 1。

2

这是脚注 2。

3

这是脚注 3。

[#] _ 是对脚注 3 的引用。

这是一处引文：[CIT2002] 。

CIT2002

这是引文本身。它和脚注类似，但标签是文本串。

引文还可以通过如下方式：引文链接名称 进行引用

我们在手册中并未使用脚注功能，因为对于我们的读者而言它太学术化了。不过我们依然会整理一些相关的文档和链接在文末列出，用于进一步介绍某些事物。Sphinx 用 .. seealso:: 指令来生成外部链接，而 reStructuredText 为了能够收集兼容 LaTex 的脚注而建议使用 .. rubic:: Footnotes。

图像

使用 image 指令来生成不带说明文字的图像:

.. image:: /images/en/sample.png
   :width: 800
   :align: center
   :alt: an image.

使用 figure 指令来生成带有说明文字的图像:

.. figure:: /images/en/sample.png
   :figwidth: 800
   :align: center
   :alt: an image.

   A caption --  notice how the first letter is aligned with the :figwidth: option.

后一个指令生成的效果如下：

说明文字——请留意指令中说明文字中的第一个字符是按照 :figwidth: 项对齐的。

图像应被上传到 /images/en 文件夹。使用 /images 而不是 images，这样 Sphinx 就不会按照相对路径进行解释。

文中标记

在一段文字前后各插入一个半角星号可以生成 斜体 ，在一段文字的前后插入两个半角星号则可以生成 粗体

*emphasize*
**strong**

在一段文本的前后插入三个半角星号是行不通的，在斜体和粗体之间只能二选一。

用 :sub:`text` 可以生成 下标文字 ，而用 :sup:`text` 则可以生成 上标文字

切勿滥用文中标记。尽量使用 Sphinx 已有的语义标记，因为它们可以帮助翻译人员理解文本的性质:

:menuselection:`Settings --> Configure Krita`
:guilabel:`File`
:kbd:`Ctrl + Z`
:program:`Krita`

不要胡乱加粗文字。那样会把文字变得难以阅读。

置换参考

你可以用以下方式为文字或图像创建速记标签:

.. |shorthand| replace:: something or the other.

如果你在文字中插入 |速记标签|，它会被显示成 ‘该速记标签所代表的内容’。这对于反复插入格式繁琐的图像和文字很有用，例如使用了 LaTeX 的情况。

Krita 文档定义了 |mouseleft|、|mousemiddle|、|mousescroll| 和 |mouseright|，它们会被置换为 mouseleft、mousemiddle、mousescroll 和 mouseright 。它们通过 Sphinx的 conf.py 文件进行定义，然后被附加在每个 rst 文件里面。

对于链接，如果需要反复使用同一个链接，你可以在文件的末尾编写类似下面的代码:

.. _bugzilla: https://bugs.kde.org/
.. _Krita Manual: https://docs.krita.org/

这样日后在需要插入链接的时候，你只需使用 `bugzilla`_ 即可生成一个文字为“bugzilla”，跳传到 bugzilla 的链接。`Krita Manual`_ 则会生成一个叫做 “Krita 手册” 的超链接并跳传到 docs.krita.org 。

列表

有序列表

苹果

梨子

香蕉

或…

桌子

椅子

衣柜

奥古斯都

尼禄

卡利古拉

图拉真

它们的用法是:

1. Apple
2. Pear
3. Banana

#. Apple
#. Pear
#. Banana

A. Table
B. Chair
C. Wardrobe

A. Table
#. Chair
#. Wardrobe

I. Augustus
#. Nero
#. Caligula
#. Trajan

无序列表

红

黄色

绿色

海藻绿

铜绿

鸭绿

铬绿

祖母绿

深祖母绿

浅祖母绿

极浅祖母绿

蓝色

用法如下:

- red
- yellow
- green
    - seagreen
    - verdigris
    - teal
    - veridian
    - emerald
        - dark emerald
        - light emerald
            - very light emerald.
- blue

定义列表

它们在罗列某个工具面板的各个选项并逐个进行说明时特别好用。我们特别喜欢使用定义列表。

定义名称

说明文字。

另一个定义名称

说明文字。

如何生成定义列表。

方法如下:

Definition
     explanation.
Another option
    Explanation.

表格

用途 | 表格类型
列举快捷键 | 简单型
单元格跨行跨列 | 网格型
结构简单但超长 | 列表型

用法如下:

================== ============
Purpose            Table type
================== ============
listing shortcuts  Simple table
lots of colspans   Grid table
Simple but long    List Table
================== ============

+-----------------+------------+
|Purpose          |Table Type  |
+=================+============+
|listing shortcuts|Simple table|
+-----------------+------------+
|lots of colspans |Grid table  |
+-----------------+------------+
|Simple but long  |List table  |
+-----------------+------------+

.. list-table::
   :header-rows: 1

   - * Purpose
     * Table Type
   - * listing shortcuts
     * simple table
   - * lots of colspans
     * grid table
   - * simple but long
     * list table

完整的网格型表格虽然可以应付复杂的跨行跨列，但却不好制作，所以小型表格最好用简易句法制作。而过长的单列表格可以使用列表指令来生成，这样编写和修改都省时省力。

警示与旁注

注解

警告是一种需要吸引读者注意的独立段落。

可以使用的各种警告如下 (按照严重程度排列)：

提示

提示用来给出比正文内容之外的少量信息。例如，提示：这些软件包在 OpenSUSE 和 Debian 中的名称不同。

小技巧

关于如何使用的额外信息，例如：“你可以为你习惯的文档设定制作一个模板”，或者“按下 M 可以水平翻转画布视图以便发现画面的问题”。

重要

一些需要留意的重点，但并不一定是负面的信息。

警告

一般在描述负面信息时使用。

注意

一般性的需要吸引读者注意的信息。当信息主题比警告类更为重要，但又不至于造成数据损失时使用。

警告

此类信息用于可能会造成数据损失的情况，例如忘记保存文件，或者让读者当心 Python 插件进行的操作目前无法撤销等。

危险

此类信息用于描述那些危及计算机整体的情况，包括那些导致内存不足死机的操作等。

错误

此类信息与手册内容无关。Sphinx 在某些情况下可以手动生成这些警告，但我们的配置文件默认没有开启这一功能。

可以包含任意文字的一般信息。

它的用法如下:

.. admonition:: generic admonition that can have any text.

    Text

Sphinx 还把参见添加为此类信息的一种:

.. seealso::

    Which is useful to collect external links and references.

水平线

水平线通常用于正文主题发生较为直接的切换的场合。它在叙述性的写作中较为常见，如纪实或小说等。Krita 的使用手册主要使用指示性和参考性的写作风格，这意味着我们较少为了介绍各项功能而长篇大论，但为了厘清某些流程背后的思路，我们有时还是会进行详细讲述。主题的切换通常以另起新章节的形式进行。因此我们建议尽可能使用 .. Topic:: 指令，它的标题也会让文章更易于阅读。

如需插入一条水平线，输入 ---- 即可。

标题指令。

标题指令会插入看上去和“主题”一样的标题，主题指令可以包括多个段落，而标题指令只管生成标题本身，用法如下:

.. rubric:: The rubric directive.

那么应该如何选用这些不同的文字类型呢？

只有当你认为主题的重要程度配不上一个正式标题时才使用它们。

主题

当文字与正文本身的自然发展主题不同，无法协调时使用。

标题

当文字和正文之间的差异不算太大，又不需要一个标题时。

警告

只在语义匹配时使用。尤其是危险和警告类信息要是出现得太频繁，读者就会对它感到麻木。

代码片段

行内代码片段 可用 ``半角反引号`` 生成。

要生成多行代码片段，将前一个段落以 :: 结尾:

This is a paragraph, and we define a preformated snippet like so::

    Be sure to add a white space and a tab afterwards before starting the snippet.

你也可以使用 .. code:: 指令。如果你在指令后添加计算机语言名称，则它会按此进行语法高亮:

.. code:: python

    def my_function():
        # comment
        alist = []
        alist.append(1)
        string = "hello world"

显示为

def my_function():
    # comment
    alist = []
    alist.append(1)
    string = "hello world"

其他例子

int myFunction(int i) {
    i += 1;

    // Check if more than 12
    if (i>12) {
        i = 0;
    }
    return i;
}

body {
    margin: 0 auto;
    /* is 800 still sensible? */
    max-width:800px;
    font-size:16px;
    color:#333;
    background-color: #eee;
    padding:1em;
    font-family:serif;
    line-height: 1.4;
}

<p>this <span style="font-style:italic">is</span> <!-- a comment --> a paragraph.</p>

其他预格式化文本

你可以

预格式化

文本

只需在

每行之前

加一个竖线

代号

做法如下:

| One can
| preformat
| text by
| prepending
| each line
| with a pipe
| symbol

我们并没有在本手册中使用该功能。

词汇表、术语和索引

这些都是 Sphinx 提供的特性。

索引被显示在页面顶部，目前仅使用单一索引项。

词汇表被用在某些菜单项章节，但并非每页都有。

引号

引用通过下述方式生成:

I am not sure why you'd need quotes in a user manual...

-- Wolthera

这会变成块引用。

我搞不懂为什么在用户手册里要引用…

—Wolthera

但我们还真的在某些地方进行了引用。最好在人名处添加一个链接以定义出处。

Krita 手册写作指引

欢迎使用我们的全新文档！

我们将文档的网址从 userbase.kde.org 移到了 docs.krita.org。我们还将文档系统从 MediaWiki 换成了 Sphinx，这是因为比起 Mediawiki，Sphinx 在处理翻译时更加得心应手。

该使用手册将包括：

Krita 功能参考手册

这一部分大概是人们在输入 docs.krita.org 这条网址时所预想的内容。它包含了如“某个按钮有什么用”这种枯燥的基本信息。

一般概念教程。

然而我们在两年来的经验中发现，功能参考手册这种文档形式，即便配有范例，对于某些用户而言还是不够友好。我们还应该在手册中对各种相关知识进行简要介绍，并提出一个用于制作互联网图像的基本工作流程。

我们也留意到 Krita 中的某些概念，如色彩管理和图层操作等，其复杂程度远远超出了一般画手的日常理解范畴。Krita 是自由免费的，所以我们的许多用户也从未接受过正式的数字绘画培训。在这之前互联网上并没有向 Krita 画手传授如何使用色彩管理或滤镜图层的教程。

Krita 还具备一些自己特有的系统，例如它的笔刷系统、变形蒙版、透明度继承方式和透视辅助尺等和其他软件有所区别。考虑到某些用户对最基本的数字绘画流程都不熟悉，思路也不够灵活，他们很难把针对 SAI 或者 Photoshop 编写的教程套用到 Krita 下面。

教程和视频教程列表

Krita 团队的一个特别之处是我们拥抱画手，对他们的创作进行鼓励，对于教程的制作我们也持同样态度。人们使用 Krita 的习惯和对于绘画的理解千差万别，我们应当鼓励人们分享他们的经验。

参与者手册

Krita 是一个自由开源软件，这意味着我们也是一个由社区推动的项目，众多志愿者们在为 Krita 的发展贡献力量。因此我们要面向新加入的志愿者们编写如何参与项目工作的指引手册。我们以前准备的相关材料过于零散，也疏于维护。本参与者手册将致力于充实相关信息，同时也会承载较多技术化的内容。

krita.org 教程

在 krita.org 和 krita-foundation.tumblr.com 上有许多教程。前者主要介绍如何使用某项新功能，后者主要围绕用户关心的问题进行解答。

常见问题解答

我们已经把以前编写的几个常见问题解答文章合并到了此页面，翻译工作也正在进行。我们打算将其作为主要的常见问题解答页面，并一直保持更新。

新手指引

与 Mediawiki 不同，为 Sphinx 编写文档的工作流程更像是我们为 Krita 编写代码的流程。

首先你要与我们建立联系。你可以访问 在 krita.org 上的 IRC 频道 (#krita 频道，位于 freenode.org) [https://krita.org/en/irc/] ，还有更重要的是在 identity.kde.org [https://identity.kde.org/] 上面创建一个账户。在 KDE 身份网站上创建的账户可以用来访问论坛和我们主持 Krita 开发工作所在的 phabricator [https://phabricator.kde.org] 网站。

如果不知道应该如何开始，就先创建一个 KDE 身份账户，然后在论坛 <https://forum.kde.org/viewforum.php?f=136>`_ 上发帖求教。

Sphinx 文档是使用 reStructuredText 标记语言的简单文本编写的。Sphinx 系统会把那些文本文件转换成可用的使用手册。我们通过一个叫做 Git 的版本控制系统来跟踪使用手册的内容变化。

更改内容

由于我们使用 Git，只有少数人有权限向版本控制系统中推送内容。如果你想要对手册内容作出更改，你需要将改动送交审查。

如果你不熟悉 Git

从 repository [https://phabricator.kde.org/source/websites-docs-krita-org/] 中获取源文本。

将该文本的母本另存为一个副本。

对其进行修改。

用于检查所作更改是否有效的工具。

你可以使用 Sphinx 在线编辑器 [https://livesphinx.herokuapp.com/] 来检查你的改动是否造成问题

打包成 ZIP 文件。

把你改动过的所有文件打包成一个 ZIP 文件，如果你更改了图像，也把它们包含进去。尽可能保持文件名不变，这有利于我们复制粘贴。

把该 ZIP 文件上传至 Phabricator 网站

首先，访问 phabricator.kde.org 并使用你的 KDE 身份账户进行登录。

访问 Manual Project Workboard [https://phabricator.kde.org/project/view/135/] 页面，在该页面选择 Create a new task。

说明你改动的内容，然后把该 ZIP 文件拖放到输入框中以上传。你还要输入与你的 KDE 身份账户关联的电邮地址。

接下来，如果你的改动被接受了，具备推送权限的人员会帮你把那些文件解压到使用手册的文件夹并以你刚才输入的邮件地址推送代码变更。

如果你熟悉 Git

使用 Git clone 从 repository [https://phabricator.kde.org/source/websites-docs-krita-org/] 获取源代码

进行更改

在本地进行编译 (可选)

生成一个 git diff 文件

用命令行终端进入源代码目录，输入 git diff > ../mydiff.diff ，这将在上面的目录里生成一个 diff 文件。

在 Phabricator 上面创建审查请求

用 KDE 身份账户登录 phabricator [https://phabricator.kde.org] 网站。

转到 differential 页面

右上角 –> “星星” 菜单 –> Create Review Request。

上传你制作的 diff 文件，选择正确的 repository (websites-docs-krita-org ，用 Krita.org Documentation Website 可以比较容易地找到， 切勿选中 docs-kde-org！)。

检查文件是否正确。

然后在下一画面：

填写 Title 和 Short Summary 项。

在 summary 项中告诉我们你更改的内容。

(可选) 如果你要留名，请填写你的电邮地址。

Phabricator 的系统会自动将该审查请求指派给 Krita Manual 小组。

指导思想

无论是从务实还是从审美的角度，写作行为的背后往往会有一个目的或指导思想。写作的指导思想决定了写作的风格。我们想要通过使用手册达成什么目的，它的目标受众又是怎样的呢？

用户群体与目标受众

我们在讨论 Krita 的用户群体时不能假设每个用户都是 55 岁的老头子。Krita 的用户基数庞大，来自五湖四海、各行各业，我们为拥有如此多样化的用户群体而感到骄傲。

尽管如此，我们还是能总结出一些共同点：

他们都是画手，我们服务的目标群体。

他们喜欢精美的画作。

他们以视觉方式思考。

他们想要创作出精美的画作。

所以，使用手册的每个页面的目标都是教会他们使用所介绍的特性去创作出精美的画作。

在这之上我们也留意到下列细分群体：

高中生和高校生。他们热衷于尝试各种不同的软件来进行绘画，往往对绘画软件已有一定经验，如 Painttool SAI 或 Photoshop 等，但对 Krita 的用法并不熟悉。该群体的优势在于他们会相互分享信息，如技巧和教程等。

从业人员，使用数字绘画软件来谋生的人员。该群体的优势是对软件用法理解深入，有丰富的行业经验，也乐意为改进程序而捐款。他们有两类人：

非技术从业人员。这些人不一定能理解软件里面比较数学化的部分，不过他们在长年与软件打交道的过程里磨练出了敏锐的直觉，建立了可靠的工作流程。他们大多是画手和负责印刷的人员。

技术从业人员。他们把 Krita 用在软件流水线的一个环节，所以更加关注精确运算和像素流动。他们大多供职于游戏和电影特效业界，但科研人员也会时不时地现身其中。

成年和老年绘画爱好者。他们对计算机并不熟悉，特别容易被教程忽略的某个步骤给卡住。相比起人生经验欠缺的学生和无暇探索未知的从业人员，他们的优势是可以从生活实际出发建立一套非主流的工作流程。在社区整体中他们还发挥着平衡年轻学生群体的功能。

在这四个群体中…

只有一个懂技术的群体。所以我们要准备一般概念页面，为手册的编写工作提供一个坚实的基础。

有三个群体在过去可能已经使用过别的绘画软件，他们需要指引来迁移至 Krita，向他们介绍功能如何使用。

有两个群体需要学习如何使用 Krita 与其他软件进行协作。

有两个群体严重缺乏相关经验和知识，可能需要在最基本的环节为他们提供指引。

从上面的分析我们可以得出以下准则：

写作通则

尽可能使用美式英语。

因为 Krita 的界面默认使用美式英语，所以我们在使用说明中也使用美式英语。

文明用语，但不要使用学术语言。

作为一个社区，我们希望能对用户展现出友好的姿态，所以要避免使用那些不友好的行文方式。KDE 社区反对粗俗的言行。而另外的一个极端则是学术化的文风，如果作者忽视了这一点而读者又没有意识到这只是一种写作风格，那么文字就会显得过于繁复，容易吓倒我们的用户。

避免使用 GIF 图像 (欢迎就此讨论)

这是因为癫痫患者易受快速移动的图像影响而发病。GIF 动画的概念也不好解释。如果非得使用 GIF，应在页面的导入部分对读者进行相关提示。

保持文章的翻译友好性

这包括在信息图中使用 SVG 图像，为文字选用适合的标记等。

关于照片和传统画作

I would like to discourage photos and traditional paintings in the manual if they are not illustrating a concept. The reason is that it is very silly and a little dishonest to show Rembrandt’s work inside the Krita GUI, when we have so many modern works that were made in Krita. All of the pepper&carrot artwork was made in Krita and the original files are available, so when you do not have an image handy, start there. Photos should be avoided because Krita is a painting program. Too many photos can give the impression Krita is trying to be a solution for photo retouching, which really isn’t the focus.

当然，我们也需要通过照片和绘画名作来介绍某些概念，例如光泽和间接光等。使用名作和照片时应为图像配上说明文字。如果是画作，应介绍作品名称和作者。如果是照片，则应注明它是一张照片。

照片可以用于后期拼接，但只应在后期拼接的有关文章中使用。

图像通则

使用说明文字，避免在图像中嵌入文本。你可以用 figure 标记指令生成带说明文字的图像。

如果必须使用文字，应将图像制作成 SVG 以便于日后修改，或将字数控制在最小限度。

尽力制作精美的图像，尽可能让人们知晓这是一款绘画用的软件。

请牢记本手册是用 GDPL 1.3 许可证发布的，它包含的图像也将以相同许可证发布。如果图像是 CC-By-Sa/CC-By 许可证授权的，记得用 figure 标记指令给它们的作者进行署名。切勿使用那些无法通过上述许可证发布的图像。

规程

现在我们介绍一下整个无聊的工作流程吧。

标记和分支

内容的增删作业将在 draft 分支进行。

对已有页面审校被视作问题修复，因此将被推送至 master 分支，然后在按需合并至 draft 分支。

在 draft 分支为新版本发布进行合并之前：

现有的 master 分支将会被标记为旧版本。

首先检查该 draft 分支是否更新了版本号和 epub 封面。

该 draft 分支在新版发布的前一天才会被合并，以保持页面的一致性。

作为每次新版发布流程的一部分，新版的 epub 文件也要进行上传。

移除页面

如果某项特性在新版软件中被移除，相关页面会被如下处理。

首先相关页面将被标记为已废弃。

做法如下:

.. deprecated:: version number

    Text to indicate what the user should do without this feature.

该页面将在一个叫做“已废弃”的页面显示链接

如果软件的下一个新版本维持废弃决定，已废弃部分所链接的页面将会被移除。

新增页面

确保页面所在的位置正确。

按照 Krita 使用手册的标记语言使用惯例 的要求编写页面，保证格式正确。

将页面添加到 TOC。

如果这是一项新特性，把首次出现的版本号添加至 versionadded:

.. versionadded:: version number

    optional something or the other.

与使用图像的注意事项一样，切勿将未经授权的文字写入页面。这意味着你添加的文字要么是你原创的，要么是文字的原作者授权你转载的。本使用手册使用 GDPL 1.3+ 许可证发布，所有文字也将用该许可证重新发布。

更改页面

如果你完全重写了某个页面，而不是单纯地进行审校，则重写的成果应被提交审查。

如果你根据软件特性的变化改写页面，而你也拥有提交权限，则该改动的推送可以无需审查 (除非你认为需要审查)。不过你要在页面上加入:

.. versionchanged:: version number

    This and that changed.

无论是哪种情况，请选择是否要把你自己添加到顶部元数据区域的作者字段中。

把 deprecated、versionadded 和 versionchanged 标记指令配合版本号使用，这样我们便可以使用 grep 命令来对受标记的页面进行查找：

grep -d recurse versionadded * --exclude-dir={_build,locale}

报告页面问题

如果某个页面的内容有问题，可以…

按照 更改内容 一节的指引提交审查请求。

在 Phabricator 的 Manual Project Workboard [https://phabricator.kde.org/project/view/135/] 上面创建一个任务。

在 bugzilla [https://bugs.kde.org/] 的 Krita 项目的“文档”组件处提交问题报告。

审校

审校工作有两类。

第一类也是最重要的一类是 对其他人的改动进行审校 ，你可以在 Phabricator 上面通过两种方式进行此项工作：

通过差异比对审查补丁。

补丁的审查是通过差异比对来进行的。一般来说补丁审查是为了让程序员之间可以相互检查代码，而因为程序代码和文章同样基于文本，所以我们可以用相同的办法来检查拼写问题。

一个补丁，或者说是 diff 文件，以机器可以读取的格式记录了在一个文档中发生的全部改动 (增删)。当有人提交了一个审查请求时 (在 gitlab 和 github 这样的系统下面叫做合并或拉取请求)，负责维护原始文档的人员会对改动进行过目并就需要修改的地方进行评论，如拼写的错漏、冗繁的文风和错误的内容等。补丁在被接受之后即可被推送到版本控制系统里。

对使用手册的改动进行审核。

审核在改动发生之后进行。你可以 commit 信息处对已发生的改动进行审核 (在 repository 页面，选择 history 然后点击 entry) 。

不管是哪种情况，页面都会按照左边旧版，右边新版的方式显示改动。新增的行用绿色标记，移除的行用红色标记。你可以点击某行然后添加“行内”评论。一般来说，你在审查时要检查所有的改动并在需要的地方进行评论。要提交行内评论，点击下面的按钮然后撰写一则整体评论。行内评论将与整体评论同时被提交。

第二类审校工作是 针对整个文件 进行的。很多页面仅接受过正确性检查，而写作风格和语法则被忽略了。

要进行整体审校，请参考 更改内容 一节，获取页面的完整访问权限以便进行编辑。

翻译

使用手册的翻译工作由 KDE 本地化社区 [https://l10n.kde.org/] 负责进行。要加入翻译团队，可访问该网站，在 翻译小组列表 [https://l10n.kde.org/teams-list.php] 处选择你要翻译的语言，然后按照该小组页面上的指引来与其他翻译人员建立联系。

本地化小组成员有权限访问本手册的 PO 文件，这是一种专门用于翻译的文件格式，可用 POEdit 和 Lokalize 打开。翻译小组对这些文件进行翻译后上传至 KDE 翻译的 SVN 系统。一个特殊的脚本每天都会从该 SVN 把新的译文取回并整合进使用手册项目里。

翻译的成果还需要被添加到编译脚本里才能在网上显示。对成果感到自信的翻译小组请通过 kimageshop 邮件列表 (kimageshop@kde.org) 或电邮地址 foundation@krita.org 联系 Krita 核心团队协助处理。

其他

关于 restructured 文本的使用惯例，可查阅 Krita 使用手册的标记语言使用惯例 。

如何为使用手册准备图像

此页面对 为互联网保存图像 页面的补充。主要讨论如何为本使用手册制作图像和优化它们的大小。

目录

如何为使用手册准备图像

截图工具

Windows

Linux

OS X

按用途选择合适的文件格式。

优化图像品质和尺寸。

Windows

Linux

优化 PNG 文件

优化 GIF 文件

优化 JPEG 文件

MacOS/ OS X

编辑文件的元数据

Windows 和 OS X

Linux

查看元数据

清空元数据

提取元数据

嵌入描述元数据

嵌入许可证元数据

使用属性

使用 XMP

截图工具

如果你打算为屏幕显示的各种面板和工具进行截图，光靠 为互联网保存图像 的指引显然不够，毕竟这只能保存画布上面的图像。

因此我们要先对屏幕进行截图。根据操作系统不同，我们有几种不同的截图工具可用。

Windows

Windows 自带了截图工具，在默认状况下按 PrtSc 键即可调用。在笔记本上面可能要配合 Fn 键使用。

Linux

Gnome、KDE 和大多数流行的桌面环境也都自带了截图工具，按 PrtSc 键即可调用。而如果系统无此功能：

ImageMagick

使用 imagemagick，输入下面的命令:

import -depth 8 -dither <filename.png>

虽然我们出于无障碍原则应该尽量避免在手册中使用 GIF 动画，但有时也不得不用它制作短视频。GIF 动画在配合新版发行日志展现软件特性时很好用。

要制作 GIF 短视频，可以使用下列程序：

Peek [https://github.com/phw/peek] – 它的界面友好，还提供了 appimage。和许多录屏软件一样，它在 Wayland 下面有点水土不服。

OS X

OS X 的截图快捷键为 Shift + Command + 3 ，详情请参阅 苹果官方文档 [https://support.apple.com/en-us/HT201361] 。

按用途选择合适的文件格式。

不同的文件格式适合不同类型的图像。我们既要提高画质，也要减小体积，因为这样有利于互联网浏览和下载使用手册。

软件界面截图

应当使用 PNG，如果可能则使用 GIF。

以非渐变色为主的图像。

应当使用 PNG。

灰阶图像

应当使用 GIF 或 PNG。

渐变色较多的图像

应当使用 JPG。

透明度较多的图像

应当使用 PNG。

上述惯例是由每种文件格式保存颜色的方式决定的。JPEG 使用一种 不同的压缩方式 ，它适合照片和渐变色较多的图像，但不适合对比强烈的场景。PNG 在处理具有锐利对比的图像时效果远好于前者。如果图像的颜色数目少于 256 种，则 GIF 会更加适合。

Grayscale images, even when they have a lot of gradients variation, should be PNG. The reason is that when we use full color images, we are, depending on the image, using 3 to 5 numbers to describe those values, with each of those values having a possibility to contain any of 256 values. JPEG and other ‘lossy’ file formats use clever psychological tricks to cut back on the amount of values an image needs to show its contents. However, when we make grayscale images, we only keep track of the lightness. The lightness is only one number, that can have 256 values, making it much easier to just use gif or PNG, instead of jpeg which could have nasty artifacts. (And, it is also a bit smaller)

要是拿不定主意，请使用 PNG。

优化图像品质和尺寸。

虽然绝大多数图像编辑软件都会尽量减小文件体积，我们还可以通过其他工具来把图片变得更小。

Windows

在 Windows 下面人们经常推荐使用 IrfranView [https://www.irfanview.com/] ，但本文档的作者搞不懂怎么用它。

另一个选项则是 PNGCrush，参见 Linux 一节。

Linux

优化 PNG 文件

Linux 下面有多种 PNG 优化工具 [https://css-ig.net/png-tools-overview] 可供选用。它们分为两类：有损 (按心理学原则削减数据) 和无损 (用一般方式进行压缩)。推荐使用：

PNGQuant [https://pngquant.org/]

此 PNG 压缩工具通过一些有损技术巧妙地降低了图像使用的颜色数目。

要使用 PNGquant，前往目标文件夹，然后输入:

pngquant --quality=80-100 image.png

用实际文件名替换上述命令的 image 字段。按下 Enter，压缩后的图像就会被生成在同一个文件夹里。PNGQuant 适用于大多数图像，但某些图像，如颜色选择器的截图就不合适了，所以记得复查它生成的图像是否正常，如果它不好用，可以尝试下面几个选项：

PNGCrush [https://pmt.sourceforge.io/pngcrush/]

这是一个无损的 PNG 压缩工具。用法:

pngcrush image.png imageout.png

该指令仅通过常见手段进行压缩，添加 -brute 参数后软件会使用一切可能手段进行压缩。

Optipng [http://optipng.sourceforge.net/]

这是一个无损的 PNG 压缩工具，一开始是 PNGCrush 的分支项目，可以在使用 PNGQuant 之后使用。用法:

optipng image.png

把 image 字段换成图像文件名。OptiPNG 会试用几种压缩算法，然后用优化后的图像**覆盖**原图。要避免覆盖，可使用 --out imageout.png 命令。

优化 GIF 文件

FFMPEG [http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html]

Gifski [https://gif.ski/]

LossyGif [https://kornel.ski/lossygif]

优化 JPEG 文件

JPEG 很难进行有效优化。这是因为它是一种 有损文件格式 ，意味着它通过心理学手段保存数据。

然而这些手段在图像具有很多强烈对比时很容易露馅，例如文字。JPEG 也不适合被反复保存。因此要确保图像已被另存为无损格式用于编辑，而只在输出最终结果时才用 JPEG 进行进一步压缩。

MacOS/ OS X

ImageOptim [https://imageoptim.com/mac] – 一个为诸如 PNGquant 和 gifski 等设计的图形界面。

编辑文件的元数据

个人信息有时候会不小心被嵌入到图像文件中，而有时候我们会用嵌入信息来辅助文件的整理记录工作。

处理元数据的工具有好几种，不同文件格式的元数据结构也不尽相同。

用于编辑元数据的最常用工具是 ExifTool ，除此之外还可以使用 ImageMagick 。

Windows 和 OS X

要下载exiftool，可访问其网站 <https://www.sno.phy.queensu.ca/~phil/exiftool/>`_ 。

Linux

在 Linux 下面你还可以直接安装 exiftool。

Debian/Ubuntu

sudo apt-get install libimage-exiftool-perl

查看元数据

切换到图像文件所在的目录，然后输入:

exiftool image

把 image 字段换成你需要的文件名。如果只输入 exiftool，它会把当前目录下面的文件的元数据全部输出。仔细查看某些图像的元数据，你会不时发现它们包含了作者和位置元数据。这对于隐私来说会造成一些问题，因此我们有时需要清空全部元数据。

你还可以使用 ImageMagick 的 identify 参数 [https://www.imagemagick.org/script/identify.php]:

identify -verbose image

清空元数据

以 image.png 为例，元数据的清空方式如下：

ExifTool [http://www.linux-magazine.com/Online/Blogs/Productivity-Sauce/Remove-EXIF-Metadata-from-Photos-with-exiftool]

exiftool -all= image.png

这将清空 exiftool 所能处理的一切标签。你还可以指定移除一个单独标签：exiftool -author= image.png

OptiPNG

optipng -strip image.png 指令会清空该 PNG 文件的元数据并对其进行压缩。

ImageMagick [https://www.imagemagick.org/script/command-line-options.php#strip]

convert image.png –strip

提取元数据

我们有时需要把某些元数据提取出来，例如 ICC 配置文件，然后才清空全部元数据。图像可被直接转换为配置文件：

ImageMagick’s Convert [https://imagemagick.org/script/command-line-options.php#profile]

首先把图像的 ICC 元数据进行转换并提取为一个配置文件:

convert image.png image_profile.icc

然后把源文件的元数据清空，再把 ICC 配置文件信息重新添加回去:

convert -profile image_profile.icc image.png

嵌入描述元数据

描述元数据对于屏幕阅读器的用户来说非常有用，许多网页浏览器会在没有 alt 字串的情况下通过图像的描述元数据生成它。你或许也需要嵌入色彩空间之类的信息。

ExifTool

ImageMagick

设定一组 exif 数值:

convert -set exif:ImageDescription "An image description" image.png image_modified.png

设置 PNG 区块描述:

convert -set Description "An image description" image.png image_modified.png

嵌入许可证元数据

嵌入许可证元数据的好处是可以永久标记某个文件的许可证。不过其他人在转载时很可能会通过 imagemagick 清空这些元数据。

使用属性

你可以使用 dcterms:license 参数把许可证信息插入到文档规定的位置。

ImageMagick

用于 GDPL:

convert -set dcterms:license "GDPL 1.3+ https://www.gnu.org/licenses/fdl-1.3.txt" image.png

这将定义一项属性名并填入许可证文本。

用于 Creative Commons BY-SA 4.0:

convert -set dcterms:license "CC-BY-SA-4.0 http://creativecommons.org/licenses/by-sa/4.0/" image.png

这种做法的问题是它并不符合许可证定义的规范，因此机器不能处理它们。

使用 XMP

Creative Commons 网站建议我们 使用 XMP 来定义许可证 [https://wiki.creativecommons.org/wiki/XMP] 。在 Creative Commons 网站上选取许可证时，可以要求它为你生成一个适合的 XMP 文件。

我们需要使用 `面向 exiftool 的 XMP 标签<https://www.sno.phy.queensu.ca/~phil/exiftool/TagNames/XMP.html>`_ 。

命令范例如下:

exiftool -Marked=true -License="http://creativecommons.org/licenses/by-sa/4.0" -UsageTerms="This work is licensed under a <a rel="license" href="http://creativecommons.org/licenses/by-sa/4.0/">Creative Commons Attribution-ShareAlike 4.0 International License</a>." -Copyright="CC-BY-SA-NC 4.0" image.png

或者也可以这样做

exiftool -Marked=true -License="http://creativecommons.org/licenses/by-sa/4.0" -attributionURL="docs.krita.org" attributionName="kritaManual" image.png

如果使用 imagemagick ，你可以使用 profile 参数。

首先提取元数据 (如有需要):

convert image.png image_meta.xmp

对生成的文件进行修改，然后把元数据嵌回到图像:

convert -profile image_meta.xmp image.png

每个 XMP 标签定义一个许可证。你可以在 Creative Commons 网站上为图像的元数据生成 XMP 文件。

Technical Pages

“In my 20+ year experience managing projects i learned that tools or systems don’t manage anything, people do. and if people need tools they’ll get them or make them”

—Ton Roosendaal, on #blendercoders

Some parts of the contributor’s manual are for people who wish to help with the more technical parts of contributing to an open source project.

Because technical computer terms are very hard to translate, people who wish to do technical contributions must know English. This is not just because these pages would be hard to translate, but also because the main developers who work on the program will have a hard time figuring out the names of technical terms in languages other than English. Therefore, these pages will not be translated.

Outside of these pages we also recommend taking a look at…

The KDE API Documentation Guidelines [https://community.kde.org/Guidelines_and_HOWTOs/API_Documentation]

KDE wide Guidelines and HOWTOs [https://community.kde.org/Guidelines_and_HOWTOs]

Contents:

Building krita with Docker

Building Krita from Source

CMake Settings for Developers

Introduction to Hacking Krita

Modern C++ usage guidelines for the Krita codebase

Developing Features

Optimizing tips and tools for Krita

Advanced Merge Request Guide

Reporting Bugs

Running Krita from Source

Triaging Bugs

Unittests in Krita

Building krita with Docker

The Dockerfile is based on the official KDE build environment that is used on KDE CI for building official AppImage packages. This guide is valid for Ubuntu and Ubuntu-based Linux distributions.

目录

Building krita with Docker

Prerequisites

Build the docker image and run the container

Enter the container and build Krita

Extra developer tools

Stopping the container and cleaning up

Troubleshooting

Krita binary is not found after the first build

OpenGL doesn’t work on NVidia GPU with proprietary drivers

Not enough space on root partition

Prerequisites

First make sure you have Docker installed

sudo apt install docker docker.io

Then you need to download deps and Krita source tree. These steps are not included into the Dockerfile to save internal bandwidth

# create directory structure for container control directory
git clone git://anongit.kde.org/scratch/dkazakov/krita-docker-env.git krita-auto-1

cd krita-auto-1
mkdir persistent

# copy/checkout Krita sources to 'persistent/krita'
cp -r /path/to/sources/krita ./persistent/krita

## or ...
# git clone kde:krita persistent/krita

# download the deps archive
./bin/bootstrap-deps.sh

Build the docker image and run the container

./bin/build_image krita-deps
./bin/run_container krita-deps krita-auto-1

Enter the container and build Krita

# enter the docker container (the name will be
# fetched automatically from '.container_name' file)

./bin/enter

… now you are inside the container with all the deps prepared …

# build Krita as usual
cd appimage-workspace/krita-build/
run_cmake.sh ~/persistent/krita
make -j8 install

# start Krita
krita

Extra developer tools

To install QtCreator, enter the container and start the installer, downloaded while fetching dependencies. Make sure you install it into ‘~/qtcreator’ directory without any version suffixes, then you will be able to use the script below:

# inside the container
./persistent/qt-creator-opensource-linux-x86_64-4.6.2.run

To start QtCreator:

# from the host
./bin/qtcreator

Stopping the container and cleaning up

When not in use you can stop the container. All your filesystem state is saved, but all the currently running processes are killed (just ensure you logout from all the terminals before stopping).

# stop the container
./bin/stop

# start the container
./bin/start

If you don’t need your container/image anymore, you can delete them from the docker

# remove the container
sudo docker rm krita-auto-1

# remove the image
sudo docker rmi krita-deps

Troubleshooting

Krita binary is not found after the first build

Either relogin to the container or just execute source ~/.devenv.inc

OpenGL doesn’t work on NVidia GPU with proprietary drivers

The docker run script automatically forwards the GPU devices into the container, but it doesn’t install the drivers for the GPU. You should install exactly the same version of the driver that is installed on your host system. Just run the following script when you are on host:

./bin/install_nvidia_drivers.sh

Not enough space on root partition

All the docker images and containers are stored in a special docker-daemon controlled folder under /var directory. You might not have enough space there for building Krita (it needs about 10 GiB). In such a case it is recommended to move the docker images folder into another location, where there is enough space.

echo 'DOCKER_OPTS="-g /home/devel5/docker"' >> /etc/default/docker

Building Krita from Source

If you want to help developing Krita, or if you want to run the latest version of Krita on macOS, you need to know how to build Krita yourself. If you merely want to run the latest version of Krita on Windows or Linux, to test a bug or play with, you can use the nightly build for Windows [https://binary-factory.kde.org/job/Krita_Nightly_Windows_Build/] or the nightly build for Linux [https://binary-factory.kde.org/job/Krita_Nightly_Appimage_Build/]

目录

Building Krita from Source

Building on Linux

Preparing your development environment

Getting the Source Code

Configuring the Build

Installing

Environment Variables

Updating

Trouble Shooting

Common problems

You can build Krita on Linux, Windows and OSX. The libraries Krita needs (for instance to load and save various image types) are called dependencies.

Linux is the easiest operating system to build Krita on because all the libraries that Krita needs are available on most recent Linux distributions. For an easy guide to building Krita see Building Krita on Linux for Cats [http://www.davidrevoy.com/article193/guide-building-krita-on-linux-for-cats]

On OSX you can use tools like homebrew to get the dependencies, or build the dependencies manually. Building the dependencies manually is recommended because we have a number of changes to the source for libraries to make them function better with Krita.

On Windows you will have to build the dependencies yourself.

The build instructions for OSX/macOS and Windows are maintained as part of Krita’s source code repository [https://phabricator.kde.org/source/krita/browse/master/3rdparty/README.md]. You will need to VERY carefully follow these instructions.

Building on Linux

This page only deals with building Krita on Linux. However, some remarks are the same for all operating systems, especially when it comes to running cmake and dealing with errors. You need to be familiar with using a terminal.

There are two options: you can either build Krita in your home directory, or use Docker [https://cgit.kde.org/scratch/dkazakov/krita-docker-env.git/tree/README.md], which makes setting up a development environment easier.

Preparing your development environment

The most convenient layout is as follows:

$HOME/kritadev/krita – the source code

$HOME/kritadev/build – the location where you compile krita

$HOME/kritadev/install – the location where you install krita to and run krita from

we will call the “kritadev” folder your build root.

Note: type in what’s shown after ‘>’ in the following commands

you@yourcomputer:~>mkdir kritadev
you@yourcomputer:~/>cd kritadev
you@yourcomputer:~/kritadev> mkdir build
you@yourcomputer:~/kritadev> mkdir install

Getting the Source Code

Open a terminal and enter the build root. Clone Krita from kde’s git infrastructure (not github):

you@yourcomputer:~/kritadev> git clone git://anongit.kde.org/krita.git

Configuring the Build

you@yourcomputer:~/kritadev> cd build

Krita uses cmake (https://cmake.org) to define how Krita is built on various platforms. You first need to run cmake to generate the build system, in the kritadevs/build directory, then run make to make Krita, then run make install to install krita.

you@yourcomputer:~/kritadev/build>cmake ../krita -DCMAKE_INSTALL_PREFIX=/path/to/kritadev/install  -DCMAKE_BUILD_TYPE=RelWithDebInfo

Unless you have installed all the dependencies Krita needs, on first running cmake, cmake will complain about missing dependencies. For instance:

-- The following RECOMMENDED packages have not been found:

* GSL, <http://www.gnu.org/software/gsl>
Required by Krita's Transform tool.

This is not an error, and you can fix this by installing the missing package using your distribution’s package manager. Do not download these packages manually from the source website and build them manually. Do use your distribution’s package manager to find the right packages.

For example, for Ubuntu, you can start with:

you@yourcomputer:~/kritadev/build>apt-get build-dep krita

Which will install all the dependencies of the version of Krita in the repositories.

However, the development version might use different dependencies, to find these, you can use apt-cache search:

you@yourcomputer:~/kritadev/build>apt-cache search quazip
libquazip-dev - C++ wrapper for ZIP/UNZIP (development files, Qt4 build)
libquazip-doc - C++ wrapper for ZIP/UNZIP (documentation)
libquazip-headers - C++ wrapper for ZIP/UNZIP (development header files)
libquazip1 - C++ wrapper for ZIP/UNZIP (Qt4 build)
libquazip5-1 - C++ wrapper for ZIP/UNZIP (Qt5 build)
libquazip5-dev - C++ wrapper for ZIP/UNZIP (development files, Qt5 build)
libquazip5-headers - C++ wrapper for ZIP/UNZIP (development header files, Qt5 build)

You will want to get the ‘dev’ library here, because you’re doing dev, and then Krita is using Qt5, so select that one. If this doesn’t help, check the Ubuntu packages search [https://packages.ubuntu.com/].

If all dependencies have been installed, cmake will output something like this:

-- Configuring done
-- Generating done
-- Build files have been written to: /home/boud/dev/b-krita

Until that is shown, cmake has not succeeded and you cannot build Krita. When this is shown, you can build Krita:

you@yourcomputer:~/kritadev/build> make

You can speed this up by enabling multithreading. To do so, you first figure out how many threads your processor can handle:

cat /proc/cpuinfo | grep processor | wc -l

Then, add the resulting number with -j (for ‘Jobs’) at the end, so for example:

you@yourcomputer:~/kritadev/build> make -j4

Installing

When the build has fully succeeded, you can install:

you@yourcomputer:~/kritadev/build> make install

And when that is complete, you can run Krita:

you@yourcomputer:~/kritadev/build>../install/bin/krita

Environment Variables

Now, to get Krita to work by just typing krita into the terminal, we’ll need to set up some environment variables. This will allow your system to know where Krita is located.

Let’s show to your system the right path, inside a terminal, copy line by line :

export KDEDIRS=$HOME/kritadev/install:$KDEDIRS
export PATH=$HOME/kritadev/install/bin:$PATH

You will now be able to run Krita by typing krita into the terminal.

Environment variables are never permanent. So we need to configure the system to set them each time you login. To set them at any login, write them with your favorite text editor at the end of your ~/.profile file (on certain distributions, the profile is named xprofile, check the hidden files in your home/your-user-name folder).

Updating

Now, Krita is in constant development, so you will want to update your build from time to time. Maybe a cool feature got in, or a bug was fixed, or you just want the latest source.

First, we get the new source from the git repository:

you@yourcomputer:~> cd ~/kritadev/krita/
you@yourcomputer:~/kritadev/krita> git pull

If you want to get the code from a specific branch, you will need to checkout that branch first:

you@yourcomputer:~/kritadev/krita> git checkout <name of the branch>
you@yourcomputer:~/kritadev/krita> git pull

Then, we build again:

you@yourcomputer:~/kritadev/krita> cd ~/kritadev/build/
you@yourcomputer:~/kritadev/build> make install

If you update daily, you might want to automate these command by making your own minimal bash script.

Trouble Shooting

The recent development version might break, or sometime be just unusable. Experimental changes are made daily.

This will affect your productivity if you don’t know how to ‘go back in time’ (for example, your favorite brush doesn’t work anymore).

But if you know how to do it, no issue can really affect you, because you know how to come back to a previous state.

To travel the source in time we need to read the timeline history. The terminal tool for it is git log.

you@yourcomputer:~> cd ~/kritadev/krita/
you@yourcomputer:~/kritadev/krita> git log

With git log, you can consult all the last changes to the code, the ‘commit’. What we’re interested in is the long identification number, the ‘git hash’ (such as cca5819b19e0da3434192c5b352285b987a48796). You can scroll the git log, copy the ID number then quit(letter Q on keyboard). Then time-travel in your source directory:

you@yourcomputer:~/kritadev/krita> git checkout cca5819b19e0da3434192c5b352285b987a48796
you@yourcomputer:~/kritadev/krita> git pull

And, we build again:

you@yourcomputer:~/kritadev/krita> cd ~/kritadev/build/
you@yourcomputer:~/kritadev/build> make install

To update again to the actual and ‘fresh from a minute ago’ source-code named master, simply ask git to come back to it with git checkout then pull to update :

you@yourcomputer:~/kritadev/krita> git checkout master
you@yourcomputer:~/kritadev/krita> git pull

Common problems

Outside of the source being unstable, there’s the following common problems:

The most common problem is a missing dependency. Install it. A missing dependency is not an “error” that you need to report to the other Krita developers.

A dependency can also be too old. CMake will report when the version of a dependency is too old. That is also not an “error”. You might need to update your Linux installation to a newer version.

You can also have a successful build, then update your linux installation, and then find that Krita no longer builds. A library got updated, and you need to remove the CMakeCache.txt file in your build dir and run cmake again.

Sometimes, changes in Krita’s source code from git revision to git revision make it necessary to make your installation and/or build dir empty and build from scratch. One example is where a plugin is removed from Krita; the plugin will be in your install dir, and won’t get updated when Krita’s internals change.

CMake Settings for Developers

The CMake [https://www.cmake.org] build system generators used by Krita is one of the most used build system generators in the C++ world. A build system is a system that describes how an application should be built from source code. CMake generates a build system from the information given in the CMakeLists.txt and *.cmake files. It is a complete but rather unusual language.

If you start working on Krita, you will need knowledge of two things: how to run the cmake generator, and which variables are important there, and how to edit the CMakeLists.txt files. This page tells you how to run the cmake generator.

The cmake generator is run like this:

cmake -DSOME_CMAKE_VARIABLE=SOME_VALUE ../path/to/source

That is, every option is prefixed with -D, followed by a usually uppercase variable name, the equal sign and the value. The following variables are important for Krita.

You cannot build Krita inside the source directory, so you need to give the path to the source directory, where the top-level CMakeLists.txt file is found.

目录

CMake Settings for Developers

BUILD_TESTING

CMAKE_INSTALL_PREFIX

CMAKE_BUILD_TYPE

CMAKE_PREFIX_PATH

HIDE_SAFE_ASSERTS

KRITA_DEVS

PYQT_SIP_DIR_OVERRIDE

USE_LOCK_FREE_HASH_TABLE

FOUNDATION_BUILD

KRITA_ENABLE_BROKEN_TESTS

LIMIT_LONG_TESTS

ENABLE_PYTHON_2

BUILD_KRITA_QT_DESIGNER_PLUGINS

BUILD_TESTING

If set to ON, the unittests will be built. All developers should have this enabled! You run the unittests with `make test`, or you can run them on their own from their location in the build tree.

CMAKE_INSTALL_PREFIX

This determines where Krita will be installed to. By default this is `/usr/local` on Linux, which is not what you want.

CMAKE_BUILD_TYPE

This has three options: Debug, RelWithDebInfo and Release. Developers should always use Debug, because otherwise ASSERTS will not fire, and developers should pay attention to asserts. Packagers should use RelWithDebInfo.

CMAKE_PREFIX_PATH

This can be set to make the build system look for dependencies in other places than the default one.

HIDE_SAFE_ASSERTS

If set to ON, Krita will not show popups whenever the code encounters a problem that developers need to know about, but users not. If set to OFF, Krita will popup a little message window telling you about the error, of OFF, it will print the information to the terminal. For developers, either is fine, at least, if you start Krita and pay attention to the terminal output. For packagers, it should be ON.

KRITA_DEVS

This is to be used with the Debug CMAKE_BUILD_TYPE, to re-enable optimizations that make it possible to actually work with Krita. By default, Debug disables all compiler optimizations, and Krita needs those.

PYQT_SIP_DIR_OVERRIDE

If you have built your own PyQt and SIP, use this to make sure Krita can find them.

USE_LOCK_FREE_HASH_TABLE

This option enables the experimental lock free hash table. This is ON by default at the moment.

FOUNDATION_BUILD

This option is for packaging Krita on systems that do not have the default color themes shipped by KDE Plasma.

KRITA_ENABLE_BROKEN_TESTS

A number of unittests are known to be broken. They should be fixed, but in the meantime, having dozens of failing unittests hides regressions. Set this to ON to run the broken tests. These tests are always built.

LIMIT_LONG_TESTS

When set to ON, the default, some unittests will be cut short. Set to OFF to test for stress conditions.

ENABLE_PYTHON_2

Use Python 2 instead of Python 3. Only to be used when integrating Krita in a python2-based VFX pipeline.

BUILD_KRITA_QT_DESIGNER_PLUGINS

OFF by default, enable this to build plugins for Qt Designer/Qt Creator so you can add Krita specific widgets to .ui files.

Introduction to Hacking Krita

目录

Introduction to Hacking Krita

Getting started with KDE Software

Getting Started

Building Krita

Working with the Krita codebase

Debugging

Tips when Tackling Issues

Calligra and Krita

Style guidelines

Development Philosophy

Getting in Touch

Contributing Patches

Forking on Gitlab

Getting started with KDE Software

Krita is a great place to start even if you are brand new to KDE development. We’d love to have you join! You’ll be able to work on one of the coolest and fastest-growing open source painting programs out there. Krita also benefits from a modular architecture and the use of the KDE Frameworks and Qt libraries, which makes it easier to focus on new features instead of reinventing the wheel. And it makes coding fun! To work on Krita, you have to use C++ and Qt. It’s a good way to learn both, actually!

KDE has undergone big changes since a major 2014 reorganization [https://www.kde.org/announcements/kde-frameworks-5.0.php] . As a result, working with KDE software has never been easier. Unfortunately, since the changes were so widespread, the documentation has not caught up at all. If you are embarking on this journey, it would be very generous to share your discoveries with others and update pages. (=

Getting Started

Here’s some links to get your started.

Most important, the repository [https://invent.kde.org/kde/krita]. There is a mirror on Github [https://github.com/KDE/krita], however note that we do not use Github for development, do not create pull requests or file issues on github.

KDE Developer wiki - The KDE Techbase Wiki has instructions for new developers. On top of basic tools like C++, git, and general notions such as building software libraries, some special tools that are particular to Krita are Qt, CMake, and KDE Frameworks. It can be very helpful to get started by finding some of the articles discussing these tools and reading up. Here are some of the more useful pages to get you started:

https://techbase.kde.org/Development

https://techbase.kde.org/Contribute

https://techbase.kde.org/Development/Git/Configuration

https://techbase.kde.org/Development/Tutorials

http://flossmanuals.net/kde-guide

http://doc.qt.io/ Qt has some of the best documentation of any software library.

Set up your development environment and build Krita!

Find a few bugs to fix in KDE’s Bugtracking system [https://bugs.kde.org/]. It’s often a good idea to get some experience with the code through fixing bugs, to get familiar with the development process without being overwhelmed. Though there’s nothing against working on that cool feature that scratches your itch!

If you intend to be a regular contributor to Krita, even just for bugreports and feature discussion, the first thing you will want to do is register for a KDE Identity account [https://identity.kde.org/]. This serves as your mostly-universal login to KDE code repositories and websites.

Building Krita

To get started, all you need to do is get a copy of Krita and build it! This is not all that much much different from building something off GitHub… except that Krita is a very large compared to most software. There are build guides to get you going on various platforms, but of course Linux is easiest.

Working with the Krita codebase

Here’s some pointers for working with our codebase.

Architecture

The code base changes all the time with Krita, we’re not afraid of big refactorings, so there is no up to date documentation on the code architecture. There have been some written in the past, but they quickly became outdated and of little use. There is a fairly up to date API guide [https://api.kde.org/extragear-api/graphics-apidocs/krita/html/index.html] if you want to look at how the code is structured.

Integrated Development Environment (IDE)

The most popular IDEs that we use are Qt Creator, Emacs, KDevelop, or vim. Qt Creator has the advantage of the ctrl-k menu, which lets you leap to classes, lines, everywhere. You don’t have to build with Qt Creator though! It can be easier to jump to the terminal, do a ‘make’, check what’s up, and then jump back to the IDE.

Resources

The most important step to learning the code is to really understand memory management: pointers, smart pointers and pointer arithmetic. This is something that Java and C# developers will need to spend a little more time understanding. Here are a couple resources to get you more familiar with C++ and Qt:

Qt Concepts [http://qt-project.org/doc/qt-4.8/how-to-learn-qt.html]

Design Patterns with Qt [http://www.ics.com/designpatterns/book/index.html]

C++ in a Nutshell by O’Reilly (book)

Debugging

There are large and small problems. For small problems the debugger in Qt Creator (run external application) or adding qDebug messages to the code is fine. If the problem is difficult, the first step should always be to write a unit test. A small bit of code that follows a set pattern and exercises the faulty code and shows the problem. That helps so much figuring out a fix and keeping it fixed.

When you run a debug build of Krita, you may be surprised how little debug output you see. This is because most of Krita’s debugging information is turned off by default. The debug statements are grouped into categories such as dbgUI, dbgKrita and so on. The output categories are controlled by an environment variable QT_LOGGING_RULES.

The list of Krita’s debug categories is contained in kis_debug.h and main.cc, and the rules for the environment variable are described in the Qt reference for QLoggingCategory [http://doc.qt.io/qt-5/qloggingcategory.html].

As an example, to enable most of Krita’s debug output, you can run the following:

export QT_LOGGING_RULES="krita*=true"; krita

Using the rule *=true will produce a firehose, if you want it.

Tips when Tackling Issues

Features and Refactorings

Sometimes you just know that a lot of work is going to be needed to reach a particular goal. These will go in separate feature branches off ‘master’.

Performance Improvements

Sometimes you don’t feel like working on a feature – or someone mentioned something being particularly slow. The first thing to do then is carry out that scenario when Krita runs under callgrind [http://c.learncodethehardway.org/book/ex41.html] and vtune [http://en.wikipedia.org/wiki/VTune]. These tools show bottlenecks at the end of a run. It’s important to use both, since both give different insights!

Bugs

Sometimes you rummage around the bugs on b.k.o to see what looks like a nice Saturday morning fix. Sometimes a bug is really urgent (like all data loss bugs). Sometimes someone on IRC or the forum mentions a bug. The first thing to do is reproduce it. The second thing is to look in the code to see what is going on. If it’s a crash bug, especially one that seems mysterious, it might help to google for a few of the key lines in the backtrace. Sometimes it’s a distribution issue!

Blockers

If you are helping with Krita and your progress is being blocked by something - let us know! Talk with us on the Krita developer IRC [https://krita.org/irc/] and we will see what we can do to help!

Calligra and Krita

In October 2015, the Krita project separated from the rest of the Calligra office suite. The new repository still clearly contains this history. Most source code files will have one of two prefixes. “Ko” stands for KOffice, the original name of Calligra office suite. These files mostly comprise basic, lower-level libraries. “Kis” stands for KImageShop, the original name of Krita. These files are where most of the painting-specific functionality is maintained.

Krita 2.9 stable is built from the Calligra repo. Krita 3.x and above is built from the Krita repo.

Style guidelines

See HACKING in the codebase.

Development Philosophy

Krita is nearly ten years old, consists of something like a million lines of code, and has had many individual contributors throughout the years. If you run into something in the code that doesn’t make sense to you, it may very well not make sense to anyone. Developing a codebase this large is an art form, you should feel confident in making risky changes even if you’re not sure they’ll work, you can always go back with git checkout -- * if you mess it up!

Getting in Touch

If you’re working on a bug fix, or maybe a bit of GUI polish, you might get stumped. The best thing to do then is to get in touch with the rest of the Krita team. Part of the fun of working on an open source application is the community, after all! Join us on #krita on irc.freenode.net (keep in mind that most people are in Europe or India) and just ask your question. Stay around, especially if you don’t get an answer immediately. Some of the developers have their irc client open permanently and will often answer questions hours later!

You can also send mail to the mailinglist: kimageshop@kde.org. It’s better not to send mail to individual developers directly, you might accidentally pick someone who hasn’t got the answer, and miss the chance of getting your question answered by another Krita developer.

Contributing Patches

Patch review and development tracking happens on gitlab [https://invent.kde.org]. To log in, enter your KDE Identity in the LDAP login field. You can join the Krita: Next [https://phabricator.kde.org/project/profile/8/]. If you are used to Github, the transition to gitlab is not difficult [https://invent.kde.org/help/#new-to-git-and-gitlab], but it is slightly different.

To push to invent.kde.org, you will not need to have SSH access setup, but you do KDE identity account. If several of your merge requests are accepted, you can get a commiter’s account, which will allow you to push directly to the repositories. You can read more about that here: Getting a developer account [https://community.kde.org/Infrastructure/Get_a_Developer_Account]

注意

Since moving to the gitlab instance, we don’t use git@git.kde.org:krita but rather git@invent.kde.org:kde/krita. Gitlab will not be able to see your commits if you push to the former. You can use git remote set-url origin git@invent.kde.org:kde/krita to get everything pointing correctly.

So then, how does an aspiring contributor submit patches?:

Forking on Gitlab

注解

Work In Progress.

Forking on gitlab is done by going to the repository [https://invent.kde.org/kde/krita] and pressing fork. You will then make a personal fork of the repository.

In your fork, you press clone to get the git urls to do the git clone from. You can then pull and push your commits from these.

You can also use the Web IDE to make your changes on invent.kde.org, but because Krita is a cpp program, we don’t recommend this outside of typo fixes and doxygen. You wouldn’t be able to see the effect of your changes, after all!

Make your first fix, push everything to your fork.

Once you’re done, go to merge requests and press new merge request

Tell us what you’ve done in detail.

The Krita developers be informed of new merge requests, and will try to review your request as soon as possible. If you suspect your patch slipped through the cracks, don’t hesitate to make contact us through the means described above. Check the Advanced Merge Request Guide for further guidance.

bg.. meta::

description

Guide to using features from C++11, C++14 and beyond in Krita’s codebase.

Modern C++ usage guidelines for the Krita codebase

目录

Modern C++ usage guidelines for the Krita codebase

General links about using Modern C++ in Qt

Particular Features

Type Inference (auto)

Range-based for loop

General Initializer Lists

Lambdas, and new-style signals/slots

constexpr

<algorithm>

enum class

Local type definitions (i.e. using)

nullptr

Deleted, default, override, final

unique_ptr/QScopedPointer

Performance-related (rvalues)

Move Constructors

Reference Qualifiers (rvalue references)

C++11 features mostly for template programming

Other C++11 features that will not be useful

General links about using Modern C++ in Qt

There have been a few links discussing mixing C++11 with Qt, and starting with Qt 5.6 C++11 support will be default. Note: there is a lot of hype about C++11, and although many of its new features are quite welcome, often the trade-offs from these changes get neglected.

ICS.com [http://www.ics.com/blog/qt-and-c11]

qt.io [http://blog.qt.io/blog/2011/05/26/cpp0x-in-qt/]

woboq.com: c++11 in Qt5 [http://woboq.com/blog/cpp11-in-qt5.html]

woboq.com: c++14 in Qt5 [http://woboq.com/blog/cpp14-in-qt.html]

FOSDEM 2013 presentation slides [https://archive.fosdem.org/2013/schedule/event/introcplusplus11/attachments/slides/203/export/events/attachments/introcplusplus11/slides/203/fosdem2013_cpp11.pdf]

Here are some more general purpose guides to C++11 features.

C++11 FAQ [http://www.stroustrup.com/C++11FAQ.htmlBjarneStroustrup's] - the grand daddy

Older, more thorough introductions to several topics [http://www.informit.com/authors/bio/e19aded6-574c-4c46-8511-101f9f0ed8f8]

Qt’s API design principles do not always overlap with the C++ Standards Committee design principles. (Range-based for demonstrates the design clash pretty clearly.)

https://wiki.qt.io/API_Design_Principles

Particular Features

Under “drawbacks,” every item should list: “Programmers will face another feature they must learn about.”

Type Inference (auto)

Motivation:

If a function f has a return type Type, it is redundant to write a local variable Type x = f(y). Using auto declarations is a simplification in two ways scenarios. First, it allows the programmer to write code without worrying about doing the manual type deduction, for example:

for( KoXmlReader::const_iterator x = iter.begin(),... ) { }

versus:

for (auto x = iter.begin(), ...) { }

This is particularly useful with nested template types and C++11 lambdas, and other complex types which have an obvious role, but a lengthy type definition.

A second important benefit of auto is that it allows the programmer to more easily refactor. Suppose we have a function gimmeSomeStrings() which returns a QList<QString>, and we access it somewhere else like this

auto someStrings = gimmeSomeStrings();

If we later decide that we want to store a hash of strings and that gimmeSomeStrings should return a QMap<int, QString>, we probably won’t need to make any changes inside the client snippet if we are doing tasks like iterating.

Drawbacks:

the use of auto is be obfuscating. For example, auto x = 2 is not obviously an integer, and auto x = {"a", "b", "c"} returns std::initializer_list, and sometimes it is not clear what some function returns by the name of the function.

Recommendation:

Do not use auto, except, maybe, in loops, where there can be no confusion about the type of what is looped. But even there, hesitate.

Range-based for loop

Motivation:

This is something a long time coming in C++. It is a standardized replacement for Qt’s foreach() construct, which works not only with Qt objects but all iterable C++ types.

for (T x : list ) { ... }

It will work with standard tooling and static analysis, and can be faster by defaulting to in-place access. For this reason range-based iterators should always be used for STL containers, if those are ever needed in Krita.

Drawbacks:

By default, Qt’s foreach rewites the code to make a shallow copy and then use const accessors, while c++11 does the opposite, avoiding copying when possible. When using const accessors, this is faster, but if you try to make changes to the data, this will slow your loop down instead [http://www.dvratil.cz/2015/06/qt-containers-and-c11-range-based-loops/].

Recommendation:

Sometimes, the range-based for is faster. Sometimes the Qt iterator is faster. Personally I like the range-based for in principle, since it works better with static analysis, it has a faster best-case speed, and it is always possible to write it in a way that replicates the foreach() behavior, though the reverse is not true.

On the other hand, there is a bad, dangerous worst case performance hit when a detach/copy is triggered, and this is not easy to catch with standard syntax. In the blog post linked above, the discussion explains that is possible to get around this limitation by defining a macro const_(), which will gives a new syntax to request the compiler use constant iterators:

for (T x : _const(list) ) { ... }

Qt’s recommendation on the other hand is to use foreach() for Qt iterators, and range-based for on STL containers, because you always know what you’re getting, and you always keep your syntax easy to read. In my opinion is the most meaningful new feature without any sort of clear answer, and quite interesting to think about.

General Initializer Lists

Motivation:

Initializer lists are intended to work in many different places to simplify the syntax for complicated initialization. For example, a list of strings could be initialized const QStringList x = {"abc", "def", "xyz"  }; and if you later changed the type to QVector<QString>, or even std::list<std::string>, you wouldn’t have to make any change to the right hand side.

A second place initializer lists are used is in creating standard initial values for class members. This takes the place of writing a lengthy constructor list like:

Type::Type()
 : MemberString1("a")
 , Subclass1(0)
 , Subclass2(1)
 , ...

In addition to being more concise, it saves you from repeating yourself, if you have several constructors which all start with the same defaults.

Mixed uniform initialization is a separate new feature of initializer lists when constructing classes. It is possible to specify some defaults when you declare member variables, but then override them with delegating constructors. This MSDN page is a good reference [https://msdn.microsoft.com/en-us/library/dn387583.aspx].

Drawbacks:

None I can think of. This is super simple, completely obvious to read and write, and shortens code by removing long unnecessary lists of defaults.

Recommendation:

Yes!

Lambdas, and new-style signals/slots

Motivation:

Lambda expressions are a big new addition for C++11. Many programmers claim they start to feel like an essential part of the language very quickly. One of the biggest uses for lambdas is in the standard algorithm library <algorithm>, which is described below. In Qt5, this, along with std::function and std::bind, allow for One of the most useful C++11 integrations, a new signal/slot syntax which replaces the moc macros SIGNAL() and SLOT() with standard C++.

Old style:

connect(sender, SIGNAL (valueChanged(QString,QString)),  receiver, SLOT (updateValue(QString)) );

New style:

connect(sender, &Sender::valueChanged, receiver, &Receiver::updateValue );

New style signals and slots provide a great benefit from the tooling perspective: now, all types for functions and function arguments can be checked statically, and you don’t have to catch typos by monitoring debug messages saying “no such slot.”

Another possibility is to use lambdas directly inside connect(), instead of defining a class member function which is only used once. The greatest benefit is that the function can be defined right where it is used; it also aids readability to get rid of a list of tiny helper functions from the header.

“Qt5: C++11 lambdas are your friend” [http://artandlogic.com/2013/09/qt-5-and-c11-lambdas-are-your-friend/]

C++ language reference [http://en.cppreference.com/w/cpp/language/lambda]

Qt.io New Signal/Slot Syntax [https://wiki.qt.io/New_Signal_Slot_Syntax] Also gives detailed pros/cons.

Drawbacks:

The new-style syntax makes it somewhat harder to use default arguments, which requires the use of lambdas. It is also perhaps a little less pretty.

Lambdas in general are have become one of the most clunky pieces of C++11 notation. Since they allow a great deal of options for example, capturing by reference with [&] and capturing by value with [=], they are a significant new addition to the C++ learning curve. Using small local functions with uninformative names like auto F = [&] ( x ) { whatever } is confusing for everyone.

Although it is possible to use lambdas are tricky inside signals and slots, there are gotchas. Lambdas will not disconnect automatically, although there is a special syntax to make that happen.

Recommendation:

Lambdas will feel strange to many C++ programmers. At a minimum, any time you use them you should add a comment explaining what you’re doing. (Krita codebase could use more comments anyway.) New style signals and slots should be used with caution, especially while the 2.9 branch is being maintained.

Overall, the Qt wiki gives a good overview, and I agree with its suggestions, which is to permit a small amount of mixing of the different syntax. Their recommendation is to use new-style signals and slots when possible, which is the vast majority of the time, to fall back on the old macros when one needs to use a default argument, and to use lambdas very rarely, only in cases when one needs to create a signal that is not bound to a particular object. The latter sort of case is not something that C++ newcomers would want to be touching anyway.

constexpr

Motivation:

Performing calculations at compile time can speed things up at runtime. KDAB: speed up your Qt 5 programs using C++11 [https://www.kdab.com/wp-content/uploads/stories/slides/DD12/mutz-dd-speed-up-your-qt-5-programs-using-c++11.pdf]

Drawbacks:

Not easy to use these features.

Recommendation:

This could be useful in specific places, like KoCompositeOpRegistry. Overall it is not something most programmers will run into.

<algorithm>

Motivation:

A handwritten loop that looks for occurences of the number 20 and replaces it with 99 is routine, and will take several lines to write, including defining local variables. Instead, something like

std::replace (myvector.cbegin(), myvector.cend(), 20, 99);

is more concise, safer is even self-documenting, since the name of the function itself explains what it is doing. <u>If you make sure to use Qt’s const iterators</u>, there should never see a performance penalty compared to a hand-written loop, there can sometimes even see a gain. A list of standard algorithms can be found here. [http://www.cplusplus.com/reference/algorithm/] Historically Qt provided its own algorithm library, but now encourages programmers to use the STL versions instead, and Qt’s own algorithm library will mostly become deprecated. http://doc.qt.io/qt-5/qtalgorithms.html Unlike range-based for, where it is difficult to specify a const iterator instead of a standard iterator, with <algorithm> we are easily able to specify the const iterator.

Drawbacks:

Some of the standard algorithms are not completely obvious from observing the name. For example, I could not personally list what are the five arguments of std::replace_copy off the top of my head, and you shouldn’t expect anyone to. When values inside the container need to be modified, non-const iterators may be slower than a Qt foreach() loop.

Recommendation:

Encourage the use of <algorithm> when it improves code clarity. Speed not a big problem most of the time, don’t make changes which are hard to understand just for a tiny hypothetical speed boost. However, moving to <algorithm> and away from Qt foreach() inside hot paths could prove useful in the future.

enum class

Motivation:

These are a type-safe version of enums, and allows the programmer to associate several different types of data with an enum, such as a character. This gives stricter type safety, for example, when it might be possible to accidentally convert a variable into a numeric type. For example:

enum class Color : char {Red = 'R', Green = 'G', Blue = 'B'};

Other benefits of enum classes are that they can be forward-declared, and that the data can be any sort of constexpr. For example, if one had a constexpr function color_symbol() that returned the symbol given some color data, the enum class members could be defined like:

enum class Color: char {Red = color_symbol({255, 0, 0}) ...};

The standard C++ reference does a nice job explaining these features. http://en.cppreference.com/w/cpp/language/enum

Drawbacks:

Virtually none. Very small changes to the code, more type safety, removes the need for some tables of values. The only problem is sometimes this requires fixing code that was unsafe to begin with.

Recommendation:

Use freely.

Local type definitions (i.e. using)

Motivation:

An easier and localized way to use typedefs. Can be at the namespace, class, or function level. Allows you to rewrite a typedef so that the new name occurs on the left hand side of the equals sign, which is easier to read. They allow you to place typedefs closer to where they’re used. They are particularly nice inside templates.

Drawbacks:

Very few. These are quite intuitive

Recommendation:

Go for it.

nullptr

Motivation:

The use of nullptr as a default pointer initializer is a very small change in C++11, and mostly an aesthetic one. Technically, there are only a few things it prevents : it cannot be converted to a numeric type like int x = nullptr;, and it cannot be used as a class type in a template, so the following is a compiler error:

meta_type<class A, class B>;
meta_type<C, nullptr> x;

The most important to nullptr is simply that you are tagging your code - ‘’hey: there is a null pointer lurking around here, be careful!’‘

Drawbacks:

It takes longer to type nullptr than it takes to type 0, and it’s not so visually pleasing. Converting the existing code base would be very laborious and mess up git history. Tiny benefits.

Recommendation:

We do not use nullptr in Krita. Not in new code, and we don’t refactor old code to use it. Also not Q_NULLPTR.

Deleted, default, override, final

Motivation:

These are keywords used for designing inheritance patterns. They are useful for preventing accidental copy construction.

Drawbacks:

Since Krita does not export libraries, most of the time we won’t need to worry about these. They are limited to solving some pretty specialized problems.

Recommendation:

No reason to hold back from these features if they seem useful. They are well named and fairly self-explanatory, especially for developers with a Java or C# background. If you apply them correctly, you can prevent other coders from making mistakes when they use your classes. For others, these definitions can be ignored until they cause a compile error, which tell you that you’re doing something the wrong way.

unique_ptr/QScopedPointer

Motivation:

Here is a glowing review of unique_ptr [http://www.drdobbs.com/cpp/c11-uniqueptr/240002708]. This is really about a philosophy of C++ memory management, not just a particular smart pointer type. The idea is that whenever you create an object on the heap, you should always house it inside a smart pointer. The reason this philosophy is considered new to C++11 is that unique_ptr is the first time they ‘got it right’ designing a very nice smart pointer class. Most importantly, the class uses negligible overhead. In particular: sizeof(unique_ptr<T*>) = size_t, it can be passed as a function argument without copying, and dereferencing is inline.

QScopedPointer is essentially the same thing as unique_ptr, and perhaps it is more idiomatic to use QScopedPointer instead.

注解

It is a useful idiom to store a d-ptr using QScopedPointer<Private>, but if you do this you must also declare a destructor in the header file, even if it has an empty implementation in the source file.

“Rule of Zero”: more about the C++ design philosophy behind unique_ptr. [https://rmf.io/cxx11/rule-of-zero/]

Drawbacks:

The philosophy mentioned above can be summarized like this: we should state up front what we are going to prohibit programmers from doing. Like the const keyword, unique_ptr puts restrictions on what can be done with the pointer, the main one being, it cannot be copied. Like enforcing const correctness, this can be annoying to get right throughout a codebase.

One particular limitation is that Qt container classes. For example QVector<std::unique_ptr> is invalid, because QVector requires its members can be copied. This makes converting to unique_ptr a bit slow, since QVector<T *> will have to be converted to std_array<unique_ptr<T*>>. If the owner was being copied before, it will become uncopiable. This can be a good thing, but it can also be extra work.

Moving a unique_ptr requires additional semantics. [http://www.cplusplus.com/reference/memory/unique_ptr/operator=/]

Recommendation:

Smart pointers are already prevalent in the codebase with the KisSP family, but more use of them should be encouraged. d_ptrs should be wrapped in a QScopedPointer. The rule is: first Krita’s shared pointers, then Qt’s, do not use the std smart pointers.

Performance-related (rvalues)

Using move constructors and rvalues are very subtle and advanced features, but widely celebrated as successes of C++11. The point of these features is to save on costs of copying memory when passing function arguments. The idea is that if one is OK allowing a function to steal, alter or destroy its argument, then that function can be called slightly faster if the argument is not copied at all, but instead simply performing an ownership transfer. C++ programmers should already be aware that writing performant code where data gets shuffled around sometimes requires opening a can of ampersands. These features will naturally stay confined to the corners of the codebase behind the scenes where they belong, and should be introduced when they are useful.

Tutorial for rvalue references [http://thbecker.net/articles/rvalue_references/section_01.html]

KDAB: speed up your Qt 5 programs using C++11 [https://www.kdab.com/wp-content/uploads/stories/slides/DD12/mutz-dd-speed-up-your-qt-5-programs-using-c++11.pdf]

Slide 37 describes lvalue/rvalue types in exact detail [http://wiki.hsr.ch/PeterSommerlad/files/MeetingCPP2013_SimpleC++.pdf] Also explains the terms “xvalue” and “prvalue” sometimes seen as well.

Move Constructors

Recommendation:

Use whenever it aids performance.

Reference Qualifiers (rvalue references)

Recommendation:

Use whenever it aids performance.

C++11 features mostly for template programming

Krita makes very light use of templates. These features are useful, coming across them in the code base will add complexity for new learners, and have not been necessary so far.

decltype : this is the most likely of these features to be useful, for example, in KisInputManager.

static_assert

variadic templates

Other C++11 features that will not be useful

Threading support (Relies on C++ threading model; use Qt threading instead)

shared_ptr and weak_ptr (Relies on C++ threading model; use KisSharedPointer instead)

New literal types (already have QString/ki18n)

Extended Unions (already have QVariant)

Developing Features

There’s several stages to making a feature request become reality. The first section of this page goes over a set of common issues with making feature requests and gives hints on how to make a simple feature request into a proper proposal. The rest documents how a feature goes from a proposal to an actual reality.

Step 1: Making a proposal

“vOpenBlackCanvasMischiefPhotoPaintStormToolKaikai has a frobdinger tool! Krita will never amount to a row of beans unless Krita gets a frobdinger tool, too!”

The cool thing about open source is that you can add features yourself, and even if you cannot code, you talk directly with the developers about the features you need in your workflow. Try that with closed-source proprietary software! But, often, the communication goes awry, leaving both users with bright ideas and developers with itchy coding fingers unsatisfied.

This post is all about how to work, first together with other artists, then with developers to create good feature requests, feature requests that are good enough that they can end up being implemented.

For us as developers it’s sometimes really difficult to read feature requests, and we have a really big to-do list (600+ items at the time of writing, excluding our own dreams and desires). So, having a well written feature proposal is very helpful for us and will lodge the idea better into our conscious. Conversely, a demand for a frobdinger tool because another application has it, so Krita must have it, too, is likely not to get far.

Writing proposals is a bit of an art form in itself, and pretty difficult to do right! Asking for a copy of a feature in another application is almost always wrong because it doesn’t tell us the most important thing:

What we primarily need like to know is HOW you intend to use the feature. This is the most important part. All Krita features are carefully considered in terms of the workflow they affect, and we will not start working on any feature unless we know why it is useful and how it is exactly used. Even better, once we know how it’s used, we as developers can start thinking about what else we can do to make the workflow even more fluid!

Good examples of this approach can be found in the pop-up palette using tags, the layer docker redesign of 3.0, the onion skin docker, the time-line dockers and the assistants.

Feature requests should start on the forum, so other artists can chime in. What we want is that a consensus about workflow, about use-cases emerges, something our UX people can then try to grok and create a design for. Once the design emerges, we’ll try an implementation, and that needs testing.

For your forum post about the feature you have in mind, check this list:

It is worth investigating first if the feature in question has similar functionality in Krita that might need to be extended to solve the problem. We in fact kind of expect that you have used Krita for a while before making feature requests. Check the manual first!

If your English is not very good or you have difficulty finding the right words, make pictures. If you need a drawing program, I heard Krita is pretty good.

In fact, mock-ups are super useful! And why wouldn’t you make them? Krita is a drawing program made for artists, and a lot of us developers are artists ourselves. Furthermore, this gets past that nasty problem called ‘communication problems’. (Note: If you are trying to post images from photobucket, pasteboard or imgur, it is best to do so with [thumb=800][/thumb]. The forum is pretty strict about image size, but thumb gets around this)

Focus on the workflow. You need to prepare a certain illustration, comic, matte painting, you would be (much) more productive if you could just do — whatever. Tell us about your problem and be open to suggestions about alternatives. A feature request should be an exploration of possibilities, not a final demand!

The longer your request, the more formatting is appreciated. Some of us are pretty good at reading long incomprehensible texts, but not all of us. Keep to the ABC of clarity, brevity, accuracy. If you format and organize your request we’ll read it much faster and will be able to spent more time on giving feedback on the exact content. This also helps other users to understand you and give detailed feedback! The final proposal can even be a multi-page pdf.

We prefer it if you read and reply to other people’s requests than to start from scratch. For animation we’ve had the request for importing frames, instancing frames, adding audio support, from tons of different people, sometimes even in the same thread. We’d rather you reply to someone else’s post (you can even reply to old posts) than to list it amongst other newer requests, as it makes it very difficult to tell those other requests apart, and it turns us into bookkeepers when we could have been programming.

Keep in mind that the Krita development team is insanely overloaded. We’re not a big company, we’re a small group of mostly volunteers who are spending way too much of our spare time on Krita already. You want time from us: it’s your job to make life as easy as possible for us!

So we come to: Things That Will Not Help.

There’s certain things that people do to make their feature request sound important but are, in fact, really unhelpful and even somewhat rude:

“Application X has this, so Krita must have it, too”.

See above. Extra malus points for using the words “industry standard”, double so if it refers to an Adobe file format.

We honestly don’t care if application X has feature Y, especially as long as you do not specify how it’s used.

Now, instead of thinking ‘what can we do to make the best solution for this problem’, it gets replaced with ‘oh god, now I have to find a copy of application X, and then test it for a whole night to figure out every single feature… I have no time for this’.

We do realize that for many people it’s hard to think in terms of workflow instead of “I used to use this in ImagePainterDoublePlusPro with the humdinger tool, so I need a humdinger tool in krita” — but it’s your responsibility when you are thinking about a feature request to go beyond that level and make a good case: we cannot play guessing games!

“Professionals in the industry use this”.

Which professionals? What industry? We cater to digital illustrators, matte painters, comic book artists, texture artists, animators… These guys don’t share an industry. This one is peculiar because it is often applied to features that professionals never actually use. There might be hundreds of tutorials for a certain feature, and it still isn’t actually used in people’s daily work.

“People need this.”

For the exact same reason as above. Why do they need it, and who are these ‘people’? And what is it, exactly, what they need?

“Krita will never be taken seriously if it doesn’t have a glingangiation filter.”

Weeell, Krita is quite a serious thing, used by hundreds of thousands of people, so whenever this sentence shows up in a feature request, we feel it might be a bit of emotional blackmail: it tries to to get us upset enough to work on it. Think about how that must feel.

“This should be easy to implement.”

Well, the code is open and we have excellent build guides, why doesn’t the feature request come with a patch then? The issue with this is very likely it is not actually all that easy. Telling us how to implement a feature based on a guess about Krita’s architecture, instead of telling us the problem the feature is meant to solve makes life really hard!

A good example of this is the idea that because Krita has an OpenGL accelerated canvas, it is easy to have the filters be done on the GPU. It isn’t: The GPU accelerated canvas is currently pretty one-way, and filters would be a two-way process. Getting that two way process right is very difficult and also the difference between GPU filters being faster than regular filters or them being unusable. And that problem is only the tip of the iceberg.

Some other things to keep in mind:

It is actually possible to get your needed features into Krita outside of the Kickstarter sprints by funding it directly via the Krita foundation, you can mail the official email linked on krita.org for that.

It’s also actually possible to start hacking on Krita and make patches. You don’t need permission or anything!

Sometimes developers have already had the feature in question on their radar for a very long time. Their thinking might already be quite advanced on the topic and then they might say things like ‘we first need to get this done’, or an incomprehensible technical paragraph. This is a developer being in deep thought while they write. You can just ask for clarification if the feedback contains too much technobabble…

Did we mention we’re overloaded already? It can easily be a year or two, three before we can get down to a feature. But that’s sort of fine, because the process from idea to design should take months to a year as well!

To summarize: a good feature request:

starts with the need to streamline a certain workflow, not with the need for a copy of a feature in another application

has been discussed on the forums with other artists

is illustrated with mock-ups and example

gets discussed with UX people

and is finally prepared as a proposal

and then it’s time to find time to implement it!

and then you need to test the result.

Step 2: Triaging the proposal

This is strictly a developer task. What is done is that we identify how much work a proposal would need to be implemented. Since 2016 we use these groups to categorize wishbugs so we can plan them into a current release or select them for a fundraiser.

To fulfill this step, we need to have a full list which consolidated the ideas and requirements. A good feature request from step one will have these lined out.

WISHGROUP: Pie-in-the-sky

not going to happen, but it would be really cool.

WISHGROUP: Big Projects

needs more definition, maybe two, three months of work.

WISHGROUP: Stretchgoal

up to a couple of weeks or a month of work.

WISHGROUP: Larger Usability Fixes

maybe a week or two weeks of work.

WISHGROUP: Small Usability Fixes

half a day or a day of work.

WISHGROUP: Out of scope

too far from our current core goals to implement.

WISHGROUP: Needs proposal and design

needs discussion among artists to define scope first. A good proposal doesn’t need this.

Step 3: Discussing in irc/phab

Again, strictly a developer task. While nothing stops an adventurous programmer from just going in and implementing something, it helps to go to the #krita irc on freenode and tell us you’re working on it. Not because you need permission(Krita is open source after all), but we do want to be able to help you in your endeavours. Such help can include technical help, like where things are in the code, but also interface design help.

Some features, such as new frame types for animation, or multithreading on some part or the other also needs careful discussion so we know what is going to need changes.

Eventually, a phabricator task will be made to track the issue as well as including mockups. Branch progress is also discussed during the weekly meeting in the irc.

Step 4: Work in a feature branch

New feature branches are called ‘name/number-shortdescription’. Examples: “rempt/T379-resource-management”, “kazakov/hdr-support”, “wolthera/edgedetectionfilter”, “jounip/T8764-clone-frames”.

Originally this was lastname only, but some users have an endlessly long last name while others prefer using their kde identity name. The main purpose is to identify who is responsible for the work in the branch.

Work in a feature branch continues till all major elements are done. A review request is done over the whole branch. Sometimes, for UI purposes, people check out the branch to test it.

When the review is accepted, the branch is merged into master for further testing. When such a branch is merged, a mail needs to be sent to kimageshop@kde.org to notify everyone about this, you can do this automatically by adding ‘CCMAIL:kimageshop@kde.org’ to your merge commit.

As Krita’s nightlies are based on master that means a binary will be compiled for the master branch with the new feature in at most 24 hours.

Step 5: Documentation and demonstration

When a feature hits the master branch, an entry will be written for the draft branch of this very manual. In particular a reference manual entry will be written to ensure some documentation, some bigger features that interact with one another might also receive a tutorial.

The people who programmed or designed the feature are encouraged to help with this documentation process(as they know it best), but it is not mandatory. What is appreciated is that the issue or task is assigned to the manual team.

Similarly, demonstration videos or images are welcome, as they will be used for the release notes. The release notes for the next big version are available here [https://krita.org/en/krita-4-2-release-notes/], come help us with making the page look good!

Finally, upon release a stable branch is created for the master branch (often named Krita/versionnumber), and a release is made with the new feature.

Optimizing tips and tools for Krita

Hot Spots

thumbnails are recalculated a lot

the histogram docker calculates even when hidden

brush outline seems slow

the calculation of the mask for the autobrush is very slow and doesn’t cache anything

caching a whole row or column of tiles in the h/v line iterators should speed up things a lot

tile engine 1 has the BKL; tile engine 2 cannot swap yet and isn’t optimized yet

projection recomposition doesn’t take the visible area into account

pigment preloads all profiles (startup hit)

gradients are calculated on load, instead of being associated with a png preview image that is cheap to load

Tools

Valgrind

Tips

You can tell callgrind to focus only on the part of the code you want to optimize. This results in cleaner data. For example, you may want to only monitor the performance when drawing a stroke. Unless the thing you’re trying to optimize is the program startup, you can tell valgrind to run with the logging, or instrumentation, turned off at start:

valgrind  --tool=callgrind --instr-atstart=no krita

Instrumentation can then be activated and deactivated with callgrind_control. To begin performance monitoring:

callgrind_control -i on

And then to end it:

callgrind_control -i off

I usually write a few aliases in my .bashrc (or .zshrc):

alias callgrind="valgrind --tool=callgrind --instr-atstart=no"
alias callgrind-on="callgrind_control --instr=on"
alias callgrind-off="callgrind_control --instr=off"

Sysprof

mutrace

mutrace [http://0pointer.de/blog/projects/mutrace.html] is a tool that count how much time is spend waiting for a mutex to unlock.

Easy optimization

As soon as you see slow code, try to have a look at the code to see if we aren’t creating a lot of unnecesserary objects, 90% of the time slow code is caused by this (the remain 10% are often caused by a lot of access to the tilesmanager, like with random accessor)

For instance:

Avoid:

for(whatever)
{
    QColor c;
    ...
}

Do:

QColor c;
for(whatever)
{

}

It might seems insignificant, but really it’s not, on a loop of a milion of iterations, this is expensive as hell.

An other example:

Avoid:

for(y = 0 to height)
{
    KisHLineIterator it = dev->createHLineIterator(0, y, width);
    for(whatever)
    {
        ...
    }
}

Do:

KisHLineIterator it = dev->createHLineIterator(0, 0, width);
for(y = 0 to height)
{
    for(whatever)
    {
        ...
    }
    it.nextRow(); // or nextCol() if you are using a VLine iterator
}

Vector instructions

Krita takes heavy advantage of the Vc [https://github.com/VcDevel/Vc] library to speed up its brush strokes with CPU vector instructions. If you are planning to work with that library, it is worth reading through its documentation.

There are more general introductions to what vector instructions are for, and how they work here.

reference about MMX on Intel’s website [http://developer.intel.com/design/archives/processors/mmx/]

Fundamentals of Media Processor Designs [http://www.cise.ufl.edu/~peir/cda6159/media12.pdf]: introduction to the use of MMX/SSE instructions

Software Optimization Guide for AMD64 [http://www.amd.com/us-en/assets/content_type/white_papers_and_tech_docs/25112.PDF]

STL like programming but using MMX/SSE{1,2,3} when available [http://www.pixelglow.com/macstl/]

Profile guided optimization

Profile guided optimization is something else though. It is a special way of compiling and linking, that the compiler and linker use profiling information to know how best to optimize the code. So code that is used a lot is compiled with -O3 (the most optimizations), while code that is not used a lot gets -Os (to take less space), and so forth. This is a very useful technique that was not available on Linux until last year, and the news today is that Firefox now builds properly with it and there is a nice noticeable speed improvement for Linux users.

source:

http://linux.slashdot.org/comments.pl?sid=2117150&cid=35987784

wikipedia:

http://en.wikipedia.org/wiki/Profile-guided_optimization

g++ -O3 -march=native -pg -fprofile-generate ...
// run my program's benchmark
g++ -O3 -march=native -fprofile-use ...

Links

Design for Performance [http://www.scribd.com/doc/53483851/Design-for-Performance]: great read about performance optimization (aimed at game developers, but many tricks apply for Krita)

TCMalloc [http://goog-perftools.sourceforge.net/doc/tcmalloc.html]: a malloc replacement which make faster allocation of objects by caching some reserved part of the memory

Optmizing CPP [http://www.agner.org/optimize/optimizing_cpp.pdf]: extensive manual on writing optimized code.

Advanced Merge Request Guide

Since April 2019, we’re using Gitlab to review merge requests and patches to the code. Check Forking on Gitlab on how to start with making a merge request.

When to make a merge request

There’s three times you need to make merge requests.

When you do not have commit access.

When the change you are making is huge, like with feature development, large refactors, complex bugfixes. For these we do not fork, but instead make a branch in the main repository in the following format: name/number-shortdescription. Check Developing Features for more information.

When you are not sure about whether what you did is correct. It is common within the Krita community that even developers with commit access will have a weaning period in which they still make merge requests for each change as they’re getting comfortable with the codebase. It is not mandatory to do so at this point, but requests are the best way for us to help one another with writing good code.

Checklist for review

Here’s a quick checklist that is gone over when reviewing patches. While some requests require specialist knowledge, these items are so universal that anyone who knows how to check them can do so and comment on them. Feel free to do this yourself on open requests [https://invent.kde.org/kde/krita/merge_requests?scope=all&utf8=%E2%9C%93&state=opened], we welcome it!

Also check out the manual for reviewing merge requests in Gitlab [https://invent.kde.org/help/user/project/merge_requests/index.md].

Does the code build

Most important check. Apply the patch locally and build it. If it doesn’t build, the patch will not be accepted at all.

Does it not crash?

Basically, build the patch, run Krita, and check if the functions associated doesn’t crash. If it does, make a backtrace and post it in the review.

Does it leak memory?

Does the patch break tests?

CPP features used.

Is the usage of CPP in accordance with HACKING and the Modern C++ usage guidelines for the Krita codebase guidelines? So for example, is auto not used outside of the single case we accept it?

Is the code in conformance with KDE/Krita style?

Check the HACKING file for directions.

Are the commit messages sensible?

There’s several guides for this, but in general, try to make sure that the commit messages actually explain what you did.

https://github.com/RomuloOliveira/commit-messages-guide

Does the patch make sense.

This is in the category of specialist knowledge, but you can apply some common sense here. If a patch for a filter also adjusts the resource management, you can ask yourself why this would be necessary. Furthermore, does the patch actually fix the thing it says it is fixing? These are not easy checks to make, but important things to consider when looking at the patch.

Requests that need changes to them need to be labeled with needs-changes. Requests that are accepted should be labeled accepted. This is to ensure we can figure out which requests are in need of review. Requests that need to be reviewed need to lack both labels.

Reporting Bugs

Krita is, together with many other projects, part of the KDE community. Therefore, bugs for Krita are tracked in KDE’s bug tracker: KDE’s bug tracker [https://bugs.kde.org]. The bug tracker is a tool for Krita’s developers to help them manage bugs in the software, prioritize them and plan fixes. It is not a place to get user support!

The bug tracker contains two kinds of reports: bugs and wishes. Bugs are errors in Krita’s code that interrupt using Krita. Wishes are feature requests: the reporter thinks some functionality is missing or would be cool to have.

Do not just create a feature request in the bug tracker: follow Feature Requests [https://krita.org/en/item/ways-to-help-krita-work-on-feature-requests/] to learn how to create a good feature request.

This guide will help you create a good bug report. If you take the time to create a good bug report, you have a much better chance of getting a developer to work on the issue. If there is not enough information to work with, or if the bug report is unreadable, a developer will not be able to understand and fix the issue.

目录

Reporting Bugs

Only Report Bugs

Check the FAQ

Ask on Krita’s Forum or IRC Chat Channel

Use the Latest Version of Krita

Check The Bug Tracker for Duplicates

Be Complete and Be Completely Clear

You’re Not Done After You Have Filed the Report

Only Report Bugs

A bug is a problem in Krita’s code.

If you have problems with your drawing tablet, for instance no support for pressure, then that is unlikely to be a problem in Krita’s code: it is almost certain to be a problem with your setup or the driver for your tablet.

If you’ve lost the toolbox, that’s not a bug.

If you have deleted your work, that is not a bug.

If Krita works differently from another application, that’s not a bug.

If Krita works differently than you expected, that’s not a bug.

If Krita is slower than you expected, that’s not a bug.

If Krita crashes, that’s a bug.

If a file you save comes out garbled, that’s a bug.

If Krita stops working, that’s a bug.

If Krita stops displaying correctly, that’s a bug.

Check the FAQ

If you’ve got a problem with Krita, first check the FAQ [https://docs.krita.org/en/KritaFAQ.html]. See whether your problem is mentioned there. If it is, apply the solution. If that doesn’t work for you, do not report a bug. Ask for help on Krita’s Forum [https://forums.kde.org].

Ask on Krita’s Forum or IRC Chat Channel

If uncertain, ask on Krita’s IRC chat channel [https://krita.org/en/irc/] or the Krita Forum [https://forum.kde.org/krita].

Krita’s chat channel is maintained on irc.freenode.net. Developers and users hang out to discuss Krita’s development and help people who have questions.

重要

Most Krita developers live in Europe, and the channel is very quiet when it’s night in Europe. You also have to be patient: it may take some time for people to notice your question even if they are awake.

Also …

Krita does not have a paid support staff. You will chat with volunteers, users and developers. It is not a help desk.

But you can still ask your question, and the people in the channel are a friendly and helpful lot.

Use the Latest Version of Krita

Check Krita’s website to see whether you are using the latest version of Krita. There are two “latest” versions:

Latest stable: check the Download page [https://krita.org/download/]. Always try to reproduce your bug with this version.

Stable and Unstable Nightly builds. The stable nightly build is built from the last release plus all bug fixes done since the last release. This is called Krita Plus* The unstable nightly build contains new features and is straight from the development branch of Krita. This is called Krita Next. You can download these builds from the Download page [https://krita.org/download/].

Check The Bug Tracker for Duplicates

This can be tricky: many bug reports are very unclear, have misleading subjects or are assigned to the wrong component. The Krita team tries to triage incoming bugs, fixing the subject, the component and asking for more information in case the bug is not clear.

But please do try to check whether a problem has already been reported. If it is, please add your report as a comment to that bug ticket.

Be Complete and Be Completely Clear

Give all information. That means that you should give information about your operating system, hardware, the version of Krita you’re using and, of course about the problem.

Operating system: fill in the requisite field in the bug tracker’s form

Version: fill in the requisite field in the bug tracker’s form

Hardware information: copy the information from the Help ‣ System information for Bug Reports window into your report. Note how many displays you have.

If you are using a drawing tablet, tell us the brand and type.

Tell us what kind of image you were working on: the size, the resolution, the color model and channel depth.

If you are reporting a crash, attach a crash log. Follow this link [https://docs.krita.org/en/reference_manual/dr_minw_debugger.html#dr-minw] to learn how to get a crash log on Windows. On Linux, follow your distribution’s instructions to install debug symbols if you have installed Krita from a distribution package. It is not possible to create a useful crash log with Linux appimages.

The problem needs to be clearly stated: - what happened, - what had you expected to happen instead - how the problem can be reproduced.

Give a concise and short description, then enumerate the steps needed to reproduce the problem. If you cannot reproduce the problem, and it isn’t a crash, think twice before making the report: the developers likely cannot reproduce it either.

If at all possible, attach your original Krita file (the one that ends in .kra) to the bug report, or if it’s too big, add a link for download. If you do that, make sure the file will be there for years to come: do not remove it.

If you think it would be useful, you can also attach or link to a video. Note that the Krita developers and bug triagers are extremely busy, and that it takes less time to read a good description and a set of steps to reproduce than it takes to watch a video for clues for what is going on.

When making a video or a screenshot, include the whole Krita windows, including the titlebar and the statusbar.

You’re Not Done After You Have Filed the Report

After you have filed your bug, mail will be sent out to all Krita developers and bug triagers. You do not have to go to the chat channel and tell us you created a bug.

When a developer decides to investigate your report, they will start adding comments to the bug. There might be additional questions: please answer them as soon as possible.

When the developer has come to a conclusion, they will resolve the bug. That is done by changing the resolution status in the bug tracker. These statuses are phrased in developer speak, that is to say, they might sound quite rude to you. There’s nothing that we can do about that, so do not take it personally. The bug reporter should never change the status after a developer changed it.

These are the most used statuses:

Unconfirmed: your bug has not been investigated yet, or nobody can reproduce your bug.

Confirmed: your bug is a bug, but there is no solution yet.

Assigned: your bug is a bug, someone is going to work on it. There probably will be a corresponding task on the https://phabricator.kde.org/project/view/8/ developer workboard.

Resolved/Fixed: your bug was a genuine problem in Krita’s code. The developer has fixed the issue and the solution will be in the next release.

Duplicate: your bug has been reported before

Needinfo/WaitingForInfo. You need to provide more information. If you do not reply within a reasonable amount of time the bug will be closed.

Resolved/Invalid: your report was not about a bug.

Resolved/Upstream: the issue you observed is because of a bug in a library Krita uses, or a hardware driver, or your operating system. We cannot do anything about it.

Resolved/Downstream: Only on Linux. The issue you observed happens because your Linux distribution packages Krita in a way that causes problems.

See also our chapter on Bug Triaging [https://docs.krita.org/en/untranslatable_pages/triaging_bugs.html]

Running Krita from Source

Triaging Bugs

There are over 1000 bugs and 350 wishes reported against Krita per year, and that number is rising. The Krita developers cannot handle that stream on their own! Please consider helping out by triaging bugs. This document gives some simple guidelines to get started, and some common cases that can often be answered with a standard text.

For more details, see also https://community.kde.org/Guidelines_and_HOWTOs/Bug_triaging

目录

Triaging Bugs

Status flow

Platform

Version

Can Reproduce

Cannot Reproduce

Importance

Guidance for using Importance

Asserts and Crashes

Canned Answers and Recognizing Common Reports

Cannot Save

Broken Canvas

My stylus has an offset

Other tablet issues

Krita lags

I cannot paint at all, in a particular document

Status flow

A bug begins as UNCONFIRMED. When triaging, only UNCONFIRMED bugs are still relevant.

Platform

If the user has not entered the Platform correctly (i.e., it is “unspecified/Linux”), then ask which platform they are using. Mark the bug as NEEDDINFO/WAITINFORINFO.

Tell the user:

Please indicate your operating system correctly. For Linux, select the distribution, appimage or compiled from sources and Linux, for Windows, select MS Windows/MS Windows, for OS X or macOS, select macports, disk images or homebrew and OS X.

If the user has selected Windows CE for platform, set it to MS Windows without asking them.

Version

If the user has not entered the version (i.e., the version is unspecified), ask them for the version and mark the bug as NEEDDINFO/WAITINFORINFO.

Tell the user:

Please select the version of Krita you are using. You can find the version in Help/About Krita.

Can Reproduce

If you can reproduce the bug, add a comment indicating you can reproduce it, maybe with clearer steps to reproduce and anything pertinent that you observed. If you have a backtrace, also add it. Set the bug status to CONFIRMED and add the triaged keyword to the keywords.

If you can reproduce the bug, and want to go the extra mile, use an older version of Krita to see whether you could reproduce it there as well. If you couldn’t, it’s a regression, so add the regression keyword to the keywords and mark which version of Krita the latest was that did not have the bug.

Cannot Reproduce

If you cannot reproduce, the user either has not given enough information or the bug is specific to their system.

If there is not enough information, ask for more information. Depending on the report, the steps to reproduce might need to be described more clearly and/or a screenshot, a screen recording or the original files might be necessary. Set text (ask for what you think is needed):

Ask the user:

I am sorry, I cannot reproduce your issue. Could you specify the steps to reproduce more clearly, and maybe add a screen recording/screenshot/original file

Mark the bug as NEEDINFO/WAITINGFORINFO.

If the issue seems to be specific to the user’s system, ask for the output of help/System information for bug reports as well. Set text:

Tell the user:

I am sorry, but I cannot reproduce the bug on my system. Please add the output of help/System Information for Bug reports as well.

Mark the bug as NEEDINFO/WAITINGFORINFO.

Importance

Importance is a tool for developers, not for bug reports. It’s developers and triagers who decide what the importance is. If a bug reporter complains about a change in importance, use this text:

Tell the user:

I am sorry, but the importance field is a tool for the developers to work with. Please do not change the importance back.

There are the following Importances:

Critical:

the bug leads to immediate dataloss. Example: a saved file cannot be opened in Krita

Grave:

shouldn’t be used, it doesn’t mean a thing

Major:

it’s a bug, but it’s kinda important.

Crash:

the bug is about a crash or an assert 1

Normal:

it’s a bug

Minor:

it’s a bug, but it’s kinda unimportant

Wish:

it’s a feature request

Task:

not used.

The main difference is between Wish and the rest: Wishes are feature requests, and don’t need immediate triaging. A wish bug is a bug that asks whether some functionality can be added to Krita, or complains that some functionality is missing.

The rest are bugs, that is, problems in Krita that can be fixed by changing Krita’s code.

However, we also get many reports that are not bugs and not wishes: reports that are basically users asking for help because they do not understand Krita or their computer, or what a file is, or that Krita isn’t the same application as Photoshop. Those reports need to be weeded out, and the status set to INVALID.

Guidance for using Importance

If you encounter a bug that reports dataloss when loading a saved file, set it to critical.

If you encounter a bug that reports a crash or an assert but is not set to crash, set it to crash.

If you encounter a report that asks for functionality that is not currently present, set it to wish.

If you encounter a report that is a user request, check whether you can reply with a link to the faq (https://docs.krita.org/en/KritaFAQ.html), and maybe a canned answer, and change the status of the bug to INVALID.

Asserts and Crashes

1

Crash or assert.

These are different things. A crash happens when Krita spontaneously stops working or hangs. An assert happens when Krita stops working because we, developers, have added some code to detect an invalid state.

Asserts are printed to the terminal or shown in a popup window. You can identify an assert by asking for terminal output, debugview output or by checking the backtrace, if there is one.

If the backtrace contains a line like:

> SAFE ASSERT (krita): "!sanityCheckPointer.isValid()" in file /tmp/nix-build-krita-4.0.0-pre2c.drv-0/krita-1b1695a/libs/ui/KisDocument.cpp, line 490

Or another mention of assert, Q_ASSERT or similar, it’s an assert, not a crash.

Canned Answers and Recognizing Common Reports

We get a lot of duplicate bug reports. Sometimes it’s clear that it’s a duplicate, and you can mark it a such. In all cases, we want to give the reporter useful information so they can solve their problems. Of course, (almost) all solutions are also in the FAQ, but just pointing people to the FAQ is often considered impolite.

So, do never reply to a bug report with:

“Just read the FAQ.”

It takes a bit of experience to recognize a bug from an often incomplete description. Here are a couple of common cases:

Cannot Save

For instance: “I cannot save/my file doesn’t get saved/it says it cannot copy the file”

This happens most often on Windows, if the user has got any security software installed that doesn’t come with Windows. Examples are Sandboxie, Totaldefender, or others. Mark the bug as NEEDSINFO/WAITINGFORINFO and add this text:

Ask the user:

Are you using Windows? If so, do you have any non-standard security software installed such as Total Defender, Sandboxie or XXX? Please make an exception for Krita in the settings, or uninstall this software. Since Windows 10, it is no longer necessary to have any security software installed other than what comes with Windows.

If the user replies that they are using extra security software, close the bug as RESOLVED/INVALID.

Broken Canvas

This happens on Windows. Symptoms will be: the canvas is black, the canvas stays blank, the canvas only updates when the user clicks outside the canvas. Mark the bug as a duplicate of https://bugs.kde.org/show_bug.cgi?id=360601, and add the following text:

Tell the user:

You probably are using a Windows system with an Intel display chip. Please update to Krita 3.3.3, which enables the Direct3D (Angle) renderer by default. If you do not want to update, check https://docs.krita.org/en/KritaFAQ.html#krita-starts-with-an-empty-canvas-and-nothing-changes-when-you-try-to-draw-or-krita-shows-a-black-or-blank-screen-or-krita-crashes-when-creating-a-document-or-krita-s-menubar-is-hidden-on-a-windows-system-with-an-intel-gpu

My stylus has an offset

This happens on Windows. Symptoms will be: the user reports that the stylus cursor has an offset or moves the cursor on another screen. Usually, the user will have a misconfigured multi-monitor system. Mark the bug as NEEDSINFO/WAITINGFORINFO and ask the user:

Ask the user:

Do you have a multi-monitor setup? If so, this is a configuration issue. Please reset your tablet driver’s configuration and Krita’s configuration (https://docs.krita.org/en/KritaFAQ.html#resetting-krita-configuration). If you have a single-monitor setup, then please calibrate your tablet.

If the user checks back and tells us the problems are solved, mark the bug as RESOLVED/UPSTREAM.

Other tablet issues

Often, the user will tell you that their tablet will work perfectly with another application. This is not relevant.

Tell the user:

Windows tablet drivers often have a special code for different applications. Whether an application works or not depends on whether the programmers have tested their driver with an application or not. Tablet issues are almost always caused by the drivers being broken.

Krita lags

The word “lag” is meaningless. Complaints about “lag” are not bug reports. However, we should help the complainer.

Mark the bug as NEEDSINFO/WAITINGFORINFO and ask the user:

Ask the user:

Have you enabled the stabilizer? Check the tool options panel for the freehand tool. Also check the other possibilities mentioned here: https://docs.krita.org/en/KritaFAQ.html#krita-is-slow

I cannot paint at all, in a particular document

The user probably created, accidentally, a tiny selection, and saved that with the document. Mark as NEEDSINFO/WAITINGFORINFO and ask them:

Ask the user:

Do you have a selection saved with that document? Use select/deselect on your image and check whether you can paint again. If not, please attach the .kra document to this bug report or make it available.

Unittests in Krita

目录

Unittests in Krita

What is a unit test is and why is it needed?

Debugging of new code

Changing/refactoring existing code

Automated regression testing

When to write a unit test?

What should unit test include?

How to write a unittest?

Krita-specific testing utils

Fetching reference images

Compare test result against a reference QImage

QImageBasedTest for complex actions

MaskParent object

What is a unit test is and why is it needed?

Wiki:

A unit test is a piece of code that automatically checks if your class or subsystem works correctly. The goal of unit testing is to isolate each part of the program and show that the individual parts are correct. A unit test provides a strict, written contract that the piece of code must satisfy. As a result, it affords several benefits 1.

Comment:

In other words unit testing allows the developer to verify if his initial design decisions has been implemented correctly and all the corner-cases are handled correctly.

In Krita Project we use unit tests for several purposes. Not all of them work equally good, but all together they help developing a lot.

Debugging of new code

Wiki:

Unit testing finds problems early in the development cycle. This includes both bugs in the programmer’s implementation and flaws or missing parts of the specification for the unit. The process of writing a thorough set of tests forces the author to think through inputs, outputs, and error conditions, and thus more crisply define the unit’s desired behavior. The cost of finding a bug before coding begins or when the code is first written is considerably lower than the cost of detecting, identifying, and correcting the bug later; bugs may also cause problems for the end-users of the software 1.

Comment:

Krita is a big project and has numerous subsystems that communicate with each other in complicated ways. It makes debugging and testing new code in the application itself difficult. What is more, just compiling and running the entire application to check a one-line change in a small class is very time-consuming. So when writing a new subsystem we usually split it into smaller parts (classes) and test each of them individually. Testing a single class in isolation helps to catch all the corner-cases in the class public interface, e.g. “what happens if we pass 0 here instead of a valid pointer?” or “what if the index we just gave to this method is invalid?”

Changing/refactoring existing code

Wiki:

Unit testing allows the programmer to refactor code or upgrade system libraries at a later date, and make sure the module still works correctly (e.g., in regression testing). The procedure is to write test cases for all functions and methods so that whenever a change causes a fault, it can be quickly identified. Unit tests detect changes which may break a design contract 1.

Comment:

Imagine someone decides to refactor the code you wrote a year ago. How would he know whether his changes didn’t break anything in the internal class structure? Even if he/she asks you, how would you know if the changes to a year-old class, whose details are already forgotten, are valid?

Automated regression testing

Ideally, unit tests should also facilitate automated regression catching (ask Jenkins [https://build.kde.org/job/calligra%20calligra-2.9%20stable-qt4/]). But at the moment some of Krita unit tests are not stable enough to do the trick. They do straightforward QImage comparisons, so the test results can depend no only on version of the libraries installed, but also on build options and even type of CPU the tests are run on. In the future we plan to split such “unstable” unit test into a separate group and don’t run them on Jenkins.

When to write a unit test?

Ideally a unit test should be written for any new class that implements some logic and provides any kind of public interface. It is especially true if this public interface is going to be used more that one client-class.

What should unit test include?

corner cases. E.g. what happens if we request merging of two layers, one of which has Inherit Alpha option enabled? What properties and composition mode the final layer should have? Answers to these questions should be given and tested in the unit test.

non-obvious design decisions. E.g. if a paint device has a non-transparent default pixel, then its `exactBounds()` returns the rect, not smaller that the size of the image, even though technically the device might be empty.

How to write a unittest?

Suppose you want to write a unittest for kritaimage library. You need to perform just a few steps:

Add files for the test class into ./image/tests/ directory:

kis_some_class_test.h

#ifndef __KIS_SOME_CLASS_TEST_H
#define __KIS_SOME_CLASS_TEST_H

#include <QtTest/QtTest>

class KisSomeClassTest : public QObject
{
    Q_OBJECT
private Q_SLOTS:
    void test();
};

#endif /* __KIS_SOME_CLASS_TEST_H */</syntaxhighlight>

kis_some_class_test.cpp

#include "kis_some_class_test.h"

#include <QTest>

void KisSomeClassTest::test()
{
}

QTEST_MAIN(KisSomeClassTest, GUI)</syntaxhighlight>

Modify ./image/tests/CMakeLists.txt to include your new test class:

...
########### next target ###############
set(kis_some_class_test_SRCS kis_some_class_test.cpp )
kde4_add_unit_test(KisSomeClassTest TESTNAME kritaimage-some_class_test ${kis_some_class_test_SRCS})
target_link_libraries(KisSomeClassTest  ${KDE4_KDEUI_LIBS} kritaimage ${QT_QTTEST_LIBRARY})
...

Write your test. You can use any macro commands provided by Qt (QVERIFY, QCOMPARE or QBENCHMARK).

void KisSomeClassTest::test()
{
    QString cat("cat");
    QString dog("dog");

    QVERIFY(cat != dog);
    QCOMPARE(cat, "cat");
}

Run your test by running an executable in ./image/test/ folder

Krita-specific testing utils

Fetching reference images

All the testing files/images are usually stored in the test’s data folder (e.g. ./krita/image/tests/data/). But there are some files which are used throughout all the unit tests. These files are stored in the global folder ./krita/sdk/tests/data/. If you want to access any file, just use TestUtil::fetchDataFileLazy. It first searches the file in the local test’s folder and if nothing is found checks the global folder.

Example:

QImage refImage(TestUtil::fetchDataFileLazy("lena.png"));
QVERIFY(!refImage.isNull());

Compare test result against a reference QImage

There are two helper functions to compare a given QImage against an image saved in the data folder.

bool TestUtil::checkQImage(const QImage &image, const QString &testName,
                           const QString &prefix, const QString &name,
                           int fuzzy = 0, int fuzzyAlpha = -1, int maxNumFailingPixels = 0);
bool TestUtil::checkQImageExternal(const QImage &image, const QString &testName,
                                   const QString &prefix, const QString &name,
                                   int fuzzy = 0, int fuzzyAlpha = -1, int maxNumFailingPixels = 0);

The functions search for a png file with path

./tests/data/<testName>/<prefix>/<prefix>_<name>.png
# or without a subfolder
./tests/data/<testName>/<prefix>_<name>.png

The supplied QImage is compared against the saved PNG, and the result is returned to the caller. If the images do not coincide, two images are dumped into the current directory: one with actual result and another with what is expected.

The second version of the function is different. It searches the image in “an external repository”. The point is that PNG images occupy quite a lot of space and bloat the repository size. So we decided to put all the images that are big enough (>10KiB) into an external SVN repository. To configure an external test files repository on your computer, please do the following:

Checkout the data repository:

# create the tests data folder and enter it
mkdir ~/testsdata
cd ~/testsdata

# checkout the extra repository
svn checkout svn+ssh://svn@svn.kde.org/home/kde/trunk/tests/kritatests

Add environment variable pointing to your repository to your ~/.bashrc

export KRITA_UNITTESTS_DATA_DIR= ~/testsdata/kritatests/unittests

Use TestUtil::checkQImageExternal in your unittest and it will fetch data from the external source. If an external repository is not found then the test is considered “passed”.

QImageBasedTest for complex actions

Sometimes you need to test some complex actions like cropping or transforming the whole image. The main problem of such action is that it should work correctly with any kind of layer or mask, e.g. KisCloneLayer, KisGroupLayer or even KisSelectionMask. To facilitate such complex testing conditions, Krita provides a special class QImageBasedTest. It helps you to create a really complex image and check the contents of its layers. You can find the best example of its usage in KisProcessingsTest. Basically, to use this class, one should derive it’s own testing class from it, and call a set of callbacks, which do all the work. Let’s consider the code from KisProcessingsTest:

// override QImageBasedTest class
class BaseProcessingTest : public TestUtil::QImageBasedTest
{
public:
    BaseProcessingTest()
        : QImageBasedTest("processings")
    {
    }

    // The method is called by test cases. If the test fails, a set of PNG images
    // is saved into working directory
    void test(const QString &testname, KisProcessingVisitorSP visitor) {

        // create an image and regenerate its projection
        KisSurrogateUndoStore *undoStore = new KisSurrogateUndoStore();
        KisImageSP image = createImage(undoStore);
        image->initialRefreshGraph();

        // check if the image is correct before testing anything
        QVERIFY(checkLayersInitial(image));

        // do the action we are trying to test
        KisProcessingApplicator applicator(image, image->root(),
                                        KisProcessingApplicator::RECURSIVE);

        applicator.applyVisitor(visitor);
        applicator.end();
        image->waitForDone();

        // check the result, and dump images if something went wrong
        QVERIFY(checkLayers(image, testname));

        // Check if undo(!) works correctly
        undoStore->undo();
        image->waitForDone();

        if (!checkLayersInitial(image)) {
            qWarning() << "NOTE: undo is not completely identical "
                    << "to the original image. Falling back to "
                    <<"projection comparison";
            QVERIFY(checkLayersInitialRootOnly(image));
        }
    }
};

MaskParent object

TestUtil::MaskParent is a simple class that, in its constructor, creates an RGB8 image with a single paint layer, which you can use for further testing. The image and the layer can be accessed as simple member variables.

Example:

void KisMaskTest::testCreation()
{
    // create an image and a simple layer
    TestUtil::MaskParent p;

    // create a mask and attach its selection to the created layer
    TestMaskSP mask = new TestMask;
    mask->initSelection(p.layer);

    QCOMPARE(mask->extent(), QRect(0,0,512,512));
    QCOMPARE(mask->exactBounds(), QRect(0,0,512,512));
}

1(1,2,3)

https://en.wikipedia.org/wiki/Unit_testing

资源

笔刷资源包

[https://github.com/Deevad/deevad-krita-brushpresets] David Revoy 笔刷库 | [https://drive.google.com/open?id=1hrH4xzMRwzV0SBEt2K8faqZ_YUX-AdyJ] Ramon Miranda 笔刷库 | [https://forum.kde.org/viewtopic.php?f=274&t=127423] 概念美术和插图笔刷库
[http://al-dy.deviantart.com/art/Aldys-Brush-Pack-for-Krita-196128561] Al-dy 笔刷库 | [https://vascobasque.com/modular-brushset/] Vasco Basqué 笔刷库 | [http://meemodraws.deviantart.com/art/Krita-Brush-Pack-311306611] Meemodraws 笔刷库
[http://stalcry.deviantart.com/art/Krita-Custom-Brushes-350338351] Stalcry 笔刷库 | [https://forum.kde.org/viewtopic.php?f=274&t=125125] Wolthera 笔刷库 | [http://nylnook.com/en/blog/krita-brushes-pack-v2/] Nylnook 笔刷库
[http://hushcoil.tumblr.com/kritabrushes/] Hushcoil 笔刷库 | [https://github.com/raghukamath/krita-brush-presets] Raghukamath 笔刷库 | [https://github.com/GDquest/free-krita-brushes/releases/] GDQuest 笔刷库
[https://www.deviantart.com/iforce73/art/Environments-2-0-759523252] |  |

纹理资源包

[https://www.davidrevoy.com/article156/texture-pack-1] David Revoy 笔刷库 | [https://www.davidrevoy.com/article263/five-traditional-textures] David Revoy 笔刷库

外部教程

[https://www.udemy.com/learn-to-create-pixel-art-from-zero/?couponCode=OTHER_75]

Simón Sanchez 在 Udemy 上的“从零开始学像素画”课程

用户制作的 Python 插件

如需安装和管理你的插件，可查阅 如何制作 Krita Python 插件 页面的第二小节“让 Krita 识别你的插件”。

直接橡皮擦插件

http://www.mediafire.com/file/sotzc2keogz0bor/Krita+Direct+Eraser+Plugin.zip

数位板按钮工具面板

https://github.com/tokyogeometry/tabui

画布浮动显示快捷键

https://github.com/qeshi/henriks-onscreen-krita-shortcut-buttons/tree/master/henriks_krita_buttons

曲线文件格式导出

https://github.com/chartinger/krita-unofficial-spine-export

GDQuest - 设计工具

https://github.com/GDquest/Krita-designer-tools

AnimLayers (通过图层绘制动画)

https://github.com/thomaslynge/krita-plugins

作品版本控制 (使用 GIT)

https://github.com/abeimler/krita-plugin-durra

Krita 插件生成器

https://github.com/cg-cnu/vscode-krita-plugin-generator

Bash 操作 (兼容 OSX 和 Linux)

https://github.com/juancarlospaco/krita-plugin-bashactions#krita-plugin-bashactions

参考图像工具面板 (旧版)

https://github.com/antoine-roux/krita-plugin-reference

将图片发布到 Mastadon

https://github.com/spaceottercode/kritatoot

Python 文本编辑器自动补全

https://github.com/scottpetrovic/krita-python-auto-complete

你发现了我们错过的好东西吗？

你有自己制作的资源想和其他画手分享吗？请到论坛或者聊天室与我们讨论将它们添加到此页面的事宜。

索引

符号 | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | Z | 从 | 保 | 全 | 关 | 剪 | 反 | 另 | 在 | 复 | 导 | 平 | 打 | 扩 | 撤 | 收 | 文 | 新 | 显 | 比 | 清 | 渲 | 粘 | 羽 | 转 | 边 | 退 | 选 | 重

符号

*.bmp

*.csv

*.exr

*.gbr

*.gif

*.gih

*.jpg

*.kpl

*.kra

*.ora

*.pbm

*.pdf

*.pgm

*.png

*.ppm

*.psd

*.svg

*.tif

*.tiff

--canvasonly

krita 命令行选项

--dpi <dpiX,dpiY>

krita 命令行选项

--export

krita 命令行选项

--exportfilename

krita 命令行选项

--fullscreen

krita 命令行选项

--nosplash

krita 命令行选项

--template templatename.desktop

krita 命令行选项

--workspace Workspace

krita 命令行选项

A

About

Addition(Blending Mode)

Additive Subtractive

Advanced Color Selector

Airbrush, [1]

Al.Chemy

Allanon

Alpha Darken

Alpha Inheritance, [1], [2]

Alpha Lock

Angle

Animation, [1], [2], [3], [4], [5], [6], [7]

Animation Curves

Animation Playback

Arcus Tangent

Artistic Color Selector

ASC CDL

ASL

Audio

Author Profile

Automatic Healing

Autosave

Axonometric

B

Backtrace

Basic Concepts

Basic Smooth

Behind

Bezier Curve, [1]

Bit Depth

Bitmap

Bitmap Fileformat

Black and White

Blending Mode

Blending Modes!

Blur

BMP

Brightness, [1], [2]

Bristle Brush Engine

Brush

Brush Engine, [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14]

Brush Mask, [1]

Brush Preset, [1]

Brush Settings, [1]

Brush Tip

Brush tip

Brushes, [1]

Bucket

Bug

Bumpmap

(Blending Mode)

Bundles

Burn

burn

C

Calibration

Calligraphy

Canvas Border

Canvas Graphics Acceleration

Canvas Input Settings

Canvas Only Mode

Canvas Projection Color

Chroma

Circle, [1]

Clipping Masks, [1]

Clone Brush Engine

Clone Layer

Clone Tool

Close

Color, [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15], [16], [17], [18], [19]

Color Adjustment Curves

Color Balance

Color Bit Depth

Color Burn

Color Channels, [1]

Color Dodge

Color Management, [1]

Color Mixing, [1], [2]

Color Models

Color Selector, [1], [2], [3], [4], [5], [6], [7]

Color Sliders

Color Smudge Brush Engine

Color Space

Color Spaces

Color to Alpha

Colorize Mask

Colors

Combine Normal Map

Comma Separated Values

Command Line

communication

community

Compass

Compositions

compression

Contiguous Selection

Contrast

Convert

Convert Color Space

Convert raster selection to vector selection.

Convert to shape

Copy

(Blending Mode)

(Sharp)

Copy Blue

Copy Green

Copy Layer

Copy Red

Create Template from image

Crop

Cross Channel Color Adjustment

CSV

Cursor

Curve Brush Engine

Curves Filter

Cut

(Sharp)

Cut Layer

D

Darken

Darker Color

Debug, [1]

Deep Color

Deform

Deform Brush Engine

Desaturation

Difference

Digital Color Mixer

Dimetric

Display

Dissolve

Dithering

Dockers

Document

Dodge, [1]

Driving Adjustment by channel

Dual Brush

Dyna

E

Edge Detection

Edit

Ellipse, [1]

Elliptical Select

Emboss

EOTF

Equivalence

Erase (Blending Mode)

Exclusion

Experiment Brush Engine

Export, [1]

EXR

External File

Eyedropper

F

FAQ

File Dialog

File Layers

Fill, [1]

Fill with Background Color

Fill with Foreground Color

Fill with pattern

Filter Brush Engine

Filters, [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11]

Finger

Flat Color

Flatten

Floating Point Color

Flow

FPS

Frame

Framerate

Freehand, [1], [2]

Freehand Brush

Frequently Asked Questions

G

G'Mic

Gamma

Gamma Dark

Gamma Light

Gaussian Blur

GBR

Generator

Geometric Mean

Getting started

GIF

GIH

Gimp Brush

Gimp Image Hose

Glossing

Gradient, [1], [2]

Gradient Map

Gradients

Grain Extract

Grain Merge

Gray

Greater (Blending Mode)

Grid, [1], [2], [3], [4]

Grid Brush Engine

Groups

Guides, [1], [2]

H

Hairy Brush Engine

Halftone, [1], [2]

Handbook

Hard Light

Hard Mix

Hard OVerlay

Harmony Brush Engine

Hatching, [1]

Hatching Brush Engine

HD Index Painting

HDR

HDR Fileformat

Height Map, [1]

High Dynamic Range

Histogram, [1]

History

Hue, [1], [2]

I

ICC Profiles

Image, [1]

Image Hose

Import, [1]

Import Animation Frames

Indexed Color

Installation

Instant Preview

Intensity, [1]

Interpolation

Invert

Isometric

Isometric Grid

J

jpeg | jpg

K

Kinetic Scrolling

KPL

KRA

Krita Archive

Krita Palette

krita 命令行选项

--canvasonly

--dpi <dpiX,dpiY>

--export

--exportfilename

--fullscreen

--nosplash

--template templatename.desktop

--workspace Workspace

L

Label

Lag, [1]

Language

Layer Effects

Layer FX

Layer Style, [1]

Layer Styles

Layers, [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15]

Lazybrush

Levels Filter

Lightness, [1], [2]

Line

Linear

Linear Burn

Linear Color Space

Linked Clone

Liquify

Load

Locked Brush Settings

Look and Feel

Look Up Table

lossless

lossy

Luma, [1]

Luminosity, [1]

LUT Management

M

Macro

Magic Wand

Mandala

Masked Brush

Masks, [1], [2], [3], [4], [5], [6]

Maths

Maximum Brush Size

Measure

Memory Usage

Metadata, [1], [2], [3]

Metamerism

Mirror, [1], [2]

Move

Multibrush

Multithreading

N

Navigation, [1]

Negative, [1]

New

New File

No Smoothing

Normal (Blending Mode)

Normal Map, [1], [2], [3]

Normalize

O

OCIO, [1]

Offset

Onion Skin, [1]

Opacity

Open

Open Existing Document As New document

Open Raster Archive

OpenEXR

OpenGL

Optimising Images

ORA

Orthogonal Grid

Orthographic

Outline Select

Overlay (Blending Mode)

Overview

P

Paint Layer

Painting Assistants, [1], [2]

Paintop Preset

Paintop Presets

Painttool Sai

Palettes

Pan, [1]

Parallel

Particle Brush Engine

Passthrough Mode, [1]

Paste

Paste into new image

Paste Layer

Path, [1], [2]

Pattern

Patterns, [1], [2]

PBM

PDF

Pen, [1]

Performance, [1]

Perspective, [1], [2], [3]

Perspective Projection

PGM

Photoshop

Photoshop Document

Pixel Brush Engine

Play/Pauze

Plugin, [1]

png

Polygon, [1]

Polygonal Selection

Polyline

Pop up palette

Pop-up Palette, [1]

portable network graphics

PPM

Preferences, [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11]

Presets

Pressure Curve

Prewitt

Profiling

Projection, [1], [2], [3]

PSD

Python, [1], [2]

Python Scripting, [1], [2]

Q

Quick Brush Engine

R

Ractangle

RAM

Random Noise

Raster, [1]

Ratio

Real Color

Rectangle

Rectangular Selection

Redo, [1]

Reference, [1]

Render Animation

Resize

Resources, [1], [2], [3], [4], [5], [6]

Reusable Vector Shapes

RGB Curves

Rotate

Rotational Symmetry

S

Sai

Saturation, [1], [2], [3]

Save, [1]

Save incremental Backup

Save incremental version

Scalable Vector Graphics Format

Scale

Scene Linear

Scene Linear Painting

Scene Referred

Scripting, [1]

Scripts, [1]

Scumbling

Select from Color Range

Selection, [1], [2], [3], [4], [5], [6], [7], [8], [9]

Selections

Sessions, [1]

Settings, [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11]

Shape Brush Engine

Shape Edit

Shape Selection

Sharpen

Shortcuts

Show Global Selection Mask

Similar Selection

Sketch Brush Engine

Slope Offset Power Curves

Small Color Selector

Small Tiles

Smart Patch

Smudge, [1]

Snap, [1]

Sobel

Softproofing, [1]

Sound

Source Over

Spacing

Specific Color Selector

Speed

Split Channels

Spray Brush Engine

Stabilizer

Stacked Brush

Straight Line

Stroke

Stroke Selected Shapes

Stroke Selection

Subwindow Documents

Sumi-e

SVG

SVG Symbols

Symmetry, [1]

T

Tabbed Documents

Tablet, [1]

Tablet UI

Tablets, [1], [2]

Tagged Image File Format

Tags

Tangent Normal Brush Engine

Technical Drawing

Template, [1], [2]

Text

Texture

Theme

Themes

Threshold

TIF

TIFF

Tiles

Timeline, [1]

Tone Response curve

Toolbar

Tools, [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11], [12], [13], [14], [15], [16], [17], [18], [19], [20], [21], [22], [23], [24], [25], [26], [27], [28], [29], [30], [31], [32], [33], [34], [35], [36], [37]

Touch

Transfer Curve

Transform, [1], [2], [3], [4], [5]

Transparency, [1]

Transparency Checkers

Trim, [1]

Tweening

U

Undo, [1]

V

Value, [1], [2] Variable Width Stroke Vector, [1], [2], [3], [4], [5], [6], [7], [8], [9], [10], [11] | Vector Library View, [1], [2] Viewing Conditions

W

Wavelet Decompose

Weighted Smoothing

Window, [1]

Window Layouts

Workspace

Workspaces

Wrap around mode

Z

Zoom, [1]

从

从当前图像创建副本

保

保存

全

全部选择

关

关闭 | 关闭全部

剪

剪切

反

反选, [1]

另

另存为

在

在光标处粘贴

复

复制 | 复制已合并

导

导出

平

平滑

打

打开 | 打开最近一项

扩

扩张选区

撤

撤销

收

收缩选区

文

文档信息

新

新建

显

显示选区

比

比例

清

清除

渲

渲染动画

粘

粘贴

羽

羽化选区

转

转换形状为矢量选区

边

边界选区

退

退出

选

选择不透明度

重

重做 | 重新选择

Krita 笔刷技巧是我们的 Tumblr 账户 krita-foundation.tumblr.com 根据用户提问制作的笔刷选项教程的存档。

主题：

笔刷技巧：动态笔刷

笔刷技巧：散景高光

笔刷技巧：焦散线

笔刷技巧：绒毛和草丛

笔刷技巧：头发

笔刷技巧：轮廓线

笔刷技巧：彩虹笔刷

笔刷技巧：雕塑笔触