ColorDetection change a colored picture to grayscale

Discussions about color detection and MRC support.
Post Reply
rlagrange
Posts: 26
Joined: Tue May 02, 2017 5:51 pm

ColorDetection change a colored picture to grayscale

Post by rlagrange » Mon Oct 16, 2017 12:27 pm

Hi,

Our customers are reporting some cases where colored pictured are agressivily transformed to grayscale.
The ColorDetection() method return IntentGrayScale, while IsGrayScale() return false on this picture.

Is it possible to adjust the threshold of ColorDetection() ?

Thanks

rlagrange
Posts: 26
Joined: Tue May 02, 2017 5:51 pm

Re: ColorDetection change a colored picture to grayscale

Post by rlagrange » Mon Oct 16, 2017 3:12 pm

Code for repro (tested with 14.0.6 et 14.0.23)

Code: Select all

static void Main(string[] args)
        {
            GdPicture14.LicenseManager lm = new GdPicture14.LicenseManager();
            lm.RegisterKEY(""); // YOUR KEY


            GdPicture14.GdPictureImaging imaging = new GdPicture14.GdPictureImaging();
            var imageID = imaging.CreateGdPictureImageFromBitmap(Properties.Resources.input);

            imaging.SaveAsPNG(imageID, "outputBefore.png");

            Console.WriteLine("grayscale : " + imaging.IsGrayscale(imageID).ToString());

            GdPicture14.GdPictureOutputIntent output = imaging.ColorDetection(imageID,
                                                            true, // false
                                                            true,
                                                            true);
            Console.WriteLine("ColorDetection Intent : " + output.ToString());

            imaging.SaveAsPNG(imageID, "outputAfter.png");

        }

User avatar
Loïc
Site Admin
Posts: 5530
Joined: Tue Oct 17, 2006 10:48 pm
Location: France
Contact:

Re: ColorDetection change a colored picture to grayscale

Post by Loïc » Sat Oct 21, 2017 8:07 pm

Hi,

Thank you for the report. The next minor release will be able to detect this image as color one.

Please let us know if you need further information.

With best regards,

Loïc

rlagrange
Posts: 26
Joined: Tue May 02, 2017 5:51 pm

Re: ColorDetection change a colored picture to grayscale

Post by rlagrange » Wed Oct 25, 2017 9:40 am

Thanks Loïc !

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest