-combine colormix
-combine colormix
Hello
I use this command for creating an RGB-image from three (grey) images:
convert c:\img\red.jpg c:\img\green.jpg c:\img\blue.jpg \ -set colorspace RGB -combine -set colorspace sRGB c:\img\rgb.jpg
I would like to do a colormix, like the one I can do in Photoshop so I get something like this: Red + 34%, green +23% and blue +12%
Is this possible? Cannot find anything about it in the documentation :/
Kind Regards
I use this command for creating an RGB-image from three (grey) images:
convert c:\img\red.jpg c:\img\green.jpg c:\img\blue.jpg \ -set colorspace RGB -combine -set colorspace sRGB c:\img\rgb.jpg
I would like to do a colormix, like the one I can do in Photoshop so I get something like this: Red + 34%, green +23% and blue +12%
Is this possible? Cannot find anything about it in the documentation :/
Kind Regards
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: -combine colormix
Do you mean you want 34% red and 23% green and 12% blue? If so, they do not add up to 100%.Red + 34%, green +23% and blue +12%
Do you mean you want to add 34% graylevel to red and 23% graylevel to green and 12% graylevel to blue?
Note sure why you are setting the color channels to linear RGB before combining. That does not make sense to me, unless your input images are linear RGB and you want to then convert the result to non-linear sRGB. If you input images are non-linear sRGB, then the following should do that (unless you are on an older version of IM where RGB and sRGB were backwards)
Unix syntax for the former
Code: Select all
convert \
\( image1 -evaluate multiply 0.34 \) \
\( image2 -evaluate multiply 0.23 \) \
\( image3 -evaluate multiply 0.12 \) \
-set colorspace sRGB -combine result
Code: Select all
convert \
\( image1 -evaluate add 34% \) \
\( image2 -evaluate add 23% \) \
\( image3 -evaluate add 12% \) \
-set colorspace sRGB -combine result
Re: -combine colormix
Thank you very much for your help.
What I really want is something like this:
Please note that right after the making of the RGB the red-channel is +100% so I have actually decreased this.
Images says more than..
Kind Regards
What I really want is something like this:
Please note that right after the making of the RGB the red-channel is +100% so I have actually decreased this.
Images says more than..
Kind Regards
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: -combine colormix
IM can easily adjust the red for the red channel, the green for the green channel and the blue for the blue channel. It cannot easily mix green or blue directly in the red channel nor similarly with the other channels. I am not sure what PS is doing for that. PS 100% is like no change in IM. And PS 0 is like all black. I think PS -100% is negated.
So if you want to change channel values in IM that correspond to PS between 0 and 100% on each channel separately and use the default constant of -10%
That would be
So if you want to change channel values in IM that correspond to PS between 0 and 100% on each channel separately and use the default constant of -10%
That would be
Code: Select all
convert \
\( image1 -evaluate multiply 0.34 -evaluate subtract 10% \) \
\( image2 -evaluate multiply 0.23 -evaluate subtract 10% \) \
\( image3 -evaluate multiply 0.12 -evaluate subtract 10% \) \
-set colorspace sRGB -combine result
Re: -combine colormix
Thanks
I have tried but it does not give me the same result as PS :/
Kind Regards
I have tried but it does not give me the same result as PS :/
Kind Regards
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: -combine colormix
For the PS equivalent of my commands you must only change in PS the red with the red channel, the green with the green channel and the blue with the blue channel. No mixing of blue or green in the red channel.
I think what you may want is the -color-matrix function. See http://www.imagemagick.org/script/comma ... lor-matrix. The values are fractions, not percent. So divide you percents by 100 and use those values for -color-matrix.
I think what you may want is the -color-matrix function. See http://www.imagemagick.org/script/comma ... lor-matrix. The values are fractions, not percent. So divide you percents by 100 and use those values for -color-matrix.
Re: -combine colormix
Hello fmw42
Thanks but I think that this is out of my reach - I have never worked with IM before and I don't know very much about colormix - I can tweak the faders in PS and that's all
Kind Regards
Thanks but I think that this is out of my reach - I have never worked with IM before and I don't know very much about colormix - I can tweak the faders in PS and that's all
Kind Regards
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: -combine colormix
Adding 34% is (or should be) equivalent to multiplying by 1.34, so perhaps "-evaluate Multiply 1.34" is needed.
snibgo's IM pages: im.snibgo.com
Re: -combine colormix
I've also tried that.
Kind Regards
Kind Regards
-
- Posts: 12159
- Joined: 2010-01-23T23:01:33-07:00
- Authentication code: 1151
- Location: England, UK
Re: -combine colormix
Googling "Photoshop Channel Mixer" finds http://www.dummies.com/how-to/content/h ... p-cs6.html , which strongly suggests the IM equivalent is "-color-matrix". For example:
Code: Select all
convert rose: -color-matrix "0,1,0 1,0,0 0,0,1" r.png
snibgo's IM pages: im.snibgo.com
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: -combine colormix
Photoshop does not add percents it uses them as multipliers, so that 100% is no change and 0 is black.snibgo wrote:Adding 34% is (or should be) equivalent to multiplying by 1.34, so perhaps "-evaluate Multiply 1.34" is needed.
I agree that color-matrix is the right thing.
If the use provides the image and the settings for each of the r,g,b channels, I can provide the -color-matrix equivalent (or at least see if that compares properly).
Re: -combine colormix
Hi fmw42 and snibgo
Thank you for your reply's.
I may not have been clear about what I wanted to do, or I did not actually know what PS was doing.
What I really want (I think) is this:
Red: 55% red from this channel, but also 50% blue, and 33% green from this channel.
Blue: 100%
Green: 100%
I think that is what PS is doing - in the atached image.
Does it makes sense?
Maybe the color-matrix is the right for me.
Kind Regards
Thank you for your reply's.
I may not have been clear about what I wanted to do, or I did not actually know what PS was doing.
What I really want (I think) is this:
Red: 55% red from this channel, but also 50% blue, and 33% green from this channel.
Blue: 100%
Green: 100%
I think that is what PS is doing - in the atached image.
Does it makes sense?
Maybe the color-matrix is the right for me.
Kind Regards
- fmw42
- Posts: 25562
- Joined: 2007-07-02T17:14:51-07:00
- Authentication code: 1152
- Location: Sunnyvale, California, USA
Re: -combine colormix
-color-matrix is I think what PS is doing. You are only changing one channel
is what I think you are asking for.
Code: Select all
-color-matrix "0.55 0.5 0.33 0 1 0 0 0 1"
Re: -combine colormix
I think you are right, I will try that right away
Thanks.
Kind Regards
Thanks.
Kind Regards
Re: -combine colormix
Yeeees!
It works.
Thank you very much.
Kind Regards
It works.
Thank you very much.
Kind Regards