Page 1 of 1

Apply haldclut color to Image - C#

Posted: 2018-03-02T19:03:39-07:00
by tsr85
I am trying to do http://www.imagemagick.org/Usage/color_mods/#hald-clut in C# in ImageMagick.

I have a bitmap image and I have to apply a Hald CLUT image to the bitmap.

There is an example in the link in which they apply different hald CLUT to Rose Image and get the rose in different color.

How can I do this in C# and what would be the best way to do this?

Re: Apply haldclut color to Image - C#

Posted: 2018-03-03T07:42:52-07:00
by snibgo
I don't use Magick.NET, but from the source code...
https://github.com/dlemstra/Magick.NET/ ... ickImage.c
... I guess the function you need is MagickImage_Clut().

Re: Apply haldclut color to Image - C#

Posted: 2018-03-03T11:07:02-07:00
by fmw42
I believe snibgo meant haldclut:

https://github.com/dlemstra/Magick.NET/ ... ickImage.c

Code: Select all

MAGICK_NET_EXPORT void MagickImage_HaldClut(Image *instance, const Image *image, ExceptionInfo **exception)
{
  MAGICK_NET_GET_EXCEPTION;
  HaldClutImage(instance, image, exceptionInfo);
  MAGICK_NET_SET_EXCEPTION;
}

Re: Apply haldclut color to Image - C#

Posted: 2018-03-03T11:12:14-07:00
by snibgo
Sorry, I misread the question.

Re: Apply haldclut color to Image - C#

Posted: 2018-03-05T13:57:12-07:00
by dlemstra
You should use `bitmap.HaldClut(image)`.