LR 3.4: Export as JPEG, metadata using "quality" vs. "limit file size"

  • 1
  • Problem
  • Updated 7 years ago
LR 3.4: Export as JPEG, metadata using "quality" vs. "limit file size"

I posted this a while ago on the adobe forums, but there was no answer. Furthermore, I am not sure whether my entry in the old bug report form was saved and processed, so I repeat my question here. I apologize for the redundancy, but I think this problem is important enough to be posted here (again):

I found some unexpected differences between using "quality" and "limit file size" when exporting a RAW file (a Canon 40D CR2 in this case) as a JPEG with respect to the meta data in the exported file. Some of that was already present in 3.3 and 3.4RC, but now the following differences can be found in 3.4 final, which I installed on WinXP 32Bit SP3. I compared the meta data using exiftool. The tag names below are the "short" tag names used by exiftool.

A. Differences between "quality" and "limit filesize" when "minimize embedded metadata" is OFF:
1. With "quality", all brush strokes are included in what seems to be an XMP extension (?), but with "limit filesize", they are not included. However, with "limit filesize", one must still specify a file size greater than the metadata used by brush strokes, or the export will fail. I have an example here (many many brush strokes) that exports a file with 77K when the file size limit is set to 500K (and fails for 300K). This may be true for other local corrections, too - but I did not test that.
2. With "quality", Exif tag "Software" with value "Adobe Photoshop Lightroom 3.4" is included, but with "limit filesize", it is not.
3. With "quality", Exif tag "ExifVersion" equals "0230", but with "limit filesize", it equals "0221".
4. With "quality", Exif tag "WhiteBalance" is NOT included, but with "limit filesize", it IS.
5. With "quality", all Exif GPS tags are included, but with "limit filesize", they are not.
6. With "quality", a thumbnail is included, but with "limit filesize", it is not.
7. With "quality", XMP tag "ApproximateFocusDistance" is included, but with "limit filesize", it is not.
8. With "limit filesize", XMP tags FlashFired, FlashReturn, FlashMode, FlashFunction, FlashRedEyeMode are included, but with "quality", they are not.
9. Development settings are included in both, but with "limit filesize", they are in a "SavedSettingsParameters" variant, e.g. "quality": SaturationAdjustmentOrange, "limit filesize": SavedSettingsParametersSaturationAdjustmentOrange.
10. With "quality", XMP tag "MetadataDate" seems to be the timestamp of the export (with time zone +02:00), but with "limit filesize", it seems to be the timestamp of the import (?), and with a different time zone (-02:00).
11. With "quality", XMP tag "WhiteBalance" equals "Custom", but with "limit file size" (as "SavedSettingsParametersWhiteBalance", see above), it equals "As Shot" (but in LR, WB is set to "custom"!)

B. Differences between "quality" and "limit filesize" when "minimize embedded metadata" is ON:
1. Again, with "limit filesize", one must still specify a file size greater than the metadata used by brush strokes, or the export will fail - even though it was explicitely requested to minimize the metadata.
2. With "quality", Exif tag "ExifVersion" is not present, but with "limit filesize", it equals "0221".
3. Again, With "quality", a thumbnail is included, but with "limit filesize", it is not.
4. With "limit filesize", the XMP tags WebStatement, UsageTerms, ExifImageWidth and ExifImageHeight are included, but with "quality", they are not.
5. Last but not least, the following Exif tags are unexpectedly *included* with "limit filesize" - even though it was explicitely requested to minimize the metadata:
* Make (!!!)
* Model (!!!)
* ModifyDate
* ExposureTime
* FNumber
* ExposureProgram
* ISO
* DateTimeOriginal (!!!)
* CreateDate
* ShutterSpeedValue
* ApertureValue
* ExposureCompensation
* MaxApertureValue
* SubjectDistance
* MeteringMode
* Flash
* FocalLength
* SubSecTime
* SubSecTimeOriginal
* SubSecTimeDigitized
* FocalPlaneXResolution
* FocalPlaneYResolution
* FocalPlaneResolutionUnit
* CustomRendered
* ExposureMode
* WhiteBalance
* SceneCaptureType
* SerialNumber (!!!)
* LensInfo (!!!)
* LensModel (!!!)
* ... These are practically all Exif data that the camera provides. The ones marked with "!!!" may be relevant to data privacy when you think that "minimize embedded metadata" filters out all this critical stuff.

