trouble understanding CompareBitmaps

Technical support and scripting issues

Moderators: Dorian (MJT support), JRL

Post Reply
kpassaur
Automation Wizard
Posts: 696
Joined: Wed Jul 07, 2004 1:55 pm

trouble understanding CompareBitmaps

Post by kpassaur » Tue Feb 15, 2011 7:55 pm

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?

adroege
Automation Wizard
Posts: 438
Joined: Tue Dec 07, 2004 7:39 pm

Post by adroege » Tue Feb 15, 2011 9:21 pm

Let me know if adding this setting changes anything....

Code: Select all

Let>FIP_SCANPIXELS=ALL

kpassaur
Automation Wizard
Posts: 696
Joined: Wed Jul 07, 2004 1:55 pm

Same Result

Post by kpassaur » Tue Feb 15, 2011 10:12 pm

I am still getting 58. I tested it with the two one pixel lines

kpassaur
Automation Wizard
Posts: 696
Joined: Wed Jul 07, 2004 1:55 pm

For what it is worth

Post by kpassaur » Tue Feb 15, 2011 10:22 pm

What I really am trying to do is just get the percentage of black pixels to determine if something is there.

Post Reply
Sign up to our newsletter for free automation tips, tricks & discounts