CGImageMetadataTagCreate(_:_:_:_:_:)
Creates a new image metadata tag, and fills it with the specified information.
Declaration
func CGImageMetadataTagCreate(_ xmlns: CFString, _ prefix: CFString?, _ name: CFString, _ type: CGImageMetadataType, _ value: CFTypeRef) -> CGImageMetadataTag?Parameters
- xmlns:
The namespace for the tag. Specify a common XMP namespace, such as Kcgimagemetadatanamespaceexif, or a string with a custom namespace URI. A custom namespace must be a valid XML namespace. By convention, namespaces end with either the
/or#character. - prefix:
An abbreviation for the XML namespace. You must specify a valid string for custom namespace. For standard namespaces such as Kcgimagemetadatanamespaceexif, you may specify
NULL. - name:
The name of the metadata tag. This string must correspond to a valid XMP name.
- type:
The type of data in the
valueparameter. For a list of possible values, see Cgimagemetadatatype. - value:
The value of the tag. The value’s type must match the information in the
typeparameter. Supported types for this parameter are Cfstring, Cfnumber, Cfboolean, Cfarray, and Cfdictionary. The keys of a dictionary must be Cfstring types with XMP names. The values of a dictionary must be either Cfstring or Cgimagemetadatatag types.The newly created tag stores only a shallow copy of the original value. As a result, modifying the original value doesn’t affect the value in the new Cgimagemetadatatag.
Return Value
A new CGImageMetadataTag type, or NULL if an error occurred.