Given the recent trend of Facebook avatars incorporating the rainbow flag, to reflect the recent Supreme Court of The United States' ruling that gay marriage is legal nationwide (in the US), I was trying to add such a gradient to GIMP (version 2.8).
The gradient:
was found at this page: https://openclipart.org/detail/220824/original-gay-pride-flag and is an SVG file, containing the following:
<?xml version="1.0" encoding="UTF-8"?>
<svg xmlns="http://www.w3.org/2000/svg" width="600" height="400">
<rect width="600" height="400" fill="#8e008e"/>
<rect width="600" height="350" fill="#400098"/>
<rect width="600" height="300" fill="#00c0c0"/>
<rect width="600" height="250" fill="#008e00"/>
<rect width="600" height="200" fill="#ff0"/>
<rect width="600" height="150" fill="#ff8e00"/>
<rect width="600" height="100" fill="#f00"/>
<rect width="600" height="50" fill="#ff69b4"/>
</svg>
I placed this in the following directories, first:
C:\Program Files\GIMP 2\share\gimp\2.0\gradients
And, secondly, in:
C:\Users\David\.gimp-2.8\gradients
I've refreshed the gradients (within the GIMP program), and closed – then reopened – the program.
Refreshing the gradients has produced the following error message in a pop-up alert-type window:
Failed to load data:
No linear gradients found in 'C:\Program Files\GIMP 2\share\gimp\2.0\gradients\Gay_flag_8.svg'
and:
Failed to load data:
No linear gradients found in 'C:\Users\David.gimp-2.8\gradients\Gay_flag_8.svg'
I'm – clearly – missing something, but I have no idea what I'm doing wrong, or not doing at all.
Following advice, from gronostaj's answer, I've opened the SVG file in GIMP and, when offered the import options of:
Import paths, and Merge imported paths
I've checked both, and then saved the file – as a .xcf
file – and then exported as a .pat
file. This exported file was then placed in the appropriate directory:
C:\Users\David.gimp-2.8\gradients\
With the file-name of RainbowFlag.pat
.
I then tried to refresh the available gradients, which produces this error:
GIMP Message
Failed to load data:
Fatal parse error in gradient file 'C:\Users\David.gimp-2.8\gradients\RainbowFlag.pat': Not a GIMP gradient file.
tl;dr: how do I add a new gradient, of SVG type, to GIMP 2.8?