pixel-borders
pixel-borders copied to clipboard
pixel borders plugin for Krita
![]()
Pixel Borders

A plugin that helps you to make pixel-art quicker. This uses
uses Krita's Python API, PyQt5 and Python's built-in modules
to make borders for your pixel-art characters.
Pixel Bordersperforms several operations to make this task easier, and it works on paint layers and group layers, even if these have key-frames on the timeline.
Content Table
- Introduction
- An example
- Features
- Improve your workflow
- Group Layers?
- Animated Layers?
- Limitations
- How to Use it
- Quick Way
- Custom Border
- Even Quicker Way
- Useful Recipes
- Get the plugin!
- Download with Git
- Download as zip
- Enable it on Krita!
- System Requirements
- Social Media
- License
Introduction
Sometimes, when I'm drawing a pixel-art animation, I try to add borders to the characters in the scene to get a nice videogame style. These look very nice but They're hard to do when There's a lot of key-frames and layers linked to a single character.
It takes over 3 hours to complete this effect manually on a small-sized animation. That's boring and error prone: I remember I had to make the effect from start when I forgot a single step on the frame 50 of an animation with 200 key frames on its timeline!
That was one of many reasons why I started this project. It was a simple
script at begining, but I wasn't satisfied with it: it was slow and
didn't work very well on animated layers, so I keep working on it,
fixing its flaws at first glance. Then I added a GUI to use it in a
more comfortable way, also its core was improved and...
The rest of this tale is on the commits of this repository.
- I just took that idea and made it comfortable to use. -
With Pixel Borders you can add borders of 1px width, or make
a smoother one adding more steps into the border recipe. Maybe, you
could Add colors to the corners of a character or even make a kind
of fractal as a border.
Pixel Bordershas been developed among several months in my free time and now, It's finally available here!
Go Top
An example
| No Borders | Borders | Recipe |
|---|---|---|
any-neighbor:1 + corners:1 + any-neighbor:1 |
Features
-
This plugin uses
Krita's Python APIand some facilities provided byPyQt5package to perform its tasks, so there's no need to install anotherpythonpackage for Krita. -
Also, it's compatible with dark and light themes.
-
Undo actions are supported since
Krita 4.4.x -
It includes some methods to make recipes for the new borders which can be used on the
quick modeandcustom mode:-
any-neighbor: The pixel becomes opaque when there's at least one opaque pixel next to it.
-
corners: The pixel becomes opaque if it has one vertical and one horizontal opaque neighbor.
-
force: same as
any-neighborbut faster. -
not-corners: Complement of
cornersmethod. Useful to make rough borders. -
strict-horizontal: The pixel becomes opaque if it has only horizontal opaque neighbors.
-
strict-vertical: The pixel becomes opaque if it has only vertical opaque neighbors.
-
| Method | Result |
|---|---|
None |
|
any-neighbor |
|
corners |
|
not-corners |
|
strict-horizontal |
|
strict-vertical |
Improve your workflow
Play with the different results that can be obtained using
Pixel Borders. See how quick this will be achieved with it.
Click the Use Previous recipe button to repeat the last recipe used.
Group Layers?
Yes, it works with them. Select the Group layer, and use this plugin just like a normal filter being used on a paint layer.
Animated Layers?
Yes, it works on regular animated layers and on group layers with animated layers inside.
Limitations
Unfortunely, this doesn't work well with:
- Filter masks that modify the bounding box of their
parent layer.
That's because these special layers doesn't provide any updated values
of their parent's bounding box. It will be necessary scan the whole canvas
to known exactly how that bound is, and it drops down the efficiency reached
by using the current pixel_borders.core.
If the filter mask doesn't modify the bounds of its parent layer,
Pixel Borderwill work fine with it.
Go Top
How to Use it
In Krita:
- Click on
tools > Scripting > Pixel Borders. - Write a name for the new Border.
- Choose the Foreground or the Background color currently used.
- Choose between the quick mode and the custom mode.
- Fill out the remaining information.
- Wait until The new border is done.
- Press Ok.
Quick Way
Quick mode has been chosen. Useful to get a simple border.
Select the method this plugin will use, then press the number next to it and set the width of the new border.
Custom Border
Custom mode has been chosen. Make complex recipes with it.
There will be a single method, click on it to select another and then press the number next to it and set the width.
| Buttons | Description |
|---|---|
Add |
Press to add a new method at bottom. |
Remove |
Press to remove the method at bottom. |
Clear |
Press to delete all the methods except the first one. |
Even Quicker Way
Previous Border button has been pressed.
It repeats the previous recipe, applying it on the current selected Layer. If that Layer has key-frames, it will make animated borders.
Useful Recipes
| Name | How to do it |
|---|---|
| Classic Borders | Quick mode + any-neighbor:1 |
| Smooth Borders | Custom mode + any-neighbor:1 + corners:1 + any-neighbor:1 |
| Rough borders | Custom mode + any-neighbor:1 + not-corners:1 |
| Fuzzy | Quick mode + not-corners:5 or greater |
| Vertical explosion | Quick mode + strict-vertical:10 or greater |
| Horizontal explosion | Quick mode + strict-horizontal:10 or greater |
Go Top
Get the plugin!
Krita uses a specific folder to load its Plugins. It is
pykrita/and it's in the folder~/.local/share/krita/on Linux, and%appdata%\krita\on Windows.
Download with Git
- Open a terminal.
- Go to your
pykrita/folder. - Clone this repository (I recommend to use the lastest release).
git clone https://github.com/sGaps/pixel-borders.git pixel-borders/
- Copy the
.desktopfile frompykrita/pixel-borders/topykrita/.
cp pixel-borders/pixel-borders.desktop pixel-borders.desktop
Download as zip
- Go to the release snippet of this repository.
- Download the lastest compressed file (
.tar.gz, or.zip) - Extract the folder inside the
zip(named pixel-borders*) to yourpykrita/folder. - Rename the new folder as
pixel-borders. - Copy the file
pixel-border.desktopfrompykrita/pixel-borders/topykrita/.
After following the previous steps, the folder hierarchy should look like this:
![]()
Go Top
Enable it on Krita!
After Get the Plugin:
- Open Krita.
- Go to
Settings > Configure Krita > Python Plugin Manager - Search the row
Pixel Borders by Gapson the list at right. - Check its box and restart Krita.
System Requirements
| Minimum (tested) | Recomended |
|---|---|
| Krita 4.3.0 | Krita 4.4.x |
| Python 3.6 | Python 3.9 |
| PyQt5 5.12.x | PyQt5 5.15.x |
Tested on
CPU RAM Krita HDD Speed Pentium IV + 1.7 GiB 4.3.0, 4.4.2 7200 RPM i3 * 2.0 GiB 4.4.2 5200 RPM
Detailed CPU Info + Intel Pentium IV 630 HT (3.0 Ghz) * Intel i3 380M (2.53 Ghz)
Go Top
Social Media
Gaps | sGaps | ArtGaps