ImageMagick - how to convert green pixels to red?
Does anyone know how to move all the green pixels in an image to red pixels?
I don't want to just change the hue, I want to make the green channel red. |
figures... as soon as I post it, I find a solution... For those who are curious:
convert some_image.jpg \( +clone -channel G -fx R \) +swap -channel R -fx v.G swapped.jpg |
convert some_image.jpg \( +clone -channel G -fx R \) +swap -channel R -fx v.G swapped.jpg[/QUOTE]
Hail Brian, I'll take that as a sign (with your holy sandal :-) praising you as the Hero of the Day! - even years gone after posting that. (To complete the example: Choose R, G and B for red, green, blue color channel.) THANKS A LOT! |
After using it on a bunch of files (working on a Cinnamon theme) I realized that this is not the perfect solution.
A lot of - even greenish - colors already consist partly of red and blue. If you only replace the green RGB part by blue, the result is a bit violet because the red part play a bigger role now. I'll try a more "rotating" mode to change that... |
All times are GMT -5. The time now is 12:54 PM. |