This is the legacy 4D documentation web site. Documentations are progressively being moved to developer.4d.com |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v20.6
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.
GET PICTURE KEYWORDS
Picture Metadata Names
Picture Metadata Values
SET PICTURE METADATA
Product: 4D
Theme: Pictures
Number:
1122
Created: 4D v12
4D Language Reference ( 4D v20)
4D Language Reference ( 4D v20.1)
4D Language Reference ( 4D v20.2)
4D Language Reference ( 4D v20.3)
4D Language Reference ( 4D v20.4)
4D Language Reference ( 4D v20.5)
4D Language Reference ( 4D v20.6)