Page 1 of 1

Auto color correction for collection of Images

Posted: 2014-02-27T06:41:54-07:00
by karthikin
Hi guys, i'm new to ImageMagic. I'm want to apply a Auto color correction for a collection of images in a folder using ImageMagic in WPFD c#.net.

Can anyone explain to that how can i achieve this?
can anybody give me an example please?

Thank you very much in advance.

Best Regards,
karthik

Re: Auto color correction for collection of Images

Posted: 2014-02-27T12:59:52-07:00
by dlemstra
I am not sure if I understand what kind of enhancement you are looking for. Here is a list of supported enhancements: http://www.imagemagick.org/api/enhance.php (The method names in Magick.NET are almost the same). You should try and see which one helps you the best. Below is a simple example of how you should call it that.

Code: Select all

DirectoryInfo directory = new DirectoryInfo(@"C:\YourFolder");
foreach (FileInfo file in directory.GetFiles())
{
  using (MagickImage image = new MagickImage(file.FullName))
  {
    //image.Normalize();
    //image.AutoGamma();
    //image.AutoLevel();
    image.Write(Path.Combine(directory.FullName, "corrected." + file.Name));
  }
}
Feel free to open a topic on https://magick.codeplex.com/discussions if you need more help.

Re: Auto color correction for collection of Images

Posted: 2014-03-04T01:09:26-07:00
by karthikin
Hi, thank you very much for your reply & it's really helpful.

I see there is a auto color correction from ImageMagick: http://www.fmwconcepts.com/imagemagick/autocolor/

Is it possible to achieve this using C#.net? Please show me some example.

Thank you very much.

Kind regards,
karthik

Re: Auto color correction for collection of Images

Posted: 2014-03-04T04:52:50-07:00
by dlemstra
The unix/linux shell scripts should be reprogrammed in C# to get them to work. You will have to determine what he is doing and port it to C#. Be aware that you have to contact Fred if you want to use them commercially.

Re: Auto color correction for collection of Images

Posted: 2014-03-05T11:52:10-07:00
by karthikin
Hi, thank you very much for the information.

My intention to provide the tool what am i developing is free for the customers(who buys our product) to manipulate photos & it can be available from our website.
In that case do i have to consider about FRED? What is Fred?

Thank you

Re: Auto color correction for collection of Images

Posted: 2014-03-05T12:18:38-07:00
by fmw42
I am Fred. I have created the script that was mentioned. My scripts are unix bash shell scripts that make calls to ImageMagick. They do not run under C#. So you or someone else would have to rewrite the scripts under C#. If they are distributed for free an you make no money from their use and are not a commercial company, then my scripts are free to use. Otherwise, they need to be licensed for a fee. If you want to discuss this further, send me private mail on this forum. You can see my scripts at the link below.

If someone wants to fold my script into IM and can recode it, then contact me.