Resizes the image to the nearest power of 2 for the width and height. If square is true then set width and height to be the same.
See Implementation
Resizes the image to the nearest power of 2 for the width and height. If square is true then set width and height to be the same.