improve imageTakeRecangle