It is currently Fri Apr 19, 2024 9:36 pm


All times are UTC - 5 hours [ DST ]



Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Leaving only one color in the image.
PostPosted: Wed Feb 15, 2017 2:54 am  (#1) 
Offline
GimpChat Member

Joined: Mar 06, 2015
Posts: 295
GIMP Version: 2.8.18
Operating System: Windows
OS Version: 10
GIMP Experience: Basic Level



Hello GIMP friends.

How can I keep only one color in the image ?
All other colors in the image will be gray-white (Saturation -100).
The effect in the attached picture I've made with the application "Camera 360" in my Android phone.

Thanks
Doron.


Attachments:
Red effect 04.JPG
Red effect 04.JPG [ 1.86 MiB | Viewed 5683 times ]
Red effect 03.jpg
Red effect 03.jpg [ 1.86 MiB | Viewed 5683 times ]
Share on Facebook Share on Twitter Share on Orkut Share on Digg Share on MySpace Share on Delicious Share on Technorati
Top
 Post subject: Re: Leaving only one color in the image.
PostPosted: Wed Feb 15, 2017 3:21 am  (#2) 
Offline
GimpChat Member

Joined: Sep 23, 2016
Posts: 316
There is a tutorial here:
https://www.gimp.org/tutorials/Selective_Color/


Top
 Post subject: Re: Leaving only one color in the image.
PostPosted: Wed Feb 15, 2017 3:22 am  (#3) 
Offline
Global Moderator
User avatar

Joined: Apr 01, 2012
Posts: 7712
Location: On the other side of this screen
You mean 1 colour in a black and white picture ;)
That can be acheived with a mask
I'll post the link to a tutorial on it in a minute
I see blighty beat me to it
Here is Molly's tutorial viewtopic.php?f=23&t=2888&hilit=mask+tutorial&start=60

_________________


Top
 Post subject: Re: Leaving only one color in the image.
PostPosted: Wed Feb 15, 2017 4:03 am  (#4) 
Offline
GimpChat Member

Joined: Mar 06, 2015
Posts: 295
I'm looking for the effect to work in the following way:
The user will select a color to keep in the image, for example: red, green, yellow .....
After selecting the color the user will start the effect.
the effect will make all other colors in the image to become gray and white without further action by the user.
the user will not need to select area or mask area.
this is the way the effect work in the application "Camera 360" in Android phone.

Thanks
Doron.


Attachments:
Screenshot_2017-02-15-11-07-46.jpg
Screenshot_2017-02-15-11-07-46.jpg [ 664.72 KiB | Viewed 5658 times ]
Top
 Post subject: Re: Leaving only one color in the image.
PostPosted: Wed Feb 15, 2017 4:54 am  (#5) 
Offline
Global Moderator
User avatar

Joined: Apr 01, 2012
Posts: 7712
Location: On the other side of this screen
Just tried it a different way in Gimp. select all the red parts with the fuzzy selector, threshhold on 24. Invert your selection then desaturate (luminosity). Depending, it may take longer than the other way - took me about an hour.
Attachment:
Red effect 04desaturated.JPG
Red effect 04desaturated.JPG [ 1.44 MiB | Viewed 5643 times ]

_________________


Top
 Post subject: Re: Leaving only one color in the image.
PostPosted: Wed Feb 15, 2017 5:06 am  (#6) 
Offline
GimpChat Member

Joined: Sep 23, 2016
Posts: 316
doronf2 wrote:
I'm looking for the effect to work in the following way:
The user will select a color to keep in the image, for example: red, green, yellow .....
After selecting the color the user will start the effect.
the effect will make all other colors in the image to become gray and white without further action by the user.
the user will not need to select area or mask area.
this is the way the effect work in the application "Camera 360" in Android phone.

Thanks
Doron.


This will require a script to do all the steps in one of the tutorials. Results will vary greatly, depending on the image. Can work well on one image, and on another image the result will not be good at all.


Top
 Post subject: Re: Leaving only one color in the image.
PostPosted: Wed Feb 15, 2017 5:11 am  (#7) 
Offline
Global Moderator
User avatar

Joined: Apr 01, 2012
Posts: 7712
Location: On the other side of this screen
There is another way ;)
With your picture in gimp open Hue/Saturation. With this one i just moved yellow and green saturation all the way to the left.
Attachment:
Red effect 04desaturatedc.JPG
Red effect 04desaturatedc.JPG [ 1.71 MiB | Viewed 5635 times ]

You could do mostly the same for any image. Just don't move your colour you want to keep to the left.

_________________


Last edited by sallyanne on Wed Feb 15, 2017 7:25 am, edited 1 time in total.

Top
 Post subject: Re: Leaving only one color in the image.
PostPosted: Wed Feb 15, 2017 5:16 am  (#8) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Doron,
I wrote a script to give a try.
This is my result, not exactly the same as what you show but close.
If you like, I can post it (after some cleaning)
Attachment:
MyTry.jpg
MyTry.jpg [ 2 MiB | Viewed 5635 times ]

_________________
"Where am I ?"


Top
 Post subject: Re: Leaving only one color in the image.
PostPosted: Wed Feb 15, 2017 5:20 am  (#9) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4736
Very overlooked: in the "By color" selector you can use various selection criteria, and here "Hue" is an obvious choice.

_________________
Image


Top
 Post subject: Re: Leaving only one color in the image.
PostPosted: Wed Feb 15, 2017 5:30 am  (#10) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Excellent suggestion, Ofnuts, it's easy to select by hue, reverse, desaturate.
Great!
Use Ofnuts' rec, Doron.

_________________
"Where am I ?"


Top
 Post subject: Re: Leaving only one color in the image.
PostPosted: Wed Feb 15, 2017 10:28 am  (#11) 
Offline
GimpChat Member

Joined: Mar 06, 2015
Posts: 295
sallyanne wrote:
There is another way ;)
With your picture in gimp open Hue/Saturation. With this one i just moved yellow and green saturation all the way to the left.
Attachment:
Red effect 04desaturatedc.JPG

You could do mostly the same for any image. Just don't move your colour you want to keep to the left.


Thanks

I like this method.
I will test as soon as possible.

Doron.


Top
 Post subject: Re: Leaving only one color in the image.
PostPosted: Wed Feb 15, 2017 10:44 am  (#12) 
Offline
GimpChat Member

Joined: Mar 06, 2015
Posts: 295
Hello

I test the HUE color after color.
And it works fine.

thanks
Doron.


Attachments:
IMG_0344_RS02.JPG
IMG_0344_RS02.JPG [ 1.73 MiB | Viewed 1621 times ]
IMG_0344_RED_RS.JPG
IMG_0344_RED_RS.JPG [ 1.49 MiB | Viewed 1621 times ]
Top
 Post subject: Re: Leaving only one color in the image.
PostPosted: Wed Feb 15, 2017 11:37 am  (#13) 
Offline
Script Coder
User avatar

Joined: May 07, 2014
Posts: 3975
Location: Canada
ofnuts wrote:
Very overlooked: in the "By color" selector you can use various selection criteria, and here "Hue" is an obvious choice.

I always over look tool options features and get to learn something new from you

_________________
TinT


Top
 Post subject: Re: Leaving only one color in the image.
PostPosted: Wed Feb 15, 2017 4:45 pm  (#14) 
Offline
GimpChat Member

Joined: Mar 06, 2015
Posts: 295
dinasset wrote:
Doron,
I wrote a script to give a try.
This is my result, not exactly the same as what you show but close.
If you like, I can post it (after some cleaning)
Attachment:
MyTry.jpg



Thank you for your help Dinasset.
Yes i like . can post your script here ?

thanks
Doron.


Top
 Post subject: Re: Leaving only one color in the image.
PostPosted: Thu Feb 16, 2017 1:09 am  (#15) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Here it is.
It makes use of the "Hue" technique suggested by Ofnuts.

Attachment:
DIEGO_COLOURS_Leave1color.zip [646 Bytes]
Downloaded 98 times

_________________
"Where am I ?"


Top
 Post subject: Re: Leaving only one color in the image.
PostPosted: Thu Feb 16, 2017 1:57 am  (#16) 
Offline
GimpChat Member

Joined: Mar 06, 2015
Posts: 295
dinasset wrote:
Here it is.
It makes use of the "Hue" technique suggested by Ofnuts.

Attachment:
The attachment DIEGO_COLOURS_Leave1color.zip is no longer available


Thank You dinasset for the script.
Can you please change the color select pop up windows
from photo number 1 to photo number 2 ?

Photo number 2 have more option to select the color.

Thanks
Doron.


Attachments:
Leave one color 01.jpg
Leave one color 01.jpg [ 123.33 KiB | Viewed 1581 times ]
Leave one color 02.jpg
Leave one color 02.jpg [ 86.21 KiB | Viewed 1581 times ]
Top
 Post subject: Re: Leaving only one color in the image.
PostPosted: Thu Feb 16, 2017 2:19 am  (#17) 
Offline
GimpChat Member
User avatar

Joined: Jan 20, 2013
Posts: 14816
Location: roma, italy
Well, I don't know how to change the panel which appears on a python color-select parameter, maybe Ofnuts can help

edit: I have to leave now, when back I'll see what Ofnuts (or someone else) suggests to change

_________________
"Where am I ?"


Top
 Post subject: Re: Leaving only one color in the image.
PostPosted: Thu Feb 16, 2017 5:38 am  (#18) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
I think I'm of the opinion that you're better treating each image individually rather than having a button-press-preset mentality, so in this case using masks to select the parts you want as it gives more flexibility to do this sort of thing:
Attachment:
Red effect 04_toned_sml.jpg
Red effect 04_toned_sml.jpg [ 344.67 KiB | Viewed 1564 times ]

Kevin


Top
 Post subject: Re: Leaving only one color in the image.
PostPosted: Thu Feb 16, 2017 5:44 am  (#19) 
Offline
Script Coder
User avatar

Joined: Oct 25, 2010
Posts: 4736
doronf2 wrote:
Thank You dinasset for the script.
Can you please change the color select pop up windows
from photo number 1 to photo number 2 ?

Photo number 2 have more option to select the color.

Thanks
Doron.

When you do a script, you just tell Gimp that your script needs a color as one of the parameters, and Gimp creates the dialog on the fly using built-in sub-dialogs where necessary (colors, fonts, files/directories...). So either you accept the standard stuff and your script is written in 10 minutes or your write your own stuff and it takes days or weeks (the standard color dialog in Gimp (which is 4-5 dialogs in tabs actually) in a rather complex animal).

A better venue would be to file a bug/improvement request on bugzilla.gnome.org and suggest that the dialog used to pick color in scripts be augmented to match the standard color dialog. Then all the scripts will benefit from this.

_________________
Image


Top
 Post subject: Re: Leaving only one color in the image.
PostPosted: Thu Feb 16, 2017 5:52 am  (#20) 
Offline
Script Coder
User avatar

Joined: Jun 22, 2010
Posts: 1171
Location: Here and there
The curious thing is that in GIMP 2.6, the script colour chooser dialog is the same as the standard colour dialog, so this is something that has changed with 2.8 and may indeed be a bug.

And it's the Python script colour chooser that's the problem as the script-fu dialog is the standard one.


Top
Post new topic Reply to topic  [ 27 posts ]  Go to page 1, 2  Next

All times are UTC - 5 hours [ DST ]


   Similar Topics   Replies 
No new posts Help with "gimp-image-pick-color"

1

No new posts Attachment(s) GEGL Color Light Fusion (12 blend modes for color overlay)

9

No new posts Attachment(s) Background color chanage and typed text color change

8

No new posts Attachment(s) Color does not exactly match color in GIMP 2.10 (SOLVED)

9

No new posts Retexture an image with another image as "Image Pattern" Plug-in

4



* Login  



Powered by phpBB3 © phpBB Group