Changed bitwise ops

Before it didnt like power of 2 images, no idea why