increased precision, fixed rotated image being cropped sometimes