4D v14.3SET PICTURE METADATA |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|
4D v14.3
SET PICTURE METADATA
|
SET PICTURE METADATA ( picture ; metaName ; metaContents {; metaName2 ; metaContents2 ; ... ; metaNameN ; metaContentsN} ) | ||||||||
Parameter | Type | Description | ||||||
picture | Picture |
![]() |
Picture whose metadata you want to set | |||||
metaName | Text |
![]() |
Name or path of block to set | |||||
metaContents | Variable |
![]() |
Metadata contents | |||||
The SET PICTURE METADATA command lets you set or modify the contents of the metadata (or meta-tags) found in the picture (4D picture field or variable), when they are modifiable.
Metadata are additional information inserted into pictures. 4D lets you handled four types of standard metadata: EXIF, GPS, IPTC and TIFF.
Note: For a detailed description of these metadata types, you can consult the following documents: http://www.iptc.org/std/IIM/4.1/specification/IIMV4.1.pdf (IPTC) and http://exif.org/Exif2-2.PDF (TIFF, EXIF and GPS).
In the metaName parameter, pass a string specifying the type of metadata to set or modify. You can pass:
Pass the new values of the metadata in the metaContents parameter:
Warning: Certain metadata are read only and therefore cannot be modified by the SET PICTURE METADATA command, for example TIFF XResolution/TIFF YResolution, EXIF Color Space or EXIF Pixel X Dimension/EXIF Pixel Y Dimension.
Under Windows, if an error occurs during execution of the command, the OK variable is set to 0. Note that under Mac OS, for technical reasons, metadata writing errors are not detected. Therefore this command does not modify the OK variable under Mac OS.
Notes:
Setting several values of the "Keywords" metadata via arrays:
ARRAY TEXT($arrTkeywords;2)
$arrTkeywords{1}:="France"
$arrTkeywords{2}:="Europe"
SET PICTURE METADATA(vPicture;IPTC keywords;$arrTkeywords)
Setting of GPS block via a DOM reference:
C_TEXT($domMetas)
$domMetas:=DOM Parse XML source("metas.xml")
C_TEXT($gpsRef)
$gpsRef:=DOM Find XML element($domMetas;"Metadatas/GPS")
If(OK=1)
SET PICTURE METADATA(vImage;"GPS";$refGPS)
//here $gpsRef actually points to the GPS element
...
End if
DOM CLOSE XML($domMetas)
When all the metadata are handled via a DOM element reference, the tags are stored as attributes attached to an element (a child of the referenced element) whose name is the block name (TIFF, IPTC, etc.). When a specific metadata block is manipulated, the block tags are stored as attributes that are directly attached to the element referenced by the command.
Product: 4D
Theme: Pictures
Number:
1121
Created: 4D v12
GET PICTURE KEYWORDS
GET PICTURE METADATA
Picture Metadata Names
Picture Metadata Values
images
4D Language Reference ( 4D v12.4)
4D Language Reference ( 4D v14 R3)
4D Language Reference ( 4D v14 R2)
4D Language Reference ( 4D v13.5)
4D Language Reference ( 4D v14.3)
4D Language Reference ( 4D v14 R4)