According to this, viewtopic.php?f=3&t=34337, I have not yet find a way to accomplish to avoid RGB image (where all values are r=g=b) to be converted to grayscale. How to do it in Magick.NET?
Best Wishes,
PS
I do not want to use -type TrueColor, because the input might be indexed color whose all values are gray (r=g=b).
In that case, it should keep the Palette type.
How to set auto-grayscale off?
How to set auto-grayscale off?
Last edited by 246246 on 2018-07-11T05:55:54-07:00, edited 3 times in total.
Re: How to set auto-grayscale off?
In the most recent Magick.NET 7.5.0.1, it seems
is working.
My first code was
It does not work. Is my working code in the right way?
Code: Select all
using (var image = new MagickImage("c:/tmp/logo.tif"))
{
image.SetAttribute("colorspace:auto-grayscale", "false");
image.Write("c:/tmp/out.tif");
}
My first code was
Code: Select all
using (var image = new MagickImage("c:/tmp/logo.tif"))
{
image.Settings.SetDefine("colorspace:auto-grayscale", "false");
image.Write("c:/tmp/out.tif");
}