Skip to content
Merged
Show file tree
Hide file tree
Changes from 7 commits
Commits
Show all changes
25 commits
Select commit Hold shift + click to select a range
30780eb
LR-LIB-PEOPLE: face boxes drawn on a photo as stored land on the upri…
insideTheFlux Oct 24, 2026
e69f8b1
LR-LIB-PEOPLE: the image's own size decides, and its orientation is f…
insideTheFlux Oct 25, 2026
4eecf8b
LR-LIB-PEOPLE: find a late orientation by the file's structure, not b…
insideTheFlux Oct 25, 2026
26f73e4
LR-LIB-PEOPLE: a late TIFF orientation is one SHORT; a late WebP one …
insideTheFlux Oct 25, 2026
4e350dc
LR-LIB-PEOPLE: a re-read takes the file's orientation in the import's…
insideTheFlux Oct 25, 2026
64998a1
LR-LIB-PEOPLE: a WebP's EXIF chunk of any size is read by its IFD, an…
insideTheFlux Oct 25, 2026
1c499ca
Merge storytold/main into fix/2674-stored-frame-regions
insideTheFlux Oct 25, 2026
82a45a9
Merge storytold/main into fix/2674-stored-frame-regions
insideTheFlux Oct 26, 2026
8c8c29f
Merge storytold/main into fix/2674-stored-frame-regions
insideTheFlux Oct 27, 2026
772bb82
Merge storytold/main into fix/2674-stored-frame-regions
insideTheFlux Oct 30, 2026
72a074b
LR-LIB-PEOPLE: a size only the XMP states doesn't turn face boxes (#2…
insideTheFlux Oct 31, 2026
a763c3c
LR-LIB-PEOPLE: a re-read finds a PNG's or PSD's orientation past the …
insideTheFlux Oct 31, 2026
8fd4e3b
Merge storytold/main into fix/2674-stored-frame-regions
insideTheFlux Oct 31, 2026
4dd0f71
Merge storytold/main into fix/2674-stored-frame-regions
insideTheFlux Oct 31, 2026
e5f6b02
Merge storytold/main into fix/2674-stored-frame-regions
insideTheFlux Nov 3, 2026
7ff9f15
Merge storytold/main into fix/2674-stored-frame-regions
insideTheFlux Nov 4, 2026
85c1265
LR-LIB-PEOPLE: face boxes turn only by an orientation the Exif states…
insideTheFlux Nov 5, 2026
9fdafc0
Merge storytold/main into fix/2674-stored-frame-regions
insideTheFlux Nov 5, 2026
d372719
Merge storytold/main at eaef01e9
insideTheFlux Nov 5, 2026
8f77982
Merge storytold/main at 61005f3d
insideTheFlux Nov 5, 2026
419373a
LR-LIB-PEOPLE: re-read uses a raw's decoder orientation (#2674, review)
FredApps Nov 5, 2026
eb44185
Merge storytold/main into fix/2674-stored-frame-regions
FredApps Nov 5, 2026
3438a00
style: rustfmt for MEF orientation regression test
FredApps Nov 5, 2026
1a39b60
Merge origin/main into fix/2674-stored-frame-regions
Nov 5, 2026
df79328
Merge origin/main into fix/2674-stored-frame-regions
Nov 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions crates/engine/src/files.rs
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ pub fn probe_bytes(name: &str, bytes: &[u8]) -> Result<ProbeInfo, String> {
as_shot_wb: None,
content_hash,
xmp: lightcraft_meta::embedded(bytes).xmp,
orientation: m.orientation,
preview_only: Some(why),
..Default::default()
});
Expand Down Expand Up @@ -181,6 +182,7 @@ pub fn probe_bytes(name: &str, bytes: &[u8]) -> Result<ProbeInfo, String> {
as_shot_wb,
content_hash,
xmp: lightcraft_meta::embedded(bytes).xmp,
orientation: Some(raw.orientation),
preview_only: None,
});
}
Expand All @@ -196,6 +198,18 @@ pub fn probe_bytes(name: &str, bytes: &[u8]) -> Result<ProbeInfo, String> {
if o.swaps_axes() {
std::mem::swap(&mut w, &mut h);
}
// regions another app drew on the photo as stored: `extract` could only tell by the size the metadata states, which
// can be missing or wrong; the header's is the size as stored, so the boxes as written are turned by it (#2674)
let mut meta = meta;
if o.swaps_axes()
&& !meta.regions.is_empty()
&& let Some(xmp) = lightcraft_meta::embedded(bytes).xmp.and_then(|x| lightcraft_meta::parse_xmp(&x).ok())
&& let Some(drawn_on) = xmp.regions_drawn_on()
&& !xmp.metadata.regions.is_empty()
{
meta.regions = xmp.metadata.regions;
lightcraft_meta::upright_regions(&mut meta.regions, drawn_on, o, (header.width, header.height));
}
let format = match ext_upper(name).as_str() {
"JPG" | "JPEG" => "JPEG".to_string(),
"" => format!("{fmt:?}").to_uppercase(),
Expand All @@ -214,6 +228,7 @@ pub fn probe_bytes(name: &str, bytes: &[u8]) -> Result<ProbeInfo, String> {
content_hash,
embedded_lens: None,
xmp: None,
orientation: m.orientation,
preview_only: None,
})
}
Expand Down
2 changes: 2 additions & 0 deletions crates/engine/src/import.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1461,6 +1461,8 @@ pub fn commit_prepared(s: &mut Session, opts: &ImportOptions, now: &str, prepare
}
}
let sidecar = sidecar.map(|sc| sc.resolve_label(&s.catalog)).filter(|sc| *sc != crate::sidecar::SidecarData::default());
// the photo is upright as the file's own orientation turns it, when the file states one
let sidecar = sidecar.map(|sc| crate::sidecar::SidecarData { orientation: info.orientation.or(sc.orientation), ..sc });
// a copy is catalogued under its new name
let name = Path::new(&stored).file_name().map(|n| n.to_string_lossy().to_string()).unwrap_or_else(|| path.clone());
let mut p = Photo::new(id, Source::File { path: stored }, &name, &info.format, info.width, info.height, &now);
Expand Down
3 changes: 3 additions & 0 deletions crates/engine/src/media.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1744,6 +1744,9 @@ pub struct ProbeInfo {
pub embedded_lens: Option<lightcraft_develop::EmbeddedLens>,
/// The file's embedded XMP packet (raw/DNG files), for develop settings stored inside the file.
pub xmp: Option<String>,
/// The file's Exif orientation, when it states one: how its stored pixels turn upright (`width` and `height` are
/// the upright size).
pub orientation: Option<lightcraft_geom::Orientation>,
/// A raw variant that can't be decoded yet: why. The file is described (and will be shown and
/// edited) from its embedded preview; see [`lightcraft_catalog::Photo::preview_only`].
pub preview_only: Option<String>,
Expand Down
334 changes: 332 additions & 2 deletions crates/engine/src/sidecar.rs

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions crates/engine/src/sync.rs
Original file line number Diff line number Diff line change
Expand Up @@ -618,7 +618,7 @@ fn sidecar_has_news(labels: &Catalog, p: &Photo, naming: SidecarNaming, listing:
}
let Ok(text) = std::fs::read_to_string(&file) else { return false };
let Ok(sc) = crate::sidecar::parse_sidecar(&text, crate::crs::Target::for_photo(p)) else { return false };
let sc = sc.resolve_label(labels);
let sc = sc.with_file_orientation(path).resolve_label(labels);
let mut q = p.clone();
crate::sidecar::merge_into(&mut q, &sc, "");
(q.rating, q.flag, q.label, &q.meta, &q.captured, &q.develop) != (p.rating, p.flag, p.label, &p.meta, &p.captured, &p.develop)
Expand Down Expand Up @@ -801,7 +801,7 @@ fn read_sidecar(path: &str, naming: SidecarNaming, target: crate::crs::Target) -
return Err(format!("{}: too large for an XMP sidecar", file.display()));
}
let text = std::fs::read_to_string(&file).map_err(|e| format!("{}: {e}", file.display()))?;
crate::sidecar::parse_sidecar(&text, target).map_err(|e| format!("{}: {e}", file.display()))
crate::sidecar::parse_sidecar(&text, target).map(|sc| sc.with_file_orientation(path)).map_err(|e| format!("{}: {e}", file.display()))
}

