Skip to main content
Participant
February 24, 2025
Under Review

P: Recalculate Face region(s) when source image has been cropped or rotated/mirrored (Web Module)

  • February 24, 2025
  • 5 replies
  • 393 views

If an image containing face regions has been cropped and/or rotated/mirrored, the face regions in the exported image are not adjusted accordingly.

 

Easy to reproduce. Take any image that has a face identified within it - to make this bug more obvious, have the face NOT in the center of the image (lets say it was on the right hard side of the pic at x~0.75). Crop the image so that the face is roughly centered (ie. x~0.5). Now export the image and look at the EXIF face region tags (RegionAreaX, RegionAreaY, etc). The values have not been adjusted for the crop. Ie. for my example, the RegionAreaX should be around 0.5 but will still be ~0.75. Similar issues occur for the y, width, and height values.

 

Mirror flipping the image horizontally or vertically, or rotating 90, 180, 270 also result in wrong face region values in the exported image.

 

I am using the latest Lightroom Classic 14.2 on Windows 10 x64 but the issue existed in previous versions as well.

Lightroom Classic version: 14.2 [ 202502071718-3869eef7 ]

Internal Camera Raw version: 17.2 [ 2155 ]

 

 

 

5 replies

Rikk Flohr_Photography
Community Manager
Community Manager
February 27, 2025

@johnrellis  I have placed it as the team requested. A ticket is created and tracked. If the team requests to move it to bugs, I will do so. 

Rikk Flohr: Adobe Photography Org
johnrellis
Legend
February 27, 2025

