-combine colormix

Questions and postings pertaining to the usage of ImageMagick regardless of the interface. This includes the command-line utilities, as well as the C and C++ APIs. Usage questions are like "How do I use ImageMagick to create drop shadows?".
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: -combine colormix

Post by fmw42 »

If you want to duplicate color manipulation from PS in IM and there is no blurring, sharpening, convolutions, etc, only point operations, then you can use the HALD image and -hald-clut to create a 3D lookup color table in IM, the take it to PS where you apply your processing. Then bring it back to IM and apply it with -hald-clut. See http://www.imagemagick.org/Usage/color_mods/#hald-clut
droiddk
Posts: 12
Joined: 2015-10-15T12:05:24-07:00
Authentication code: 1151

Re: -combine colormix

Post by droiddk »

Hi

How can I add the -10% constant on the the red channel in the matrix?

Kind Regards
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: -combine colormix

Post by snibgo »

You need a 6x6 matrix. See the example at http://www.imagemagick.org/script/comma ... lor-matrix, which subtracts 15.7%.
snibgo's IM pages: im.snibgo.com
droiddk
Posts: 12
Joined: 2015-10-15T12:05:24-07:00
Authentication code: 1151

Re: -combine colormix

Post by droiddk »

Thanks

Got it now :-)

Kind Regards
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: -combine colormix

Post by snibgo »

There are lots of zeros because we don't normally want the green channel to be fed into the red, blue, K, or alpha channels, etc.
snibgo's IM pages: im.snibgo.com
droiddk
Posts: 12
Joined: 2015-10-15T12:05:24-07:00
Authentication code: 1151

Re: -combine colormix

Post by droiddk »

Ok but I dont fully understand it all:


" 1.5 0.0 0.0 0.0, 0.0, -0.157 \ - The red channel, right? The first 1.5 is the red, 0.0 & 0.0 are green and blue. But what about 0.0, 0.0, -0.157 ? (I know what -0.157 is)
0.0 1.5 0.0 0.0, 0.0, -0.157 \ The green channel, right?
0.0 0.0 1.5 0.0, 0.0, -0.157 \ The blue channel, right?
0.0 0.0 0.0 1.0, 0.0, 0.0 \ What is this?
0.0 0.0 0.0 0.0, 1.0, 0.0 \ What is this?
0.0 0.0 0.0 0.0, 0.0, 1.0" What is this?
kittens.png
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: -combine colormix

Post by fmw42 »

The extra rows allow one to process CMYKA (and overall constant). So you need 6 rows to handle that. The first 3 permit RGB rather than CMY and the 5th row is A. Same for the columns. So you need a 6x6 matrix. The unused rows need to be there as placeholders, but they are all zero except for the row/column that is 1 to represent a no-change for that channel.

see also http://designstacks.net/color-matrix
droiddk
Posts: 12
Joined: 2015-10-15T12:05:24-07:00
Authentication code: 1151

Re: -combine colormix

Post by droiddk »

Thank you very much for all your kind help :)

Kind Regards
Post Reply