Handle more iPhone photo variants
This commit is contained in:
@@ -157,6 +157,20 @@ def test_orientation_metadata_and_heic(service):
|
||||
assert image.height > image.width
|
||||
|
||||
|
||||
def test_tiff_and_invalid_color_profile_are_accepted(service):
|
||||
_, client, data = service
|
||||
invalid_profile = io.BytesIO()
|
||||
Image.new("RGB", (40, 20), "purple").save(
|
||||
invalid_profile, "JPEG", icc_profile=b"not an ICC profile")
|
||||
|
||||
for raw in (photo(format="TIFF"), invalid_profile.getvalue()):
|
||||
response = upload(client, [raw])
|
||||
assert response.status_code == 202
|
||||
output = data / "submissions" / response.json["id"] / "images/00.jpg"
|
||||
with Image.open(output) as image:
|
||||
assert image.format == "JPEG"
|
||||
|
||||
|
||||
def test_photo_date_comes_from_original_metadata(service):
|
||||
_, client, data = service
|
||||
exif = Image.Exif()
|
||||
|
||||
Reference in New Issue
Block a user