Post

Replies

Boosts

Views

Activity

Image I/O Set Qualifier of MetadataTag
I am trying to set the description of an image. The metadata tag necessary to add the description is of type alternateText. I create the child tag with the new description value: let childTag = CGImageMetadataTagCreate(identifier.section.namespace, identifier.section.prefix, "[x-default]" as CFString, .string, value as CFTypeRef) I then set the description tag like this: let parentTag = CGImageMetadataTagCreate(identifier.section.namespace, identifier.section.prefix, identifier.tagKey, .alternateText, [childTag] as CFTypeRef) let result = CGImageMetadataSetTagWithPath(metadata, nil, identifier.tagKey, parentTag) However, when I write the image file, I get a runtime error message and the operation fails: XMP Error: AltText array items must have an xml:lang qualifier So, I create the qualifier tag like this: let qualifierTag = CGImageMetadataTagCreate("http://www.w3.org/XML/1998/namespace" as CFString, "xml" as CFString, "lang" as CFString, .string, "x-default" as CFTypeRef) But I have not found a way to associate this qualifier tag to the child tag with the description value. What is the way to do it?
0
0
553
Oct ’21
Core ML Model Deployment - Add First Model
I am trying to deploy our first Core ML model through the dashboard at https://ml.developer.apple.com/. Immediately after I go into the site, I get a message that reads "Your request is invalid.". I click "+" to add a model collection, I enter a collection ID, a description and a single model ID and then tap on "Create". I get a message that reads "One of the fields was invalid.". I have tried changing the IDs and the description, but there is no way to make it work. I have been trying this for hours. Could you please guide me on how to make it work?
7
0
1.1k
May ’22