Check if image is portrait or landscape