Gavin R. Putland,  BE PhD

Wednesday, March 26, 2014 (Comment)

How to invert colors in a selected region with GIMP

Twice in recent days, I needed to invert the colors in a rectangular region of a graphic (changing the region from white-on-black to black-on-white). The difficulty was that GIMP's color-inversion commands seem to work on the whole canvas even if a region is selected. Here's how I got around it.

First select your region. Then click the menus as follows:

Edit → Cut

File → New → OK.

In the new window, click:

Edit → Paste

Colors → Invert

Select → All

Edit → Cut or Copy.

Re-activate the first window. Then click

Edit → Paste.

That pastes the new color-inverted image right back in the hole that was cut out of the old image. It also creates an extra layer, which you might want to eliminate by (e.g.)

Image → Flatten Image.

This worked for me. If you have a better solution, you're welcome to comment.

Creative Commons License         Return to Contents
comments powered by Disqus