Apply haldclut color to Image - C#

Magick.NET is an object-oriented C# interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning Magick.NET
Post Reply
tsr85
Posts: 1
Joined: 2018-03-02T19:01:09-07:00
Authentication code: 1152

Apply haldclut color to Image - C#

Post 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?
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Apply haldclut color to Image - C#

Post 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().
snibgo's IM pages: im.snibgo.com
User avatar
fmw42
Posts: 25562
Joined: 2007-07-02T17:14:51-07:00
Authentication code: 1152
Location: Sunnyvale, California, USA

Re: Apply haldclut color to Image - C#

Post 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;
}
snibgo
Posts: 12159
Joined: 2010-01-23T23:01:33-07:00
Authentication code: 1151
Location: England, UK

Re: Apply haldclut color to Image - C#

Post by snibgo »

Sorry, I misread the question.
snibgo's IM pages: im.snibgo.com
User avatar
dlemstra
Posts: 1570
Joined: 2013-05-04T15:28:54-07:00
Authentication code: 6789
Contact:

Re: Apply haldclut color to Image - C#

Post by dlemstra »

You should use `bitmap.HaldClut(image)`.
.NET + ImageMagick = Magick.NET https://github.com/dlemstra/Magick.NET, @MagickNET, Donate
Post Reply