[This post contains formatting and embedded images that don't appear in email. View the post in your Web browser.]

 

@Rikk Flohr: Photography, if the Web module isn't adjusting XMP face regions for cropped or rotated exported photos, that is a "bug" according to Adobe's definition -- LR isn't obeying the designed behavior publicly announced for Camera Raw 6.4 and LR 3.4. 

 

In March 2011, Adobe employee David Franzen announced that Camera Raw 6.4 and LR 3.4 would be obeying the Metadata Working Group Guidance:

https://www.lightroomqueen.com/community/threads/camera-raw-6-4-and-lightroom-3-4-public-betas-add-metadata-working-group-support.11522/ 

 

 

(See also his post below.)

 

The MWG spec defines how face regions are recorded in XMP metadata, and the spec requires that the regions should be adjusted when photos are cropped or rotated:

https://web.archive.org/web/20180919181934/http://www.metadataworkinggroup.org/pdf/mwg_guidance.pdf 

 

@MarkCulp  says the Web module adjusting face regions in exported photos, though the Export module does. Thus, the Web module wouldn't be obeying the MWG spec. By declaring the Web module's behavior "as designed" and not a bug, are the developers now withdrawing the public commitment to the MWG spec made in 2011, to keep their bug counts low?

 

--------------------------------------------

 

 

johnrellis
Legend
February 27, 2025

@Rikk Flohr: Photography: If the Web module isn't adjusting the face regions in the exported photos' metadata, that is a clear bug according to Adobe's definition of "bug" -- LR isn't obeying the as-designed behavior publicly announced years ago.

 

Adobe employee David Franzen announced in March 2011 that Camera Raw 6.4 and Lightroom 3.4 now followed the Metadata Working Group Guidelines:

https://www.lightroomqueen.com/community/threads/camera-raw-6-4-and-lightroom-3-4-public-betas-add-metadata-working-group-support.11522/ 

 

The MWG spec defines the XMP metadata fields for face regions and requires that the regions be adjusted when the image is cropped or rotated:

https://web.archive.org/web/20180919181934/http://www.metadataworkinggroup.org/pdf/mwg_guidance.pdf

 

The Web module isn't obeying the MWG spec to which Adobe committed, though the Export module does obey it. Has the LR team withdrawn their announced commitment to that spec?

 

------------------------------------------------------------------------------------------------------------------

From: Photoshop Family <noreply.photoshop_family@getsatisfaction.com>
Sent: Wednesday, April 27, 2011 12:50 PM
To: Photoshop Family <noreply.photoshop_family@getsatisfaction.com>
Subject: New reply: "Lightroom 3.4RC not exporting XMP EXIF schema properties?"

 

David Franzen replied to Lightroom 3.4RC not exporting XMP EXIF schema properties?, a problem about Photoshop Family.

 

Lightroom 3.4 and Camera Raw 6.4 now follow the guidance provided by the Metadata Working Group for recording metadata in files that contain both native Exif and XMP packets. Photoshop CS5 was the first Adobe app to ship with MWG support, so Camera Raw and Lightroom are just catching up in this respect.

A specific example germaiin to this thread is that most Exif properties are now only written once, in the native Exif block, and not duplicated as XMP tags in the exif: and tiff: namespaces.

Where Exif properties are mapped to XMP properties outside the tiff: and exif: nameapsaces--for example the TIFF Artist tag is mapped to the dc:creator XMP property--the property values are kept in sync in both the native Exif and XMP (and native IPTC IIM for that matter).

You can find the complete MWG specifications here:
http://www.metadataworkinggroup.org/

WRT some of the other topics in this thread (like multi-byte text, and date-time handling)... well, the MWG specification really describes these issues better than I can, so I refer the technically curious to start there.

A good, Adobe-hosted, place to ask follow-up questions WRT the MWG and metadata handling might be the Adobe XMP developers forum: http://forums.adobe.com/community/des.... There may be other relevant, non-Adobe forums as well.


Go look at this reply

This solves the problem! | Comment | Stop following this problem

jsed

 

This message sent from Get Satisfaction.
To unsubscribe or change your email settings, click here.

 

Rikk Flohr_Photography
Community Manager
Community Manager
February 27, 2025

This has been transferred to Ideas at the team's request. 

Rikk Flohr: Adobe Photography Org
johnrellis
Legend
February 26, 2025

[This post contains formatting and embedded images that don't appear in email. View the post in your Web browser.]

 

Hmm, I'm not seeing that incorrect behavior. I took this photo with an identified face:

 

and cropped it:

 

and exported it with all metadata and then imported it back into the catalog. That newly imported photo shows the same location of the face rectangle.  Exiftool shows that the XMP description of the region in the original photo:

[XMP]           Region Rotation                 : 0.00000
[XMP]           Region Name                     : Jamie
[XMP]           Region Type                     : Face
[XMP]           Region Area H                   : 0.16211
[XMP]           Region Area W                   : 0.24340
[XMP]           Region Area X                   : 0.52639
[XMP]           Region Area Y                   : 0.21680

 

has been adjusted in the exported photo:

[XMP]           Region Rotation                 : 0.00000
[XMP]           Region Name                     : Jamie
[XMP]           Region Type                     : Face
[XMP]           Region Area H                   : 0.31174
[XMP]           Region Area W                   : 0.35340
[XMP]           Region Area X                   : 0.31236
[XMP]           Region Area Y                   : 0.41690

 

To make progress on understanding what you're seeing, select the original, cropped photo and do Metadata > Save Metadata To File, and then export it. Upload the original photo (and it's .xmp sidecar if it's raw) and the exported photo to Wetransfer, Dropbox, Google Drive or similar free service and post the sharing links here.

 

 

MarkCulpAuthor
Participant
February 26, 2025

Thank you for looking at my issue. I will apologise that it appears that I missed including an important piece of the puzzle, and that is that I am using the Web Export feature of LrC to build web pages (which have ~3000 images), and then I post process the images to extract the face regions and include that meta data information to allow the viewer to draw boxes around each face. The images that are created by the Web Export do not have the face regions adjusted.

 

In case it matters, my source images are TIF files (which I have created by scanning photographs, documents, etc), and I am post processing the exported images using Perl's api to Phil Harvey's wonderful ExifTool.

 

FWIW Several weeks ago I had thought I had also seen the problem using the 'normal' export but upon retesting today it appears that using that method does do the right thing. Sorry for confusion. If you still would like me to provide a sample then let me know and I'll endevour to do so.