Avoid a color in a jpg
Posted: 2015-08-26T09:02:44-07:00
Hello,
I need to asure that a generated image does not contain a specific color (or very similar one).
For example, to test if an image have a color I use:
And visually check if there is any difference.
But once I know there is that color I tried to replace it with a similar one, for ejample:
But if I check the new file to see if there is the color, it still it present. I guess that because JPEG compresion.
I need to remove that color from the image because I use it in my application as chroma for transparency.
Is there any way to force that generated jpeg image does not contain a specific color?
Thank you very much in advance.
I need to asure that a generated image does not contain a specific color (or very similar one).
For example, to test if an image have a color I use:
Code: Select all
convert test.jpg -fuzz 1% -fill black -opaque '#d3fec3' test_2.jpg
But once I know there is that color I tried to replace it with a similar one, for ejample:
Code: Select all
convert test.jpg -fuzz 1% -fill '#c6ffb3' -opaque '#d3fec3' test_new.jpg
Code: Select all
convert test_new.jpg -fuzz 1% -fill black -opaque '#d3fec3' test_new_2.jpg
Is there any way to force that generated jpeg image does not contain a specific color?
Thank you very much in advance.