There may be other differences depending on images type and camera model. However, it seems that in general, "quality" and "limit filesize" behave completely different - but why??

P.S. The same problems still seem to exist in LR 3.4.1.
Photo of LRuserXY

LRuserXY

  • 426 Posts
  • 41 Reply Likes
  • confused

Posted 7 years ago

  • 1
Photo of Mark Sirota

Mark Sirota

  • 146 Posts
  • 29 Reply Likes
This is a known problem. Most of the differences are because Limit File Size still uses the old metadata engine; it didn't get the upgrade in 3.4 that normal exports go, mostly to follow Metadata Working Group guidance.

There are other differences that persist as well, as you noted -- for example, Limit File Size suppresses the embedded thumbnail, as it has for a while.

I've stopped using Limit File Size until it gets the love it needs.
Photo of LRuserXY

LRuserXY

  • 426 Posts
  • 41 Reply Likes
Just an update for 3.5 RC: The problem with the unexpected Exif data using "limit filesize" and "minimize embedded metadata" has been fixed (see release notes), but as far as I can see, most of the other problems still persist, except that "limit filesize" now uses Exif version "0230", the same as for quality-based exports.

Most notably, the following problem is still present for "limit filesize": The XMP development settings are never included (even if "minimize embedded metadata" is *not* used - see below in last paragraph), however they are always calculated into the file size (even if "minimize embedded metadata" *is* used), so it is not possible to export a photo containing e.g. 400KB brush strokes using using "limit filesize" with a limit of e.g. 100K and "minimize embedded metadata" - one must specify e.g. 500KB, but the resulting file will be only ~100KB (because the XMP development settings are omitted).

I didn't go into details this time, but it seems that some other minor differences are still there, e.g. the missing thumbnail when using "limit filesize".

Note: In my original posting, I wrote about the "SavedSettingsParameters" develop setting variants that seem to be used for "limit file size" (without "minimize embedded metadata"). Now I think that they seem to be the settings of the *snapshots* (with tag "SavedSettingsName" set to the name of the snapshot). If all snapshots are deleted, no XMP develop settings are saved at all for "limit file size". And for quality-based exports, snapshots seem to be never included in the XMP. This is all a little bit strange - why include snapshots, but not the current settings?
Photo of Mark Sirota

Mark Sirota

  • 146 Posts
  • 29 Reply Likes
It is by design that the XMP CRS schema and the embedded thumbnail are suppressed with Limit File Size, or so I was told when I initially asked about it.

You may be right that this is not taken into account when the size is calculated; I have not tested this yet myself.
Photo of LRuserXY

LRuserXY

  • 426 Posts
  • 41 Reply Likes
Ok, but when CRS is supressed, it makes really no sense to include all the snapshots instead ;-)
Photo of LRuserXY

LRuserXY

  • 426 Posts
  • 41 Reply Likes
One more thing concerning the strange effects with the XMP data and the snapshots: I used a test photo that has about 370KB of XMP data for brush strokes. I then created 4 identical snapshots each containing all the brush strokes.

The results are quite interesting:

Export with quality 100: Resulting file size is 765 KB, which includes the brush strokes of the current (!) development settings.

Export with limit file size 9999K: Resulting file size is 1617 KB (!), which includes 4 snapshots each containing all the brush strokes. But not the current develop settings.

By the way: When saving metadata to the original file, that file (or the sidecar) also grows quite large (1750KB for this example), and LR needs nearly 30 seconds (!) to write the sidecar (XP, Intel Core2 6700).

P.S. To view the hierarchical/structured XMP data using exiftool, use the options -struct or -duplicates, and optionally -xmlformat or -json. A plain exiftool call without any parameters will "flatten" the hierarchical XMP structure, so one cannot see e.g. multiple snapshots ("Saved Settings") - i made that error in my original post.