---
title: "CGImageMetadataTagCopyValue(_:)"
framework: imageio
role: symbol
role_heading: Function
path: "imageio/cgimagemetadatatagcopyvalue(_:)"
---

# CGImageMetadataTagCopyValue(_:)

Returns a shallow copy of the tag’s value, which is suitable only for reading.

## Declaration

```swift
func CGImageMetadataTagCopyValue(_ tag: CGImageMetadataTag) -> CFTypeRef?
```

## Parameters

- `tag`: The metadata tag from which to fetch the namespace information.

## Return Value

Return Value A copy of the tag’s value. Possible return types are CFString, CFNumber, CFBoolean, CFArray, and CFDictionary.

## Discussion

Discussion Use this method to obtain the value when you want to use or display that value elsewhere. Any changes you make to the returned value don’t change the contents of the metadata tag. To change the value, call CGImageMetadataSetValueWithPath(_:_:_:_:) or CGImageMetadataSetTagWithPath(_:_:_:_:) instead.

## See Also

### Getting the Attributes of the Tag

- [CGImageMetadataTagCopyNamespace(_:)](imageio/cgimagemetadatatagcopynamespace(_:).md)
- [CGImageMetadataTagCopyPrefix(_:)](imageio/cgimagemetadatatagcopyprefix(_:).md)
- [CGImageMetadataTagCopyName(_:)](imageio/cgimagemetadatatagcopyname(_:).md)
- [CGImageMetadataTagCopyQualifiers(_:)](imageio/cgimagemetadatatagcopyqualifiers(_:).md)
