|
252 | 252 | (II, 3, (1,), 1, (8,), ()): ("P", "P"),
|
253 | 253 | (MM, 3, (1,), 1, (8,), ()): ("P", "P"),
|
254 | 254 | (II, 3, (1,), 1, (8, 8), (0,)): ("P", "PX"),
|
| 255 | + (MM, 3, (1,), 1, (8, 8), (0,)): ("P", "PX"), |
255 | 256 | (II, 3, (1,), 1, (8, 8), (2,)): ("PA", "PA"),
|
256 | 257 | (MM, 3, (1,), 1, (8, 8), (2,)): ("PA", "PA"),
|
257 | 258 | (II, 3, (1,), 2, (8,), ()): ("P", "P;R"),
|
@@ -1936,9 +1937,10 @@ def _save(im: Image.Image, fp: IO[bytes], filename: str | bytes) -> None:
|
1936 | 1937 | types[tag] = TiffTags.LONG8
|
1937 | 1938 | elif tag in ifd.tagtype:
|
1938 | 1939 | types[tag] = ifd.tagtype[tag]
|
1939 |
| - elif not (isinstance(value, (int, float, str, bytes))): |
1940 |
| - continue |
1941 |
| - else: |
| 1940 | + elif isinstance(value, (int, float, str, bytes)) or ( |
| 1941 | + isinstance(value, tuple) |
| 1942 | + and all(isinstance(v, (int, float, IFDRational)) for v in value) |
| 1943 | + ): |
1942 | 1944 | type = TiffTags.lookup(tag).type
|
1943 | 1945 | if type:
|
1944 | 1946 | types[tag] = type
|
|
0 commit comments