Skip to content

LR-LIB-PEOPLE: Reload from Disk leaves face boxes in the old frame when a file's Orientation changed #4993

Backlog

Description

@lenlo

Problem

Face boxes are kept in the catalog on the photo's upright frame (the file's Exif orientation applied). When another app changes a file's Exif Orientation (Finder, Preview or exiftool rotating a JPEG by its tag), Reload from Disk picks up the new size but leaves every face box where it was in the old frame, so the boxes land beside the faces.

Read Metadata from File puts the boxes that are in the file's XMP back in the right place for a quarter turn. It doesn't help with:

Steps (lightcraft-cli 0.22.0, headless)

  1. A 400 × 250 JPEG, Orientation 1, with one MWG face region (AppliedToDimensions 400 × 250, centre 0.2, 0.3, size 0.2 × 0.2, no mwg-rs:Rotation).
  2. library.import, then photo.inspect: meta.regions[0].rect = x 0.1–0.3, y 0.2–0.4. Correct.
  3. Outside LightCraft: exiftool -Orientation#=6 face.jpg (a quarter turn clockwise).
  4. photo.reload, then photo.inspect: the size is now 250 × 400, but the box is still x 0.1–0.3, y 0.2–0.4. It should be x 0.6–0.8, y 0.1–0.3.
  5. photo.readMetadataFromFile, then photo.inspect: x 0.6–0.8, y 0.1–0.3. Correct, because the box came from the file.

Expected

When Reload finds that the file's orientation changed, the catalog's face boxes turn with the photo, by the difference between the old and the new orientation, the way Rotate Left/Right turns the crop and masks. Every box is covered, including catalog-only ones, without needing Read Metadata from File.

Related

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions