arrow brushes with GIMP

created onJuly 14, 2022

creating arrow brushes for technical documentation with GIMP and draw.io

For screenshots in documentation, I often need arrows to point to the area of interest in the screenshot. This is where brushes in GIMP come in handy. Unfortunately, the arrow brushes I found on the web are more suitable for artistic purpose but what I want is just some simple, clear and straight arrows.

draw.io offers some arrows suitable for technical documentation (unfortunately, you can’t use draw.io to put some arrows into a screenshot). So I drew some arrows in draw.io, exported the diagram to PNG with transparent background and created some arrow brushes in GIMP.

Here’s a simple walkthrough how to create arrows as GIMP brushes with draw.io and GIMP.

prepare the arrows in drawio

Create one or arrow types in drawio. You don’t have have to create the differenet versions like pointing left, pointing right, pointing up etc., here, as this is easier done in GIMP. If you also want to create diagonal arrows later in GIMP leave enough space between the arrows so we can rotate them in GIMP.


Export the diagram with the arrows as PNG with tranparent background. If you also want diagonal arrows, make sure that Page is selected for size:

prepare the base image for the horizontal /vertical arrows in GIMP


Open the image you created in the step above with Gimp and select the region around the arrow. Once again, if you also want diagonal errors, select a region wide enough so the arrow can be rotated:


Enter or select Edit, Paste as, New Image from the menu. Now we have a base image from which to create the brushes:


Select Image, Autocrop Image from the menu. The arrow image is now cropped to the borders of the arrow:

export the horizontal /vertical arrows from the base image


Export the image in GBR (GIMP brush) Format. Enter the description in the field description. This decription will be shown later in the Tool Options pane of the Toolbox window. The spacing value is not relevant here, you can leave it at the default of 10:


You can now flip the base image horizontally, vertically and/or rotate it 90° or 180° from the menu with Image, Transform. Doing so you can create variants of the brush just created with the arrow pointing right, up and down.

prepare the base image for the diagonal arrows, export the diagonal arrows

Now for the diagonal arrows. You can’t rotate a image in GIMP with values other than 90° or 180°. To rotate an image for i.e. 45°, you have to rotate the layer. You can do that with Layer, Transform, Arbitrary Rotation and providing the angle. If you do that with image that has been cropped to the arrow borders, the result will look like this:


Obviously, this is not what we want. In the base image, hit until the cropping is undone:


Now you can rotate the layer by 45° and then autocrop the image to the borders of the arrow. This is the base image for the diagonal arrows, pointing up-left, down-left, etc. Again, export the arrows made from this base image in GBR format.

copy the GIMP brush files to their destination

After you have done all versions of the arrow you want, copy the resulting .gbr files to either:

  • the GIMP config folder in your home directory:
  • the GIMP share folder. It depends on where the share folder is in your distribution, but is a good bet. Put the arrow brushes into the directory here.

restart GIMP and use the arrow brushes

Restart GIMP. In the Tool Options window, you will see the new brushes now in the Tool Options pane:


If you view the arrow brushes as a list in the Tool Options pane, the arrows will be listed with the description you entered when you exported the arrow into GBR format:


GIMP seems to scale the brushes down. You see that if you check the size of a brush in the Tool Options pane:


The original size of the brush is 60 pixels high. You can use the brush in its original size by clicking on the button right to the site display (the button with the tooltip Resize brush to brush’s native size):

reference

Thomas Boldt, How to Make Your Own Brushes in GIMP