Copy link to clipboard
Copied
For a LR publishing plugin I wanted to export also PNGs (additionally to JPGs) and wanted to get the mime-type of the LrPhoto. I couldn't find how to do this in the SDK-manual neither in the html-help.
I wanted to treat the uploaded files an metadata somewhat different, so I needed to know that.
Thank's in advance.
photo:getRawMetadata ("fileFormat") returns the file type of the photo as displayed in the Library Filter bar's Metadata browser's File Type column. My code uses this table to translate the result to a user-visible string (such as displayed in the Library Filter bar's Metadata browser):
local FileTypeEnum = {{"Digital Negative (DNG)", "DNG", "DNG"},
{"HEIC", "HEIC", "HEIC"}, {"JPEG", "JPG", "JPG"},
{"Photoshop Document (PSD)", "PSD", "PSD"},
{"Photoshop Large Document (PSB)", "PSB
...
Copy link to clipboard
Copied
photo:getRawMetadata ("fileFormat") returns the file type of the photo as displayed in the Library Filter bar's Metadata browser's File Type column. My code uses this table to translate the result to a user-visible string (such as displayed in the Library Filter bar's Metadata browser):
local FileTypeEnum = {{"Digital Negative (DNG)", "DNG", "DNG"},
{"HEIC", "HEIC", "HEIC"}, {"JPEG", "JPG", "JPG"},
{"Photoshop Document (PSD)", "PSD", "PSD"},
{"Photoshop Large Document (PSB)", "PSB", "PSB"},
{"PNG", "PNG", "PNG"}, {"Raw", "RAW", "RAW"}, {"TIFF", "TIFF", "TIFF"},
{"Video", "VIDEO", "VIDEO"}}
Copy link to clipboard
Copied
Great. Thank's. Don't know how I could miss that....