Returns log base 2 of integer X (max 2^30) or -1 if X is not power of 2.
function Log2Int(X: LongInt): LongInt;
ImagingUtility (at line 187)