| 4D v13.4GET PICTURE METADATA | ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| 
 | 
    4D v13.4
 GET PICTURE METADATA 
         | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| GET PICTURE METADATA ( picture ; metaName ; metaContents {; metaName2 ; metaContents2 ; ... ; metaNameN ; metaContentsN} ) | ||||||||
| Parameter | Type | Description | ||||||
| picture | Picture |   | Picture whose metadata you want to get | |||||
| metaName | Text |   | Name or path of block to get | |||||
| metaContents | Variable |   | Metadata contents | |||||
The GET PICTURE METADATA command can be used to read the contents of the metadata (or meta-tags) found in picture (4D picture field or variable). For more information about metadata, please refer to the description of the SET PICTURE METADATA command.
In the metaName parameter, pass a string specifying the type of metadata to retrieve. You can pass:
Pass the variable intended to receive the metadata in the metaContents parameter.
Use of DOM tree structures
 $xml:=DOM Create XML Ref("Root") //Creation of an XML DOM tree
 
  //Reception of TIFF metadata
 $_Xml_TIFF:=DOM Create XML element($xml;"/Root/TIFF")
 GET PICTURE METADATA(vPicture;"TIFF";$_Xml_TIFF)
 
  //Reception of GPS metadata
 $_Xml_GPS:=DOM Create XML element($xml;"/Root/GPS")
 GET PICTURE METADATA(vPicture;"GPS";$_Xml_GPS)Use of variables
 C_DATE($dateAsDate)
 GET PICTURE METADATA(vPicture;TIFF Date Time;$dateAsDate)
  //only returns the date since $dateAsDate is of the Date type
 
 C_TEXT($dateAsText)
 GET PICTURE METADATA(vPicture;TIFF Date Time;$dateAsText)
  //only returns the date but in XML format
 
 C_INTEGER($urgency)
 GET PICTURE METADATA(vPicture;IPTC Urgency;$urgency)Reception of tags with multiple values in arrays
 ARRAY TEXT($tTkeywords;0)
 GET PICTURE METADATA(vPicture;IPTC Keywords;$tTkeywords)After execution of the command, arrTkeywords contains for example: 
 $arrTkeywords{1}="France"
 $arrTkeywords{2}="Europe"Reception of tags with multiple values in a Text variable
 C_TEXT($vTwords;0)
 GET PICTURE METADATA(vPicture;IPTC Keywords;$vTwords)After execution of the command, vTwords contains for example "France;Europe".
The OK system variable returns 1 if the retrieval of the metadata has proceeded correctly and 0 if an error occurs or if at least one of the tags is not found. In all cases, the any values that can be read are returned.
	Product:  4D
	Theme:  Pictures
	Number:  
        1122
        
        
        
	
        
         
        
	Created:  4D v12
GET PICTURE KEYWORDS
Picture Metadata Names
Picture Metadata Values
SET PICTURE METADATA