impl SyncCommit {
Expand Down
91 changes: 91 additions & 0 deletions crates/engine/src/tests_xmp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -462,6 +462,97 @@ fn regions_from_sidecar_are_read_on_import() {
let _ = std::fs::remove_dir_all(&src);
}

/// MWG regions as an app that draws on the photo as stored writes them for [`write_turned_jpeg`]'s photo: its stored
/// 32 × 24 as `AppliedToDimensions` and no box saying how the photo was turned (no `mwg-rs:Rotation`). One face, its
/// box centred at (0.25, 0.4), 0.1 × 0.15 of that size.
const STORED_FRAME_REGIONS: &str = r#"<x:xmpmeta xmlns:x="adobe:ns:meta/">
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about=""
xmlns:mwg-rs="http://www.metadataworkinggroup.com/schemas/regions/"
xmlns:stArea="http://ns.adobe.com/xmp/sType/Area#"
xmlns:stDim="http://ns.adobe.com/xap/1.0/sType/Dimensions#">
<mwg-rs:Regions rdf:parseType="Resource">
<mwg-rs:AppliedToDimensions rdf:parseType="Resource" stDim:w="32" stDim:h="24" stDim:unit="pixel"/>
<mwg-rs:RegionList>
<rdf:Bag>
<rdf:li rdf:parseType="Resource" mwg-rs:Name="Hannah" mwg-rs:Type="Face">
<mwg-rs:Area rdf:parseType="Resource" stArea:x="0.25" stArea:y="0.4" stArea:w="0.1" stArea:h="0.15" stArea:unit="normalized"/>
</rdf:li>
</rdf:Bag>
</mwg-rs:RegionList>
</mwg-rs:Regions>
</rdf:Description>
</rdf:RDF>
</x:xmpmeta>"#;

/// A JPEG of 32 × 24 pixels stored sideways (Exif orientation 6, shown 24 × 32), with `packet` embedded when given.
fn write_turned_jpeg(path: &Path, packet: Option<&str>) {
let img = lightcraft_raster::Rgba8::from_fn(32, 24, |x, y| [(x * 7) as u8, (y * 9) as u8, 90, 255]);
let exif =
lightcraft_meta::write_exif(&lightcraft_meta::Metadata { orientation: Some(lightcraft_meta::Orientation::Rotate90), ..Default::default() });
let meta = lightcraft_codecs::EncodeMeta { exif: Some(&exif), xmp: packet, ..Default::default() };
let bytes = lightcraft_codecs::encode_jpeg(&lightcraft_codecs::EncodeImage::rgba8(&img), 90, Default::default(), &meta).unwrap();
std::fs::write(path, bytes).unwrap();
}

/// Put more than the first MiB of APP15 segments between the JPEG at `path`'s start and its Exif.
fn pad_before_exif(path: &Path) {
let bytes = std::fs::read(path).unwrap();
let mut padded = bytes[..2].to_vec();
for _ in 0..17 {
padded.extend_from_slice(&[0xFF, 0xEF, 0xFF, 0xFF]);
padded.extend(std::iter::repeat_n(0, 0xFFFD));
}
padded.extend_from_slice(&bytes[2..]);
std::fs::write(path, padded).unwrap();
}

/// The face's box from [`STORED_FRAME_REGIONS`] on the upright photo: turned a quarter turn clockwise with it.
fn assert_on_the_upright_face(s: &Session, id: PhotoId, when: &str) {
let p = s.catalog.photo(id).unwrap();
assert_eq!((p.width, p.height), (24, 32), "the photo is upright");
let r = p.meta.regions.first().map(|r| r.rect).unwrap_or_default();
let want = [0.525, 0.2, 0.675, 0.3];
let got = [r.x0, r.y0, r.x1, r.y1];
assert!(got.iter().zip(want).all(|(g, w)| (g - w).abs() < 1e-9), "{when}: the box is where the photo as stored had the face: {got:?}");
assert_eq!(p.meta.regions.len(), 1, "{when}");
}

/// Issue #2674: face boxes an app drew on a photo as stored (its sideways size as `AppliedToDimensions`, no
/// `mwg-rs:Rotation`) land on the faces of the photo as LightCraft shows it, upright: when imported, and when the
/// file's metadata is read again (the packet itself doesn't say how the photo turns; the file's Exif does). The
/// image's own size decides, not one the XMP states upright, and the Exif is found past the first MiB of the file.
#[test]
fn regions_drawn_on_the_photo_as_stored_land_on_the_upright_photo() {
let src = temp_dir("regions-stored-frame");
let embedded = src.join("embedded.jpg");
write_turned_jpeg(&embedded, Some(STORED_FRAME_REGIONS));
let beside = src.join("sidecar.jpg");
write_turned_jpeg(&beside, None);
std::fs::write(src.join("sidecar.xmp"), STORED_FRAME_REGIONS).unwrap();
// an Exif without a pixel size, and an XMP size of the upright photo
let stated = src.join("stated.jpg");
let upright_size = r#"rdf:about="" xmlns:tiff="http://ns.adobe.com/tiff/1.0/" tiff:ImageWidth="24" tiff:ImageLength="32""#;
write_turned_jpeg(&stated, Some(&STORED_FRAME_REGIONS.replace(r#"rdf:about="""#, upright_size)));
let late = src.join("late.jpg");
write_turned_jpeg(&late, None);
pad_before_exif(&late);
std::fs::write(src.join("late.xmp"), STORED_FRAME_REGIONS).unwrap();
for (file, what) in [(&embedded, "embedded XMP"), (&beside, "sidecar"), (&stated, "upright size in the XMP"), (&late, "Exif after the first MiB")]
{
let mut s = Session::new().with_fs();
let r = s.execute("library.import", &json!({"paths": [file.to_string_lossy()]})).unwrap();
assert_eq!(r["imported"].as_array().map(Vec::len), Some(1), "{r}");
let id = only(&s);
assert_on_the_upright_face(&s, id, &format!("{what}, imported"));
let read = s.execute("photo.readMetadataFromFile", &json!({"ids": [id.0]})).unwrap();
assert_eq!(read["failed"], json!([]), "{read}");
assert_eq!(read["read"].as_array().map(Vec::len), Some(1), "{what}: {read}");
assert_on_the_upright_face(&s, id, &format!("{what}, read again"));
}
let _ = std::fs::remove_dir_all(&src);
}

/// Removing a face box is a catalog-only, undoable edit: it never rewrites the sidecar (Lightroom's
/// regions and everything else in it stay byte for byte), even with auto-write on.
#[test]
Expand Down
135 changes: 129 additions & 6 deletions crates/meta/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,7 @@ impl Metadata {
pub fn extract(bytes: &[u8]) -> Metadata {
let e = embedded(bytes);
let exif = e.exif.as_deref().map(read_exif).unwrap_or_default();
let xmp = e.xmp.as_deref().and_then(|xmp| parse_xmp(xmp).ok()).map(|xmp| xmp.metadata);
let xmp = e.xmp.as_deref().and_then(|xmp| parse_xmp(xmp).ok());
extract_embedded(e, exif, xmp)
}

Expand All @@ -299,24 +299,46 @@ pub fn try_extract(bytes: &[u8]) -> Result<Metadata, ExtractError> {
None => Metadata::default(),
};
let xmp = match e.xmp.as_deref() {
Some(xmp) if is_psd => Some(parse_xmp(xmp).map_err(|_| ExtractError::MalformedPsd)?.metadata),
Some(xmp) => parse_xmp(xmp).ok().map(|xmp| xmp.metadata),
Some(xmp) if is_psd => Some(parse_xmp(xmp).map_err(|_| ExtractError::MalformedPsd)?),
Some(xmp) => parse_xmp(xmp).ok(),
None => None,
};
Ok(extract_embedded(e, exif, xmp))
}

fn extract_embedded(e: Embedded, mut m: Metadata, xmp: Option<Metadata>) -> Metadata {
fn extract_embedded(e: Embedded, mut m: Metadata, xmp: Option<XmpData>) -> Metadata {
if let Some(i) = e.iptc.as_deref() {
m.fill_missing(&parse_iptc(i));
}
if let Some(xmp) = xmp {
m.overlay_user_fields(&xmp);
m.fill_missing(&xmp);
m.overlay_user_fields(&xmp.metadata);
m.fill_missing(&xmp.metadata);
// boxes another app drew on the photo as stored go where the upright photo has them (#2674)
if let (Some(drawn_on), Some(orientation), Some(w), Some(h)) = (xmp.regions_drawn_on(), m.orientation, m.width, m.height) {
upright_regions(&mut m.regions, drawn_on, orientation, (w, h));
Comment thread
coderabbitai[bot] marked this conversation as resolved.
Resolved
}
}
m
}

/// Turn regions drawn on a photo as it is stored onto the upright photo. MWG gives each box as a fraction of
/// `AppliedToDimensions` (`drawn_on`); for a photo whose Exif `orientation` turns it a quarter turn, some apps give the
/// stored, sideways size there and boxes on the stored pixels to match (Lightroom says so per box with
/// `mwg-rs:Rotation` instead, which [`parse_xmp`] reads). When `drawn_on` has the shape of the photo as stored
/// (`stored`, before `orientation`) rather than the upright one, every box is turned with `orientation`. Returns
/// whether they were. A square photo or `drawn_on` looks the same both ways, and a half turn or a mirror doesn't
/// change the shape: their boxes are left as they are.
pub fn upright_regions(regions: &mut [Region], drawn_on: (f64, f64), orientation: Orientation, stored: (u32, u32)) -> bool {
let ((dw, dh), (sw, sh)) = (drawn_on, stored);
if regions.is_empty() || !orientation.swaps_axes() || sw == sh || dw == dh || (dw > dh) != (sw > sh) {
return false;
}
for r in regions.iter_mut() {
r.rect = orientation.map_norm_rect(r.rect);
}
true
}

/// A container-level error reported by [`try_extract`].
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum ExtractError {
Expand Down Expand Up @@ -423,4 +445,105 @@ mod tests {
assert_eq!(m.metering_name(), Some("Pattern"));
assert_eq!(m.exposure_program_name(), Some("Aperture-priority AE"));
}

/// An MWG regions packet with one face, its box centred at (0.25, 0.4) and 0.1 × 0.15 of `AppliedToDimensions`
/// `w` × `h`; `extra` goes on the region (e.g. Lightroom's `mwg-rs:Rotation`).
fn regions_packet(w: u32, h: u32, extra: &str) -> String {
format!(
r#"<x:xmpmeta xmlns:x="adobe:ns:meta/"><rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="" xmlns:mwg-rs="http://www.metadataworkinggroup.com/schemas/regions/"
xmlns:stArea="http://ns.adobe.com/xmp/sType/Area#" xmlns:stDim="http://ns.adobe.com/xap/1.0/sType/Dimensions#">
<mwg-rs:Regions rdf:parseType="Resource">
<mwg-rs:AppliedToDimensions rdf:parseType="Resource" stDim:w="{w}" stDim:h="{h}" stDim:unit="pixel"/>
<mwg-rs:RegionList><rdf:Bag>
<rdf:li rdf:parseType="Resource" mwg-rs:Name="Hannah" mwg-rs:Type="Face"{extra}>
<mwg-rs:Area rdf:parseType="Resource" stArea:x="0.25" stArea:y="0.4" stArea:w="0.1" stArea:h="0.15" stArea:unit="normalized"/>
</rdf:li>
</rdf:Bag></mwg-rs:RegionList>
</mwg-rs:Regions>
</rdf:Description></rdf:RDF></x:xmpmeta>"#
)
}

fn near(r: Rect, b: [f64; 4]) -> bool {
[r.x0 - b[0], r.y0 - b[1], r.x1 - b[2], r.y1 - b[3]].iter().all(|d| d.abs() < 1e-9)
}

/// The face's box as drawn: on the photo as stored, or on the upright one by apps that draw there.
const DRAWN: [f64; 4] = [0.2, 0.325, 0.3, 0.475];
/// The same box on the photo turned upright by Exif orientation 6 (a quarter turn clockwise).
const TURNED_6: [f64; 4] = [0.525, 0.2, 0.675, 0.3];

#[test]
fn boxes_drawn_on_the_stored_photo_turn_with_its_orientation() {
let region = || Region {
rect: Rect { x0: DRAWN[0], y0: DRAWN[1], x1: DRAWN[2], y1: DRAWN[3] },
kind: RegionKind::Face,
name: None,
description: None,
};
let turned = |o: Orientation, drawn_on: (f64, f64), stored: (u32, u32)| {
let mut regions = [region()];
let did = upright_regions(&mut regions, drawn_on, o, stored);
(did, regions[0].rect)
};
// drawn on the 6000 × 4000 photo as stored: every quarter turn and its mirror image land elsewhere
for (o, want) in [
(Orientation::Rotate90, TURNED_6),
(Orientation::Rotate270, [0.325, 0.7, 0.475, 0.8]),
(Orientation::Transpose, [0.325, 0.2, 0.475, 0.3]),
(Orientation::Transverse, [0.525, 0.7, 0.675, 0.8]),
] {
let (did, r) = turned(o, (6000.0, 4000.0), (6000, 4000));
assert!(did && near(r, want), "{o:?}: {r:?}");
// a smaller copy of the photo as stored is the same frame
assert!(near(turned(o, (1500.0, 1000.0), (6000, 4000)).1, want), "{o:?} on a smaller size");
}
// drawn on the upright photo (MWG's own frame), or where the shape can't tell the two apart: as they are
for (o, drawn_on, stored) in [
(Orientation::Rotate90, (4000.0, 6000.0), (6000, 4000)),
(Orientation::Rotate90, (4000.0, 4000.0), (6000, 4000)),
(Orientation::Rotate90, (4000.0, 4000.0), (4000, 4000)),
(Orientation::Rotate180, (6000.0, 4000.0), (6000, 4000)),
(Orientation::FlipH, (6000.0, 4000.0), (6000, 4000)),
(Orientation::Normal, (6000.0, 4000.0), (6000, 4000)),
] {
let (did, r) = turned(o, drawn_on, stored);
assert!(!did && near(r, DRAWN), "{o:?} drawn on {drawn_on:?} of {stored:?}: {r:?}");
}
}

/// Issue #2674: an app that doesn't say how the photo was turned (no `mwg-rs:Rotation`) drew the faces of a photo
/// with Exif orientation 6 on its stored pixels, with the stored 6000 × 4000 as `AppliedToDimensions`. The boxes
/// land on the faces of the upright photo, not where the stored photo had them.
#[test]
fn regions_drawn_on_the_stored_photo_are_read_onto_the_upright_one() {
let jpeg = |packet: &str| {
let mut j = vec![0xff, 0xd8];
let mut seg = |payload: Vec<u8>| {
j.extend([0xff, 0xe1]);
j.extend(u16::try_from(payload.len() + 2).unwrap().to_be_bytes());
j.extend(payload);
};
// orientation 6, 6000 × 4000 as stored
seg([b"Exif\0\0".as_slice(), &crate::exif::tests::sample_exif(lightcraft_tiff::ByteOrder::Little)].concat());
seg([b"http://ns.adobe.com/xap/1.0/\0".as_slice(), packet.as_bytes()].concat());
j.extend([0xff, 0xd9]);
j
};
let read = |packet: &str| {
let m = extract(&jpeg(packet));
assert_eq!((m.orientation, m.width, m.height), (Some(Orientation::Rotate90), Some(6000), Some(4000)));
assert_eq!(try_extract(&jpeg(packet)).unwrap().regions, m.regions);
assert_eq!(m.regions.len(), 1);
m.regions[0].rect
};
let stored = read(&regions_packet(6000, 4000, ""));
assert!(near(stored, TURNED_6), "drawn on the photo as stored: {stored:?}");
let upright = read(&regions_packet(4000, 6000, ""));
assert!(near(upright, DRAWN), "drawn on the upright photo, MWG's way: {upright:?}");
// Lightroom's boxes say how the photo was turned: turned once, by that
let lightroom = read(&regions_packet(6000, 4000, r#" mwg-rs:Rotation="-1.57080""#));
assert!(near(lightroom, TURNED_6), "Lightroom's −π/2: {lightroom:?}");
}
}
Loading
Loading