CountColor

Discussions about image processing and document imaging.
Post Reply
JulienD
Posts: 12
Joined: Fri Apr 10, 2009 10:26 am

CountColor

Post by JulienD » Tue Jun 16, 2009 3:36 pm

Hello,
I try to use this funtion :

Code: Select all

            GdPictureImaging myTiff = new GdPictureImaging();
            myTiff.SetLicenseNumber("DO NO WRITE LICENSE CODE");
            int myTiffID = myTiff.CreateGdPictureImageFromFile(@"S:\Exemples\Formes\testRod001.tif");

            double nbBlack = myTiff.CountColor(myTiffID, System.Drawing.Color.Black);
            double nbWhite = myTiff.CountColor(myTiffID, System.Drawing.Color.White);
            double nbWhiteSmoke = myTiff.CountColor(myTiffID, System.Drawing.Color.WhiteSmoke);
            bool bicolor = myTiff.IsBitonal(myTiffID);
            bool gray = myTiff.IsGrayscale(myTiffID);
            System.Drawing.Color myColor = myTiff.PixelGetColor(myTiffID, 0, 0);
            System.Drawing.Color myColor1 = myTiff.PixelGetColor(myTiffID, 10, 10);
            System.Drawing.Color myColor2 = myTiff.PixelGetColor(myTiffID, 20, 20);
            System.Drawing.Color myColor3 = myTiff.PixelGetColor(myTiffID, 30, 30);
            System.Drawing.Color myColor4 = myTiff.PixelGetColor(myTiffID, 40, 40);

            myTiff.ReleaseGdPictureImage(myTiffID);
My image is black and white
and count color return me always 0 (for black and white)
i try to understand so i use PixelGetColor and this funtion return me Color.black or Color.White
So i don't understand
tell me how use this funtion CountColor
thanks by advance.
Julien

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

Re: CountColor

Post by Loïc » Tue Jun 16, 2009 8:29 pm

Hi,

This is a bug with the current release. It will be fixed into the next minor release (within 2 or 3 days).

Kind regards,

Loïc

JulienD
Posts: 12
Joined: Fri Apr 10, 2009 10:26 am

Re: CountColor

Post by JulienD » Fri Jun 26, 2009 9:35 am

Hi Loic,
Thank you for your answer.
Is it ok now ?
Can i download the new release ?

regards,
Julien

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 1 guest