<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.8.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "ImageIO",
  "identifier" : "/documentation/ImageIO/CGImageMetadataCreateMutableCopy(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Image I/O"
    ],
    "preciseIdentifier" : "c:@F@CGImageMetadataCreateMutableCopy"
  },
  "title" : "CGImageMetadataCreateMutableCopy(_:)"
}
-->

# CGImageMetadataCreateMutableCopy(_:)

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

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

## Parameters

`metadata`

The metadata information to copy. This function makes a deep copy of all [`CGImageMetadataTag`](/documentation/ImageIO/CGImageMetadataTag) structures in this parameter, including the values for the tags.

## Return Value

A new [`CGMutableImageMetadata`](/documentation/ImageIO/CGMutableImageMetadata) type that contains a deep copy of the tags in the metadata parameter.

## 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.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)