Highlighted

Exported TIFF images are actually JPEGs

New Here ,
May 07, 2020

Copy link to clipboard

Copied

I have the following plugin code:

 

local Plugin = {
    hideSections = { "exportLocation", "fileNaming", "metadata", "video" },
    allowFileFormats = { "TIFF" },
    allowColorSpaces = nil,
    exportPresetFields = {}
}
function Plugin.startDialog( propertyTable )
    propertyTable.LR_format = "TIFF"
    propertyTable.LR_tiff_compressionMethod = "compressionMethod_None"
end
function Plugin.processRenderedPhotos( functionContext, exportContext )
    local exportSession = exportContext.exportSession
    local nPhotos = exportSession:countRenditions()

    local failures = {}
    for _, rendition in exportContext:renditions{ stopIfCanceled = true } do
        local success, pathOrMessage = rendition:waitForRender()
    end
end

 

When I run that code on OSX, the exported file will be a JPEG file, instead of, as requested, a TIFF. What is going on here? At the very least, I would expect some sort of error output, but Lightroom just happily produces a JPEG file.

 

On Windows, the code works as expected and always produces a TIFF.

Topics

Bug, Import and export, SDK

Views

390

Likes

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

Exported TIFF images are actually JPEGs

New Here ,
May 07, 2020

Copy link to clipboard

Copied

I have the following plugin code:

 

local Plugin = {
    hideSections = { "exportLocation", "fileNaming", "metadata", "video" },
    allowFileFormats = { "TIFF" },
    allowColorSpaces = nil,
    exportPresetFields = {}
}
function Plugin.startDialog( propertyTable )
    propertyTable.LR_format = "TIFF"
    propertyTable.LR_tiff_compressionMethod = "compressionMethod_None"
end
function Plugin.processRenderedPhotos( functionContext, exportContext )
    local exportSession = exportContext.exportSession
    local nPhotos = exportSession:countRenditions()

    local failures = {}
    for _, rendition in exportContext:renditions{ stopIfCanceled = true } do
        local success, pathOrMessage = rendition:waitForRender()
    end
end

 

When I run that code on OSX, the exported file will be a JPEG file, instead of, as requested, a TIFF. What is going on here? At the very least, I would expect some sort of error output, but Lightroom just happily produces a JPEG file.

 

On Windows, the code works as expected and always produces a TIFF.

Topics

Bug, Import and export, SDK

Views

391

Likes

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
May 07, 2020 0
New Here ,
May 07, 2020

Copy link to clipboard

Copied

When I remove the 

allowFileFormats = { "TIFF" },

from the code, and just leave TIFF selected as the file format in the export dialog, a TIFF will be produced also. 

Likes

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
Reply
Loading...
May 07, 2020 0
New Here ,
May 07, 2020

Copy link to clipboard

Copied

When I instead add

disallowFileFormats = { "DNG", "JPEG", "ORIGINAL", "PNG", "PSD" },

the exported file will again be a JPEG.

Likes

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
Reply
Loading...
May 07, 2020 0