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

LR_DNG_previewSize in export is not working

New Here ,
Apr 26, 2024 Apr 26, 2024

Copy link to clipboard

Copied

The value of LR_DNG_previewSize does not affect the output dng file.

Value of large/medium/none all renders the same output, which appears to be medium.

 

This used to work before version 13.2

 

  • 13.2
  • OS Version Number: os X sonoma 14.2.1 (23C71)


Steps to reproduce:

 
 

 

exportSettings = {
    LR_DNG_compatibility = 117506048,
    LR_DNG_compressed = true,
    LR_DNG_conversionMethod = "preserveRAW",
    LR_DNG_embedCache = true,
    LR_DNG_embedRAW = false,
    LR_DNG_lossyCompression = true,
    LR_DNG_previewSize = "large",
    LR_embeddedMetadataOption = "all",
    LR_exportServiceProvider = "com.adobe.ag.export.file",
    LR_format = "DNG",
}
 
local session = LrExportSession({
    photosToExport = selected_photos,
    exportSettings = exportSettings,
})

for i, rendition in session:renditions() do
    local success, pathOrMessage = rendition:waitForRender()
end

 

Expected result

DNG with a "large" embedded" jpeg in "PreviewImage" in metadata.


Actual result

DNG with a "medium" embedded" jpeg in "PreviewImage" in metadata.

TOPICS
SDK

Views

201

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
LEGEND ,
Apr 26, 2024 Apr 26, 2024

Copy link to clipboard

Copied

In general, TIFFs (and DNGs) include a pyramid of reduced-resolution images. In LR 13.2, when I export a 5472 x 3648 raw as a DNG using LrExportSession with the settings you provided, I observe the following sizes for the pyramid of reduced-resolution images included in the DNG:

 

johnrellis_0-1714156364013.png

 

The largest reduced-resolution image in "medium" is 2048 x 1365, while the largest in "large" is 5472 x 3648. This seems correct to me.

 

You can see all the reduced-resolution images in a TIFF (and DNG) using "exiftool -a -G1".

Votes

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
New Here ,
Apr 30, 2024 Apr 30, 2024

Copy link to clipboard

Copied

Thank you for your swift response.

 

We seem to have pinpointed the error to Camera Raw 15.3 when lossy compression is enabled.

Please see provided output:

 

Camera Raw 15.3 No lossy compression:
[SubIFD2]       JpgFromRaw                      : (Binary data 4350308 bytes, use -b option to extract)
[SubIFD1]       PreviewImage                    : (Binary data 162424 bytes, use -b option to extract)
[IFD0]          ThumbnailTIFF                   : (Binary data 131544 bytes, use -b option to extract)

Camera Raw 15.3 Lossy compression:
[IFD0]          PreviewImage                    : (Binary data 17398 bytes, use -b option to extract)

Camera Raw 14.0 Lossy compression:
[SubIFD2]       JpgFromRaw                      : (Binary data 4350478 bytes, use -b option to extract)
[IFD0]          PreviewImage                    : (Binary data 17405 bytes, use -b option to extract)
[SubIFD1]       PreviewImage                    : (Binary data 162434 bytes, use -b option to extract)

Votes

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
LEGEND ,
Apr 30, 2024 Apr 30, 2024

Copy link to clipboard

Copied

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

 

I think you're seeing a bug in Exiftool, not in Camera Raw. For SubIFDs using JPEG XL compression rather than JPEG compression, Exiftool doesn't display the field PreviewImage.  Use this command to examine the sizes of the reduced-resolution previews included in the DNGs:

 

exiftool -a -G1 -filesize -imagewidth -imageheight -subfiletype -compression file.dng | sort

 

 

My LR 13.2 (which includes Camera Raw 16.2) is operating correctly with exported DNGs.  Regardless of lossy compression, when preview size is set to large, the largest preview is 5472 x 3648, but when the preview size is medium, the largest preview is 2048 x 1365:

johnrellis_0-1714504111997.png

 

I've attached the modified script that exports all four versions from a selected raw.

 

I'll file a bug report with Exiftool.

Votes

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
LEGEND ,
Apr 30, 2024 Apr 30, 2024

Copy link to clipboard

Copied

LATEST

"For SubIFDs using JPEG XL compression rather than JPEG compression, Exiftool doesn't display the field PreviewImage. ... I'll file a bug report with Exiftool."

 

I was wrong, having a slightly out-of-date Exiftool -- there is no Exiftool bug. After updating to version 12.84, I see that there is a new field PreviewJXL for extracting reduced-resolution images compressed with JPEG XL.

 

 

Votes

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