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 throughout the tutorial 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 Example 1 to get started with the script. This varies from one operating system to the other, but here is 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: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: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: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 > Preferences
. 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 file in the Palettes folder.
Lastly, we'll want to install the script itself. Start by closing the repository to a working directory: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: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.
To start with a simple example, here is a 2-color logo that I imported from a vector file and it is already sized for a 300 DPI print. If we zoom in, we'll see that anti-aliasing was disabled on import, so the colors are sharp and clear. This is the ideal starting point. I've also chosen an image with transparency built in and clearly defined colors. You'll also note this example also no extra margin 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.
Example 1: Flat Logos
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.
Example 2: Logo Prep and Gradients
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. Now, we'll need to generate a color palette so the script knows what colors to use for the gradient. The Auto Color Match works for flat colors, but will often produce a poor result otherwise.
In the best case, you'll be able to get the exact hex or Pantone values from your client and you can simply create the color pallete from this as I've done here. Otherwise, you'll need to make your best jusdgement and pick the colors from the image manually. There's far too much nuance to get into what are the best colors to choose here, so we'll continue on.
Let's make some changes to our settings. We'll start by disabling Auto Color Match and setting the pallete to our custom one. Next we'll enable Dithering and Autocrop. Since our colors are already labelled within the palette, we can also disable the Auto Color Match.
Now let's go ahead and process with these changes. Let's take a look at a few things. First, you'll notice when we zoom in that none of these layers have any transparency applied, even with the gradients. This is the purpose of the dithering. This allows the colors to blend smoothly while also keeping them from blending directly.
It's also worth noting how cleanly the colors were able to break down as they were specified ahead of time. For comparison, this is the result of an automatic color match with this same logo.
Example 3: Photographs
For our final example, we'll be using a full-color photograph. I've already done some prep work to isolate the subject. While you can technically print a full-size photograph, skintones are a significant challenge to print. You will want as many colors as possible devoted to skintone to give a convincing result. I've created a custom palette for this, which you can grab here. The palette only has 5 colors, but more intermediate colors can be added for better detail or for other background elements.
Most of our options stay the same with a few exceptions. We'll want to enable the Alpha Dithering option. We also want this to be a full front print, so we'll adjust our sizing options and process this.
We can now see that it's broken it down into some very detailed layers. From here, it should be a simple matter of exporting your layers and sending it to your printer. For complex prints like these, the most difficult part will be prepping the screen itself and performing the color match.
Final Thoughts
Hopefully this gives you enough of an introduction to InkSplit to start producing your own color separations! Keep in mind this process is still very experiemental and there is still lots of room for improvement. You will likely have to experiment with a few designs in order to dial in your specific approach, but this should significantly improve processing time and consistency. Feel free to reach out with any questions or contribute your own improvements to the GitHub project.
Thank you for taking the time to learn the InkSplit GIMP plug-in and I hope to see some