Unpack this file to your GIMP folder, usually %UserProfile%/.gimp-2.8 on Windows.
It contains script itself and a reference palette, which is a palette where mandatory Bootypedia colors are in place, and other slots are filled with #B00B15
When you run Gimp, there will be "Make pedia-compatible" option in Images menu, and it does just that with current image. It will ask you for reference palette and filler color, but they are set right by default, so you can just press OK.
Internally it does pretty much what Meridian describes in this
https://openxcom.org/forum/index.php/topic,4957.msg72548.html#msg72548 post.
UPDATE: 1.0.1 version. Fixed couple of bugs, found thanks to Escavel and Solaris Scorch. One bug was that first color in reference palette was wrong, other was that script failed when there were too few colors in image. Both are fixed