photo:getFormattedMetadata( key )
Retrieves display-formatted metadata from this photo. Metadata is formatted as is shown in the metadata panel. The returned value strings are formatted for display; you should not attempt to parse them.

As of Lightroom 3.0, no longer needs to be called from within one of the catalog:with___AccessDo gates, but must be called from within a task started using LrTasks.

First supported in version 1.3 of the Lightroom SDK.

Parameters

1. key
(string) Which metadata item to retrieve, return an array of all available metadata fields as key/value pairs if nil. These valid keys return these values:
  • keywordTags: (string) The list of keywords as shown in the Keyword Tags panel (with Enter Keywords selected). This is the exact set of tags that were directly applied to the photo without any filtering for "Show on Export" flags, etc.
  • keywordTagsForExport: (string) The list of keywords as shown in the Keyword Tags panel (with Will Export selected). First supported as of Lightroom 2.0. This removes tags that were meant to be hidden via "Show on Export" and inserts all of the parents and ancestor tags (except when silenced via "Export Containing Keywords").
  • fileName: (string) The leaf name of the file (for example, "myFile.jpg")
  • preservedFileName: (string) The preserved file name of the file
  • copyName: (string) The name associated with this copy
  • folderName: (string) The name of the folder the file is in
  • fileSize: (string) The formatted size of the file, or, if the file is offline, but there is a smart preview, the size of the smart preview (for example, "6.01 MB")
  • fileType: (string) The user-visible file type (DNG, RAW, etc.)
  • rating: (number) The user rating of the file (either nil or number of stars)
  • label: (string) The name of assigned color label
  • title: (string) The title of photo
  • caption: (string) The caption for photo
  • dimensions: (string) The original dimensions of file (for example, "3072 x 2304")
  • croppedDimensions: (string) The cropped dimensions of file (for example, "3072 x 2304")
  • exposure: (string) The exposure summary (for example, "1/60 sec at f/2.8")
  • shutterSpeed: (string) The shutter speed (for example, "1/60 sec")
  • aperture: (string) The aperture (for example, "f/2.8")
  • brightnessValue: (string) The brightness value (HELP: need an example)
  • exposureBias: (string) The exposure bias/compensation (for example, "-2/3 EV")
  • flash: (string) Whether the flash fired or not (for example, "Did fire")
  • exposureProgram: (string) The exposure program (for example, "Aperture priority")
  • meteringMode: (string) The metering mode (for example, "Pattern")
  • isoSpeedRating: (string) The ISO speed rating (for example, "ISO 200")
  • focalLength: (string) The focal length of lens as shot (for example, "132 mm")
  • focalLength35mm: (string) The focal length as 35mm equivalent (for example, "211 mm")
  • lens: (string) The lens (for example, "28.0-135.0 mm")
  • subjectDistance: (string) The subject distance (for example, "3.98 m")
  • dateTimeOriginal: (string) The date and time of capture (for example, "09/15/2005 17:32:50") Formatting can vary based on the user's localization settings
  • dateTimeDigitized: (string) The date and time of scanning (for example, "09/15/2005 17:32:50") Formatting can vary based on the user's localization settings
  • dateTime: (string) Adjusted date and time (for example, "09/15/2005 17:32:50") Formatting can vary based on the user's localization settings
  • cameraMake: (string) The camera manufacturer
  • cameraModel: (string) The camera model
  • cameraSerialNumber: (string) The camera serial number
  • artist: (string) The artist's name
  • software: (string) The software used to process/create photo
  • gps: (string) The location of this photo (for example, "37°56'10" N 27°20'42" E")
  • gpsAltitude: (string) The GPS altitude for this photo (for example, "82.3 m")
  • creator: (string) The name of the person that created this image
  • creatorJobTitle: (string) The job title of the person that created this image
  • creatorAddress: (string) The address for the person that created this image
  • creatorCity: (string) The city for the person that created this image
  • creatorStateProvince: (string) The state or province for the person that created this image
  • creatorPostalCode: (string) The postal code for the person that created this image
  • creatorCountry: (string) The country for the person that created this image
  • creatorPhone: (string) The phone number for the person that created this image
  • creatorEmail: (string) The email address for the person that created this image
  • creatorUrl: (string) The web URL for the person that created this image
  • headline: (string) A brief, publishable synopsis or summary of the contents of this image
  • iptcSubjectCode: (string) Values from the IPTC Subject NewsCode Controlled Vocabulary (see: http://www.newscodes.org/)
  • descriptionWriter: (string) The name of the person who wrote, edited or corrected the description of the image
  • iptcCategory: (string) Deprecated field; included for transferring legacy metadata
  • iptcOtherCategories: (string) Deprecated field; included for transferring legacy metadata
  • dateCreated: (string) The IPTC-formatted creation date (for example, "2005-09-20T15:10:55Z")
  • intellectualGenre: (string) A term to describe the nature of the image in terms of its intellectual or journalistic characteristics, such as daybook, or feature (examples at: http://www.newscodes.org/)
  • scene: (string) Values from the IPTC Scene NewsCodes Controlled Vocabulary (see: http://www.newscodes.org/)
  • location: (string) Details about a location shown in this image
  • city: (string) The name of the city shown in this image
  • stateProvince: (string) The name of the state shown in this image
  • country: (string) The name of the country shown in this image
  • isoCountryCode: (string) The 2 or 3 letter ISO 3166 Country Code of the country shown in this image
  • jobIdentifier: (string) A number or identifier needed for workflow control or tracking
  • instructions: (string) Information about embargoes, or other restrictions not covered by the Rights Usage field
  • provider: (string) Name of person who should be credited when this image is published
  • source: (string) The original owner of the copyright of this image
  • copyright: (string) The copyright text for this image
  • copyrightState: (string) The copyright state for this image
  • rightsUsageTerms: (string) Instructions on how this image can legally be used
  • copyrightInfoUrl

The following items are first supported in version 3.0 of the Lightroom SDK. For details of IPTC Extension definitions, see http://www.iptc.org/std/photometadata/2008/specification/. For details of PLUS definitions, see http://ns.useplus.org/LDF/ldf-XMPReference

  • personShown: (string) Name of a person shown in this image
  • locationCreated: (table) The location where the photo was taken. Each element in the return table is a table which is a structure named LocationDetails as defined in the IPTC Extension spec.
  • locationShown: (table) The location shown in this image. Each element in the return table is a table which is a structure named LocationDetails as defined in the IPTC Extension spec.
  • nameOfOrgShown: (string) Name of the organization or company featured in this image
  • codeOfOrgShown: (string) Code from a controlled vocabulary for identifying the organization or company featured in this image
  • event: (string) Names or describes the specific event at which the photo was taken
  • artworksShown: (table) A set of metadata about artwork or an object in the image. Each element in the return table is a table which is a structure named ArtworkOrObjectDetails as defined in the IPTC Extension spec.
  • additionalModelInfo: (string) Information about the ethnicity and other facets of model(s) in a model-released image
  • modelAge: (string) Age of human model(s) at the time this image was taken in a model released image
  • minorModelAge: (string) Age of the youngest model pictured in the image, at the time that the image was made
  • modelReleaseStatus: (string) Summarizes the availability and scope of model releases authorizing usage of the likenesses of persons appearing in the photo
  • modelReleaseID: (string) A PLUS-ID identifying each Model Release
  • imageSupplier: (table) Identifies the most recent supplier of this photo, who is not necessarily its owner or creator. Each element in the table is a table that is a structure named ImageSupplierDetail defined in PLUS.
  • imageSupplierImageId: (string) Identifier assigned by the Image Supplier.
  • registryId: (table) Both a Registry Item Id and a Registry Organization Id to record any registration of this photo with a registry. Each element in the return table is a table which is a structure named RegistryEntryDetail as defined in the IPTC Extension spec.
  • maxAvailWidth: (number) The maximum available width in pixels of the original photo from which this photo has been derived by downsizing
  • maxAvailHeight: (number) The maximum available height in pixels of the original photo from which this photo has been derived by downsizing
  • sourceType: (string) The type of the source of this digital image, selected from a controlled vocabulary
  • imageCreator: (table) Creator or creators of the image. Each element in the return table is a table which is a structure named ImageCreatorDetail defined in PLUS.
  • copyrightOwner: (table) Owner or owners of the copyright in the licensed image. Each element in the return table is a table which is a structure named CopyrightOwnerDetail defined in PLUS.
  • licensor: (table) A person or company that should be contacted to obtain a license for using the photo, or who has licensed the photo. Each element in the return table is a table which is a structure named LicensorDetail defined in PLUS.
  • propertyReleaseID: (string) A PLUS-ID identifying each Property Release
  • propertyReleaseStatus: (string) Summarizes the availability and scope of property releases authorizing usage of the likenesses of persons appearing in the image.
  • digImageGUID: (string) Globally unique identifier for the item, created and applied by the creator of the item at the time of its creation
  • plusVersion: (string) The version number of the PLUS standards in place at the time of the transaction

The following items are first supported in version 6.0 of the Lightroom SDK.

  • gpsImgDirection: (string) The GPS direction for this photo (for example, "South-East")

Return value

(string or table) The formatted-string value of the specified metadata property, or nil if not applicable. If no key is specified, returns a table of all available metadata fields as key/value pairs.