Handle more iPhone photo variants

This commit is contained in:
2026-09-20 02:35:10 +03:30
parent b024474915
commit f392b68851
3 changed files with 43 additions and 11 deletions
+14
View File
@@ -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()