RSS/Atom feed Twitter
Site is read-only, email is disabled

how to invert greyscale values only... leaving colors alone

This discussion is connected to the gimp-user-list.gnome.org mailing list which is provided by the GIMP developers and not related to gimpusers.com.

This is a read-only list on gimpusers.com so this discussion thread is read-only, too.

3 of 3 messages available
Toggle history

Please log in to manage your subscriptions.

how to invert greyscale values only... leaving colors alone Rich Evans 02 Feb 00:27
  how to invert greyscale values only... leaving colors alone Noel Stoutenburg 02 Feb 01:29
  how to invert greyscale values only... leaving colors alone Sven Neumann 02 Feb 09:51
Rich Evans
2010-02-02 00:27:22 UTC (almost 15 years ago)

how to invert greyscale values only... leaving colors alone

Hello, Is this the right place to ask a question about special filters in GIMP? If so, I'd love some advice on the following task:

I have an RGB image that is basically a black background with many colorful objects and white text. --- I'd like to invert the image so that it is a white background with black text but a simple invert inverts the colors in all the colored objects as well. Is there a technique or tool to invert any part of the image that is only a shade of grey? i.e. invert pixeils with a saturation of ~0 (if that is how you say it). I could imagine a filter that does a simple RGB invert for any pixel whose calculated RGB saturation value is below a set threshold. Does this type of tool/script exist?

thanks! -Rich (revansx)

Noel Stoutenburg
2010-02-02 01:29:38 UTC (almost 15 years ago)

how to invert greyscale values only... leaving colors alone

Rich Evans wrote:

I have an RGB image that is basically a black background with many colorful objects and white text. --- I'd like to invert the image so that it is a white background with black text but a simple invert inverts the colors in all the colored objects as well. Is there a technique or tool to invert any part of the image that is only a shade of grey? i.e. invert pixeils with a saturation of ~0 (if that is how you say it). I could imagine a filter that does a simple RGB invert for any pixel whose calculated RGB saturation value is below a set threshold. Does this type of tool/script exist?

Here's how I'd do this:

First, I'd make a copy of the original image.

Second, working with the copy, I'd add a new layer, filled with white, and move that layer to the bottom of the layer stack.

Third, I'd make a copy of the original image, and move the copy to the top of the stack, if it doesn't happen to be there at the beginning. If necessary, I'd switch the color paletes so that black is the active color. Then I'd use the facility to select by color tool to select the white areas, making certain that there were not highlights of some of the "many colorful objects" which got included as well. I'd then paint or bucket fill as necessary to convert the formerly white areas to black.

Fourth, returning to the original layer, I'd select all of the areas which are black, and remove them.

Finally, merge the layers together, and you should have achieved the effect you wish.

ns

Sven Neumann
2010-02-02 09:51:42 UTC (almost 15 years ago)

how to invert greyscale values only... leaving colors alone

On Mon, 2010-02-01 at 15:27 -0800, Rich Evans wrote:

Hello, Is this the right place to ask a question about special filters in GIMP? If so, I'd love some advice on the following task:

I have an RGB image that is basically a black background with many colorful objects and white text. --- I'd like to invert the image so that it is a white background with black text but a simple invert inverts the colors in all the colored objects as well. Is there a technique or tool to invert any part of the image that is only a shade of grey? i.e. invert pixeils with a saturation of ~0 (if that is how you say it). I could imagine a filter that does a simple RGB invert for any pixel whose calculated RGB saturation value is below a set threshold. Does this type of tool/script exist?

Simple. First create a duplicate of your layer. Then invert the colors on the lower layer and set the layer mode of the upper (unchanged) layer to "Colors".

Sven