Auto color correction for collection of Images

Magick.NET is an object-oriented C# interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick.NET
Locked
karthikin
Posts: 3
Joined: 2014-02-27T06:27:22-07:00
Authentication code: 6789

Auto color correction for collection of Images

Post 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

User avatar
dlemstra
Posts: 1625
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Auto color correction for collection of Images

Post 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.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate

karthikin
Posts: 3
Joined: 2014-02-27T06:27:22-07:00
Authentication code: 6789

Re: Auto color correction for collection of Images

Post 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

User avatar
dlemstra
Posts: 1625
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Auto color correction for collection of Images

Post 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.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate

karthikin
Posts: 3
Joined: 2014-02-27T06:27:22-07:00
Authentication code: 6789

Re: Auto color correction for collection of Images

Post 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

User avatar
fmw42
Posts: 26383
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Auto color correction for collection of Images

Post 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.

Locked