IDIF function: Fixed the "invalid rectangle" defect exhibited on P1.fvx. This was due to the inflated initial rectangle to be outside the image bounds.
Implemented an order-of-magnitude CountBits( PBYTE Array,int Start,int End) function which is frequently used throughout.