straighten image and expand image in all directions