Skip to content

Commit

Permalink
Merge pull request #268 from DigitalSlideArchive/fix-format-detection
Browse files Browse the repository at this point in the history
Fix detecting some tiff files
  • Loading branch information
manthey authored Oct 4, 2024
2 parents b76c9e8 + 1e3dd27 commit 0da0356
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion imagedephi/utils/image.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,6 @@ def get_file_format_from_path(image_path: Path) -> FileFormat | None:
data = open(image_path, "rb").read(132)
if data[128:] == b"DICM":
return FileFormat.DICOM
elif data[:4] in (b"II\x2a\x00", b"MM\x00\x2a", b"II\x2b\x2a", b"MM\x00\x2b"):
elif data[:4] in (b"II\x2a\x00", b"MM\x00\x2a", b"II\x2b\x00", b"MM\x00\x2b"):
return FileFormat.TIFF
return None

0 comments on commit 0da0356

Please sign in to comment.