---
title: CGMutableImageMetadata
framework: imageio
role: symbol
role_heading: Class
path: imageio/cgmutableimagemetadata
---

# CGMutableImageMetadata

An opaque type for adding or modifying image metadata.

## Declaration

```swift
class CGMutableImageMetadata
```

## Discussion

Discussion Create a CGMutableImageMetadata opaque type when you want to modify the metadata in an image. You may pass this type to any functions that take a CGImageMetadata type as a parameter. This object stores the tag information as XMP data, which you can write back to the image. When you access or modify EXIF or IPTC properties, the metadata functions automatically bridge those properties to appropriate XMP properties. This bridging behavior fills in any fields that are present only in the XMP data. For example, it fills in the namespace, prefix, and XMP type information in the corresponding CGImageMetadataTag object.

## Topics

### Creating a Mutable Metadata Type

- [CGImageMetadataCreateMutable()](imageio/cgimagemetadatacreatemutable().md)
- [CGImageMetadataCreateMutableCopy(_:)](imageio/cgimagemetadatacreatemutablecopy(_:).md)

### Setting the Values of Tags

- [CGImageMetadataSetValueWithPath(_:_:_:_:)](imageio/cgimagemetadatasetvaluewithpath(_:_:_:_:).md)
- [CGImageMetadataSetValueMatchingImageProperty(_:_:_:_:)](imageio/cgimagemetadatasetvaluematchingimageproperty(_:_:_:_:).md)
- [CGImageMetadataSetTagWithPath(_:_:_:_:)](imageio/cgimagemetadatasettagwithpath(_:_:_:_:).md)
- [CGImageMetadataRemoveTagWithPath(_:_:_:)](imageio/cgimagemetadataremovetagwithpath(_:_:_:).md)

### Registering a Custom Namespace

- [CGImageMetadataRegisterNamespaceForPrefix(_:_:_:_:)](imageio/cgimagemetadataregisternamespaceforprefix(_:_:_:_:).md)

## Relationships

### Inherits From

- [CGImageMetadata](imageio/cgimagemetadata.md)

### Conforms To

- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)

## See Also

### XMP Metadata

- [CGImageMetadata](imageio/cgimagemetadata.md)
- [CGImageMetadataTag](imageio/cgimagemetadatatag.md)
- [XMP Namespaces and Prefixes](imageio/xmp-namespaces-and-prefixes.md)
- [kCFErrorDomainCGImageMetadata](imageio/kcferrordomaincgimagemetadata.md)
- [CGImageMetadataErrors](imageio/cgimagemetadataerrors.md)
