Adding power of two conversion for Image

Maybe not the fastest conversion but it should work cross-platform.