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

Turning off "Maximize Compatibility" through the SDK

Explorer ,
Oct 19, 2024 Oct 19, 2024

Is there any way to turn off "maximize compatibility" when using the SDK to render an image?  I created a plugin that renders image as part of generating panormas with PtGui, and since the latest update (14.0 or 14.0.1), TIFFs rendered through an LrExportSession created programmatically have changed to behave like "maximize compatibility" is turned on, which breaks (see my other post).  I have inspected the exportSettings of manual exports with and without "maximize compatibility" turned on, and I cannot find any property that changes.

 

Is this a known issue? Anyone know of any potential workarounds?

TOPICS
SDK
433
Translate
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 Correct answer

LEGEND , Oct 23, 2024 Oct 23, 2024

It's entirely possible it's a bug. Export of HDR images was added relatively recently, and the team may have forgotten to update the SDK support appropriately (which often occurs).  

 

Unless you provide a packaged-up easy way to reproduce a problem, Adobe isn't likely to pay much attention. See here for an example of how I submit SDK bugs in a way that makes it possible for anyone to reproduce the issue:

https://community.adobe.com/t5/lightroom-classic-bugs/p-sdk-method-exportrendition-waitforrender-returns-incorrect-results-for-videos/idi-p/14929458

Translate
LEGEND ,
Oct 21, 2024 Oct 21, 2024

I made Export presets with and without TIFF Maximize Compatibility checked, and comparing the two presets' .lrtemplate files, it appears that the setting is named:

 

LR_maximumCompatibility = false,

 

 

Translate
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
Explorer ,
Oct 23, 2024 Oct 23, 2024

Ah, neat. I didn't realize that the presets are stored in easy to inspect files.  I was inspecting the table passed to an export filter plugin, where the setting does not appear. I can confirm your observation on the preset files.

 

Unfortunately, there still seems to be a problem setting it from a plugin.  I am now setting that key in the settings table:

 

function PtExport.export(photos)
  tempDir = os.tmpname()

  if #photos < 1 then
    return tempDir, {}
  end

  local isHdr = nil
  for _, photo in ipairs(photos) do
    local otherHdr = photo:getDevelopSettings()["HDREditMode"]
    if (isHdr == nil and otherHdr ~= nil)
        or (otherHdr ~= nil and otherHdr > isHdr) then
      isHdr = otherHdr
    end
  end
  
  local exportSettings = {
    LR_format = 'TIFF',
    LR_export_destinationType = 'tempFolder',
    LR_export_destinationPathPrefix = tempDir,
    LR_export_useSubfolder = false,
    LR_collisionHandling = 'overwrite',
    LR_renamingTokensOn = true,
    LR_tokens = '{{naming_operationSequence_5Digits}}',
    LR_extensionCase= 'lowercase',
  }

  if isHdr then
    exportSettings["LR_export_colorSpace"] = 'Rec2020_hdr'
    exportSettings["LR_export_bitDepth"] = 32
    exportSettings["LR_enableHDRDisplay"] = true
    exportSettings["LR_maximumCompatibility"] = false
  else
    exportSettings["LR_export_colorSpace"] = 'ProPhotoRGB'
    exportSettings["LR_export_bitDepth"] = 16
  end

  LrFileUtils.createDirectory(tempDir)

  -- Confirm the settings
  local file = io.open(tempDir .. "\\settings.txt", "w")
  if file then
    file:write(PtUtils.dump(exportSettings))
    file:close()
  else
    LrDialogs.message("Write Failure", tempDir)
  end


  local exportSession = LrExportSession({
    photosToExport = photos,
    exportSettings = exportSettings
  })
  exportSession:doExportOnCurrentTask()

  local outputFilenames = {}
  for i, rendition in exportSession:renditions() do
    outputFilenames[i] = rendition.destinationPath
  end
 
  return tempDir, outputFilenames
end

 

But it seems to be ignored.  I double checked the contents of the table:

 

$table: 000000034704FE90$ {
[LR_collisionHandling] = overwrite,
[LR_extensionCase] = lowercase,
[LR_export_useSubfolder] = false,
[LR_maximumCompatibility] = false,
[LR_tokens] = {{naming_operationSequence_5Digits}},
[LR_export_colorSpace] = Rec2020_hdr,
[LR_enableHDRDisplay] = true,
[LR_export_bitDepth] = 32,
[LR_export_destinationPathPrefix] = C:\Users\m_sto\AppData\Local\Temp\LR-11,
[LR_renamingTokensOn] = true,
[LR_format] = TIFF,
[LR_export_destinationType] = tempFolder,
} 

 

Anything I am doing wrong? Or a bug in Lightroom?

 

Martin

Translate
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 ,
Oct 23, 2024 Oct 23, 2024

It's entirely possible it's a bug. Export of HDR images was added relatively recently, and the team may have forgotten to update the SDK support appropriately (which often occurs).  

 

Unless you provide a packaged-up easy way to reproduce a problem, Adobe isn't likely to pay much attention. See here for an example of how I submit SDK bugs in a way that makes it possible for anyone to reproduce the issue:

https://community.adobe.com/t5/lightroom-classic-bugs/p-sdk-method-exportrendition-waitforrender-ret...

Translate
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
Explorer ,
Oct 23, 2024 Oct 23, 2024

Posted a bug report here: https://community.adobe.com/t5/lightroom-classic-discussions/cannot-turn-off-max-compatibility-progr...

 

Somehow it got moved from "Bugs" to "Discussions", though?  Is this expected or would it be appropriate to try to post again under "Bugs"? (Couldn't find a way to move it.)

Translate
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 ,
Oct 23, 2024 Oct 23, 2024
LATEST

"Somehow it got moved from "Bugs" to "Discussions", though?"

 

That's Adobe's process for this forum. When/if the bug gets verified, the moderator Rikk Flohr will move it back to Bugs. That keeps the Bugs section reserved for bugs acknowledged by Adobe and being tracked by them (a good thing):

https://community.adobe.com/t5/lightroom-classic-bugs/p-do-i-post-in-discussions-or-bugs/idi-p/13691...

 

I'll take a look at your report in depth in a couple days. I'm currently revising one of my plugs, which relies heavily on exporting.

Translate
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