diff --git a/organize.py b/organize.py index ce7f968..c301877 100644 --- a/organize.py +++ b/organize.py @@ -176,18 +176,8 @@ def _read_other_exif_pil(path: Path) -> str | None: def _read_cr2_exif(path: Path) -> str | None: - """CR2 (Canon Raw): rawpy to read EXIF.""" - if not HAS_RAWPY: - return None - try: - with rawpy.imread(str(path)) as raw: - # rawpy doesn't expose parsed EXIF directly; - # try the raw_image metadata - pass - except Exception: - pass - - # Fallback: try piexif on CR2 (CR2 has a JPEG preview with EXIF) + """CR2/CR3 (Canon Raw): try piexif first, then PIL embedded JPEG.""" + # Tier 1: piexif on CR2 (TIFF-based EXIF) if HAS_PIEXIF: try: exif_dict = piexif.load(str(path)) @@ -197,7 +187,7 @@ def _read_cr2_exif(path: Path) -> str | None: except Exception: pass - # Fallback: PIL can read EXIF from CR2's embedded JPEG preview + # Tier 2: PIL can read EXIF from CR2's embedded JPEG preview try: from PIL import Image from PIL.ExifTags import TAGS