Re: Replace specific color of image
Posted: 2017-10-09T01:08:10-07:00
Hi,
I am trying to achieve something very similar to the problem described in this post, i.e: change colour of an image with another colour but the problem is that I would like to change it with white.
This is not grayscale as I would like to set specific RGB which will transition to white.
for example, I have an image of 4 pixels:
(0,0,0)=BLACK
(32,0,0)=VERY VERY LIGHT RED
(64,0,0)=VERY LIGHT RED
(128,0,0)=LIGHT RED
so the LIGHT RED will be changed to white (255,255,255) , VERY LIGHT RED to GREY and VERY VERY LIGHT RED to LIGHT GREY.
It is a little bit hard for me to explain, for example, if I have a source picture of a red gradient, starts with BLACK and finishes at (128,0,0)
i will be able to set (128,0,0) as: (255,255,255) and get a BLACK to WHITE gradient output which will match the source.
I have tried: Fred's ImageMagick color2gray but did not know how to use it and was not sure it is the right script to solve this problem.
Thank you very much in advance,
Shuki
I am trying to achieve something very similar to the problem described in this post, i.e: change colour of an image with another colour but the problem is that I would like to change it with white.
This is not grayscale as I would like to set specific RGB which will transition to white.
for example, I have an image of 4 pixels:
(0,0,0)=BLACK
(32,0,0)=VERY VERY LIGHT RED
(64,0,0)=VERY LIGHT RED
(128,0,0)=LIGHT RED
so the LIGHT RED will be changed to white (255,255,255) , VERY LIGHT RED to GREY and VERY VERY LIGHT RED to LIGHT GREY.
It is a little bit hard for me to explain, for example, if I have a source picture of a red gradient, starts with BLACK and finishes at (128,0,0)
i will be able to set (128,0,0) as: (255,255,255) and get a BLACK to WHITE gradient output which will match the source.
I have tried: Fred's ImageMagick color2gray but did not know how to use it and was not sure it is the right script to solve this problem.
Thank you very much in advance,
Shuki