---
title: "CGImageMetadataCreateMutableCopy(_:)"
framework: imageio
role: symbol
role_heading: Function
path: "imageio/cgimagemetadatacreatemutablecopy(_:)"
---

# CGImageMetadataCreateMutableCopy(_:)

Creates a deep, mutable copy of the specified metadata information.

## Declaration

```swift
func CGImageMetadataCreateMutableCopy(_ metadata: CGImageMetadata) -> CGMutableImageMetadata?
```

## Parameters

- `metadata`: The metadata information to copy. This function makes a deep copy of all doc://com.apple.imageio/documentation/ImageIO/CGImageMetadataTag structures in this parameter, including the values for the tags.

## Return Value

Return Value A new CGMutableImageMetadata type that contains a deep copy of the tags in the metadata parameter.

## Discussion

Discussion Typically, you call this function before modifying the metadata information for an image. Use it to create a copy of the image’s existing metadata information, and then add or modify that metadata before saving it with the image.

## See Also

### Creating a Mutable Metadata Type

- [CGImageMetadataCreateMutable()](imageio/cgimagemetadatacreatemutable().md)
