Returns next power of 2 greater than or equal to Num (if Num itself is power of 2 then it retuns Num).
function NextPow2(Num: LongInt): LongInt;
ImagingUtility (at line 181)