How to modify multiple images in terminal?

Why gimp? Try imagemagick package. It's a great command line image processor. In your case you can use it like:

convert -negate src.png dst.png

To modify multiple files at once, e.g.

img_path=./path/to/imgs
img_results=./path/to/imgs/results
mkdir -p $img_results
for img in ${img_path}/*;
    do 
    convert -negate $img ${img_results}/${img#./*};
done

The exact method may depend on how you source your paths.

Here's an actual example...

$ for img in ./png-64/*; do echo convert -negate $img results/${img#./*}; done
convert -negate ./png-64/arrow-block.png results/png-64/arrow-block.png
convert -negate ./png-64/arrow-block-rotated.png results/png-64/arrow-block-rotated.png
convert -negate ./png-64/arrow-shrink.png results/png-64/arrow-shrink.png

To convert a batch of images, the fastest and shortest way I know is to use the following ImageMagick command:

mogrify -negate *.jpg

N.B. Change image format accordingly and make sure you have a copy of the original images.