I have three bitmaps for testing. Two are completely white and one has a one pixel line the length of the file. They are two colors (1 bit) black and white bitmaps
Each of the Bitmaps is 400 X 200 = 80,000 pixels
The line should be 400 pixels, which is 1/200th or ½ of a percent.
When I compare both white bitmaps the percentage is 100 as it is an exact match.
When I run the one with the one pixel line it returns 58, it is not 58 percent black or white. 58 percent would be closer to half black and half white. It is closer to .058 or less than one percent if you round up.
Thinking something was wrong with me and my percentages I reopened the file and copied the line to dupliate it and saved the file. I got the same 58 for a return. Which really confuses me as now there are twice as many black pixels.
Does anyone know what I am missing here?
trouble understanding CompareBitmaps
Moderators: JRL, Dorian (MJT support)
Same Result
I am still getting 58. I tested it with the two one pixel lines
For what it is worth
What I really am trying to do is just get the percentage of black pixels to determine if something is there.