How to set the same value to the color channels
Posted: 2015-04-07T03:08:02-07:00
Hello! Can someone help me, please? I try to set R channel to B and G channels in my PNG image. It woks good if I change only one channel, but if I change both - all channels get modified (it seems they raised to the power 2.2). How to exclude such behavior?
I try to use:
All these commands (and the chain of commands) generate the same png with modified color.
Commands like '-negate' and '-separate' also raising color to the power 2.2.
For example, the next line works fine:
It produce the PNG file with the same R and G channels and do not raised to the power 2.2.
How to get G and B channels equal to the R channel without raising to the power? (or without raising all image to the power 1/2.2).
I try to use:
Code: Select all
sudo convert input.png -channel GB -fx 'R' output.png
Code: Select all
sudo convert input.png -channel RGB -fx 'R' output.png
Code: Select all
sudo convert input.png -channel G -fx 'R' output-step1.png
sudo convert output-step1.png -channel B -fx 'R' output-step2.png
Commands like '-negate' and '-separate' also raising color to the power 2.2.
For example, the next line works fine:
Code: Select all
sudo convert input.png -channel G -fx 'R' output-step1.png
How to get G and B channels equal to the R channel without raising to the power? (or without raising all image to the power 1/2.2).