• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers

P: Exported JPEGs missing mandatory PixelXDimension and PixelYDimension EXIF tags

0 Votes
LEGEND ,
Dec 08, 2022 Dec 08, 2022

Copy link to clipboard

Copied

JPEGs exported by LR are missing the PixelXDimension and PixelYDimension EXIF tags (image width and height), required by EXIF Version 2.32 (and prior versions going back to at least EXIF Version 2.2, 2002).  This trips up software libraries expecting to find those mandatory tags. 

 

Tested on LR 12.0.1 / Mac OS 12.6.1 and LR 6.14 / Windows 10.

 

To reproduce:

 

1. Export any photo from LR as a JPEG.

 

2. Run this Exiftool command on the exported JPEG:

 

exiftool -a -G -EXIF:ExifImageWidth -EXIF:ExifImageHeight file.jpg

 

(Exiftool calls PixelXDimension and PixelYDimension "ExifImageWidth" and "ExifImageHeight".)

 

Here's the relevant section from the EXIF Version 2.32 specification (page 44):

 

johnrellis_0-1670531379394.png

Note that Photoshop correctly writes those tags, though it also writes EXIF:ImageWidth and EXIF:ImageLength, which violates the standard in a different way (page 28):

 

johnrellis_1-1670531663336.png

 

 

 

Bug Acknowledged
TOPICS
macOS , Windows

Views

185

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Pinned Reply

Adobe Employee , Jan 12, 2023 Jan 12, 2023

Missing status

Status Acknowledged

Votes

Translate

Translate
11 Comments
New Here ,
Dec 08, 2022 Dec 08, 2022

Copy link to clipboard

Copied

I can not get Lightroom to export any pixel dimensions.

 

I have all metadata export enabled. When I use a Windows EXIF viewer, no dimensions are present. When using the JS EXIFR package, same thing, nothing is present.

 

Other users are having this same issue: https://www.reddit.com/r/Lightroom/comments/yheq9r/image_dimensions_not_included_in_exif_data_for/

Votes

Translate

Translate

Report

Report
LEGEND ,
Dec 08, 2022 Dec 08, 2022

Copy link to clipboard

Copied

All the export formats require the image pixel dimensions to be included -- it's not possible to have a JPEG, for example, without specifying the width and height in pixels.  Otherwise, how could the image be displayed by viewers?


Attach one of the exported JPEGs here and we'll put it under the microscope.

Votes

Translate

Translate

Report

Report
New Here ,
Dec 08, 2022 Dec 08, 2022

Copy link to clipboard

Copied

Votes

Translate

Translate

Report

Report
New Here ,
Dec 08, 2022 Dec 08, 2022

Copy link to clipboard

Copied

And here it is attached, just in case GDrive removes any metadata.

Votes

Translate

Translate

Report

Report
Community Expert ,
Dec 08, 2022 Dec 08, 2022

Copy link to clipboard

Copied

Well something seems wrong with your EXIF viewer because the image you provided has all the necessary dimensions present as metadata:

ImageSize.jpgFileInfo.jpg

Author “Color Management for Photographers" & "Photoshop CC Color Management/pluralsight"

Votes

Translate

Translate

Report

Report
New Here ,
Dec 08, 2022 Dec 08, 2022

Copy link to clipboard

Copied

You're correct, the dimensions do show up, in certain applications.

 

I'm using EXIFR to get the metadata, for some reason the dimensions are blank for any photo that I test from Lightroom. Here's the link for the EXIFR playground.

 

https://mutiny.cz/exifr/

Votes

Translate

Translate

Report

Report
Community Expert ,
Dec 08, 2022 Dec 08, 2022

Copy link to clipboard

Copied

This isn't a Lightroom Classic issue. Clearly, LR exports the metadata. You'll have to take up the issue with whoever is making this EXIFR product, it seems like a bug....

Author “Color Management for Photographers" & "Photoshop CC Color Management/pluralsight"

Votes

Translate

Translate

Report

Report
LEGEND ,
Dec 08, 2022 Dec 08, 2022

Copy link to clipboard

Copied

I did a deep dive on this.

 

LR isn't strictly conforming with the EXIF 2.32 specification, though not in the way incorrectly assumed by that Reddit thread.

 

For compressed JPEGs, the spec requires the width and height to be recorded in the EXIF tags PixelXDimension and PixelYDimension (page 44) and in the JPEG marker segment SOF0 (page 89).  LR writes the latter but not former (without the marker segment SOF0, no reader would be able to display the image).  I filed a bug report on this:

https://community.adobe.com/t5/lightroom-classic-bugs/exported-jpegs-missing-mandatory-pixelxdimensi...

 

But note carefully that the EXIF tags mentioned by that Reddit thread, EXIF:ImageWidth and EXIF:ImageLength, should never be recorded in compressed JPEGs.  The spec says (page 28), "In JPEG compressed data, this tag shall not be used because a JPEG marker is used instead of it." (Photoshop, and probably other apps, incorrectly writes those tags for compressed JPEGs.)

 

The EXIFR library calls PixelXDimension and PixelYDimension ExifImageWidth and ExifImageHeight. Apparently, EXIFR doesn't read the JPEG marker segment SOF0 (the only place that LR writes the width and height).  It probably should.  

 

Instead of EXIFR, use Exiftool, which reads the width and height from the JPEG marker segment. In general, I rely on Exiftool as the most authoritative tool/library for examining photo/video metadata, and I incorporate it in my LR plugins.

 

 

Votes

Translate

Translate

Report

Report
Community Expert ,
Dec 09, 2022 Dec 09, 2022

Copy link to clipboard

Copied

All JPEG files are compressed. However, JPEG compression is a different thing, for example TIFF layers can use JPEG compression.

Also, there is NOT a standard for how JPEG compression is done, only how it is decompressed. That allows newer compression methods to be used as long as the finished file can be properly opened.

Votes

Translate

Translate

Report

Report
LEGEND ,
Dec 09, 2022 Dec 09, 2022

Copy link to clipboard

Copied

"All JPEG files are compressed"

 

Right, I was imprecisely copying the usage from the EXIF spec, which frequently uses the terms "uncompressed data" and "JPEG compressed data".  The spec encompasses images with uncompressed RGB data, uncompressed YCbCr data, and JPEG compressed data.

 

Files with JPEG compressed data should have the PixelX/YDimension tags and should not have ImageWidth/Length tags, and vice versa for files with uncompressed data.

Votes

Translate

Translate

Report

Report
Adobe Employee ,
Jan 12, 2023 Jan 12, 2023

Copy link to clipboard

Copied

LATEST

Missing status

Rikk Flohr - Customer Advocacy: Adobe Photography Products
Status Acknowledged

Votes

Translate

Translate

Report

Report