The InkSplit GIMP Plug-In

Hello! Today we're going to be taking a look at the InkSplit script that I've created for the free image editing software, GIMP. You can find a link to everything mentioned here in the description.

The purpose of this script is to prepare your images for the screenprinting process by extracting each color to its own layer. My script relies on the GIMP image editor, so you'll want to start by downloading and installing it from GIMP.org. If you're on Linux, you should have it available through a package manager of your choice.

Do note that the script is currently in very early development and many of these instructions may become out of date in time. I will do my best to update this tutorial with major feature changes as it seems necessary.

To begin, you'll need to install the script. If you've already done this, go ahead and skip to **here** to get started with the script. This varies from one operating system to the other, but I will do my best to provide a general approach that should get you started.

First, you will need to install the `colormath` library using GIMP's built-in Python. You can do this by opening GIMP, then going to `Filters > Python-fu > Console`. Once here, you'll need to enter the commands:

```python
import sys
print(sys.executable)
```

This will give you the path where Python is running. You'll then need to open a terminal (or Command Prompt) and navigate to this directory. In Windows, you can Shift + Right-Click in the folder and choose `Open PowerShell Here`. If you are running this as a Flatpak under Linux, you will need to run the following command to access pip inside the package:

```bash
flatpak run --command=bash org.gimp.GIMP
```

You'll need to make sure pip is installed and up to date, then you can install the `colormath` library:

```bash
python -m ensurepip
python -m pip install --upgrade pip
python -m pip install colormath
```

Next, I recommend installing the Pantone color palette provided by @denilsonsa. To do this, you'll need to find the Palettes folder. This can be found by opening GIMP and going to `GIMP > Preferences > Folder > Palettes`. On Linux and Windows, this will be under `Edit > Preferneces`. There may be multiple entries, but in general, it will be the one at the top marked with an `X`. There is a chance this folder does not exist and you will need to create it.

Once created, simply place the [Pantone.gpl](https://github.com/denilsonsa/gimp-palettes/blob/master/palettes/Pantone.gpl) file in the Palettes folder.

Lastly, we'll want to install the script itself. Start by closing the repository to a working directory:

```bash
git clone https://github.com/otacon239/inksplit.git
```

Move the insplit folder (not the full git clone) into the plug-ins directory. If you are using a Linux Flatpak, you may need to give it file access to your .config folder and add the directory manually in preferences.

If you are on Mac or Linux, don't forget to make the script executable:

```bash
chmod +x inksplit.py
```

Now that we have the script installed, if you haven't already, go ahead and restart GIMP.

I'll be walking you through 3 different examples today and explain some challenges you might run into with each of them. Let's start with a relatively simple one.

This is a 2-color logo that I imported from a vector file at the correct size. If we zoom in, we'll see that anti-aliasing has been disabled, so the colors are sharp and clear. This is an ideal starting point. I've also chosen an image with transparency built in and clearly separate colors. There is also no extra blank space around the image.

All of these details can play a factor into the final result. All of these differences are what my script helps to control in the process of extracting colors.

With the script installed, we'll go the Filters > InkSplt Color Separations. Here you will be presented with the full list of options. It is planned to split these setting sinto a more managable format, but for now, we'll slowly focus on more advanced settings as we go. I'll start by displabling some of the automatic features and walk you through the features that will affect only this image.

For this image, I'll be letting the script automatically extract colors by using the Auto Color Match. This works alongside the Colors in Image option to attempt to automatically choose the colors in the image.

Canvas Width, Height, Margin and DPI are all related to the output to the physical screen printer. You may need to do some experimenting with these values to get a proper alignment depanding on your output.

We'll skip to print location setings. The print location will determine the horizonal offset direction for prints. Keep in mind that a "left" print location refers to "left chest", and will show on the right during processing.

Max width and height work in tandem to make sure they both respect the maximum. The best way to think of this is that it will always respect whichever scales the image smaller. 0 is treated as no change. The image will scale up if necessary, but will notify if needed.

Font, size and spacing are all related to the registration mark customization.

At this time, Export does not work, but I hope to get it working in the near future.

The last two options are for automatic color matching. Since we're automatically choosing colors, this option will be useful for naming the layers, so we'll enable it.

Now, when we press OK, the script will take our two colors and place them on their own layers. Each layer will be transparent with solid black pixels and registration marks will be added at the top of the canvas, relative to the vertical offset in the settings.

If we unhide the "ORIG" layer, and hide the color layers, we can see an idea of how the design should result. This shouldn't be used as a ground truth for results, as I'll show later, but can be used for general reference.

You can then export these to the format for your printer by enabling the registration and color layers together, one at a time and saving the layers individually.

This is enough to get you started with basic designs. Let's move onto the second example.

Here, I've used my own logo as the example. This requires a bit of a different approach compared to a flat-color logo. I've also purposely made this a bit of a low-quality starting point to show how you can prep your image for the script.

For starters, the image is on a white background, rather than transparency. Let's start by removing the white background with the wand tool. Next, we'll open the script and change a few options. Now re-open the script andÂ