I searched all over internet and still haven't found a solution for this challenge.
I am dying to know how to implement color correction in the way we normally do it in Photoshop by using curves with a very basic bent graphic like shown in these pictures: I am developing a Java program (using ImageMagick) for correcting colors of photos. User should be able to enter 4 parameters to correct colors Density (higher density results in darker image) Red Green and Blue values in order to see results immediately. Previously I used -color-matrix which was fast enough but found out that it did a linear correction (unlike in Photoshop curves).
I know I could find solution in -fx but there are two problems with that:
- I don't know the right formula for -fx
- It is very slow
I also tried -tint which is a faster solution that works well with one parameter. But as soon as I combine parameters like this:
convert -fill white -tint 120 -fill red -tint 20 C:\test.JPG c:\test2.jpg
image becomes very dark and operation takes more time than -color-matrix.
I read in description of -tint that it changes the midtones. Perhaps this is what I am looking for but I want it to run fast and use 4 parameters I mentioned earlier.
Could some one help me with this challenge?