With recent GIMP version 2.10, photoshop .abr-Brushes cannot be loaded within GIMP anymore. I found the following way to batch convert the photoshop brushes to PNGs and then to GIMPs native .gbr-brushes.
Step 1: Convert ABR to PNG using abrMate
For creating the PNGs there is already a tool available called abrMate. Download it and open an .abr-File and click “Export all open Brushes to PNG”.
Step 2: Python-Fu Script to convert PNG to GBR
The below code can be used in Python-Fu to convert all the PNGs in a folder into GIMP’s brush format “.gbr”.
- Copy the below code, adjust the variables:
- source_folder: Path of the input folder
- dest_folder: Path of the output folder
- Open Gimp and go to “Menubar >> Filters >> Python-Fu >> Console”.
- Copy your adjusted code into the console and hit enter. The files should be converted accordingly.
from gimpfu import *
import os
def convert_png_to_gbr():
source_folder = "C:\Temp\PNG"
dest_folder = "C:\Temp\GIMPBrushes"
for filename in os.listdir(source_folder):
print "Convert File: "+filename
img = pdb.gimp_file_load(source_folder+"/"+filename,filename)
pdb.file_gbr_save(img, img.layers[0], dest_folder +"/"+ filename+".gbr", filename, 100, filename)
convert_png_to_gbr()
Troubleshooting
- Some special characters like “äöü_-” and whitespace in the path can cause the script to fail.
- The script will fail when one of the folders doesn’t exist, create both before running the script.
¿Cómo sería el codigo para convertir los archivos png a escala de grises antes de convertirlos a archivos gbr?
Google traductor:
¿What would the code be like to convert the png files to grayscale before converting them to gbr files?
I don’t know the code for that, but this website might help you:
https://onlinepngtools.com/convert-png-to-grayscale
Google Traductor:
I already found a way to convert them to grayscale and it is with Bimp (a Gimp plugin (works in Gimp 2.10)), I recommend you take a look at the plugin. With abrMate, Bimp and the python code you mentioned all my problems of converting to Gimp brushes were solved. Thank you very much bro.
Here is the creator’s page for downloading Bimp:
https://alessandrofrancesconi.it/projects/bimp/
There are more plugins and they explain why they work here:
https://tech4fresher.com/best-gimp-plugins-and-filters/
https://www.ytechb.com/best-gimp-plugins/
https://www.viralhax.com/gimp-plugins/
Good that you found a solution for the problem.
Thanks as well for the links.
That’s amazing. Thanks for this post.