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);
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